11#ifndef QGSCRSSELECTOR_H
12#define QGSCRSSELECTOR_H
14#include "ui_qgsprojectionselectorbase.h"
25#include <QIdentityProxyModel>
26#include <QStyledItemDelegate>
37 QgsRecentCoordinateReferenceSystemTableModel( QObject *parent );
38 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
39 QVariant data(
const QModelIndex &index,
int role )
const override;
42class RemoveRecentCrsDelegate :
public QStyledItemDelegate
SIP_SKIP
47 RemoveRecentCrsDelegate( QObject *parent );
48 bool eventFilter( QObject *obj, QEvent *event )
override;
51 void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
54 void setHoveredIndex(
const QModelIndex &index );
56 QModelIndex mHoveredIndex;
102 void setShowNoProjection(
bool show );
108 void setShowBoundsMap(
bool show );
115 bool showNoProjection()
const;
122 void setNotSetText(
const QString &text );
128 bool showBoundsMap()
const;
136 bool hasValidSelection()
const;
183 void setOgcWmsCrsFilter(
const QSet<QString> &crsFilter );
197 void clearRecentCrs();
215 void projectionDoubleClicked();
222 void hasValidSelectionChanged(
bool isValid );
226 void resizeEvent( QResizeEvent *event ) override;
229 bool eventFilter( QObject *obj, QEvent *ev ) override;
234 void selectCrsByAuthId( const QString &authid );
238 RoleDeprecated = Qt::UserRole,
244 QgsRecentCoordinateReferenceSystemTableModel *mRecentCrsModel =
nullptr;
253 bool mShowMap =
true;
255 bool mBlockSignals =
false;
259 void updateBoundsPreview();
262 void lstCoordinateSystemsDoubleClicked(
const QModelIndex &index );
263 void lstRecentDoubleClicked(
const QModelIndex &index );
264 void lstRecentClicked(
const QModelIndex &index );
265 void lstCoordinateSystemsSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
266 void lstRecentSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
268 void removeRecentCrsItem(
const QModelIndex &index );
A sort/filter proxy model for coordinate reference systems.
@ FilterCompound
Include compound CRS.
@ FilterHorizontal
Include horizontal CRS (excludes compound CRS containing a horizontal component)
This class represents a coordinate reference system (CRS).
A sort/filter proxy model for recent coordinate reference systems.
A rectangle specified with double values.
const QgsCoordinateReferenceSystem & crs