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;
50 void paint( QPainter *painter,
51 const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
53 void setHoveredIndex(
const QModelIndex &index );
55 QModelIndex mHoveredIndex;
103 void setShowNoProjection(
bool show );
109 void setShowBoundsMap(
bool show );
116 bool showNoProjection()
const;
123 void setNotSetText(
const QString &text );
129 bool showBoundsMap()
const;
137 bool hasValidSelection()
const;
184 void setOgcWmsCrsFilter(
const QSet<QString> &crsFilter );
198 void clearRecentCrs();
216 void projectionDoubleClicked();
223 void hasValidSelectionChanged(
bool isValid );
228 void resizeEvent( QResizeEvent *event ) override;
231 bool eventFilter( QObject *obj, QEvent *ev ) override;
237 void selectCrsByAuthId( const QString &authid );
241 RoleDeprecated = Qt::UserRole,
247 QgsRecentCoordinateReferenceSystemTableModel *mRecentCrsModel =
nullptr;
249 enum Columns { NameColumn, AuthidColumn, ClearColumn };
251 bool mShowMap =
true;
253 bool mBlockSignals =
false;
257 void updateBoundsPreview();
260 void lstCoordinateSystemsDoubleClicked(
const QModelIndex &index );
261 void lstRecentDoubleClicked(
const QModelIndex &index );
262 void lstRecentClicked(
const QModelIndex &index );
263 void lstCoordinateSystemsSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
264 void lstRecentSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
266 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