17#ifndef QGSPROJECTIONSELECTIONWIDGET_H
18#define QGSPROJECTIONSELECTIONWIDGET_H
26#include <QConcatenateTablesProxyModel>
38class CombinedCoordinateReferenceSystemsProxyModel;
90 void setOptionVisible(
CrsOption option,
bool visible );
96 bool optionVisible(
CrsOption option )
const;
102 void setNotSetText(
const QString &text );
109 void setMessage(
const QString &text );
126 bool showAccuracyWarnings()
const;
135 void setShowAccuracyWarnings(
bool show );
146 void setSourceEnsemble(
const QString &ensemble );
157 QString sourceEnsemble()
const;
164 void setDialogTitle(
const QString &title );
171 QString dialogTitle()
const;
178 void setFilter(
const QList<QgsCoordinateReferenceSystem> &crses );
229 void dragEnterEvent( QDragEnterEvent *event )
override;
230 void dragLeaveEvent( QDragLeaveEvent *event )
override;
231 void dropEvent( QDropEvent *event )
override;
234 CombinedCoordinateReferenceSystemsProxyModel *mModel =
nullptr;
237 QToolButton *mButton =
nullptr;
241 bool mShowAccuracyWarnings =
false;
242 QString mSourceEnsemble;
244 QWidget *mWarningLabelContainer =
nullptr;
245 QLabel *mWarningLabel =
nullptr;
247 QPointer<QgsCrsSelectionWidget> mActivePanel;
248 int mIgnorePanelSignals = 0;
250 QString mDialogTitle;
252 void updateTooltip();
254 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
258 void comboIndexChanged(
int idx );
259 void updateWarning();
266class StandardCoordinateReferenceSystemsModel :
public QAbstractItemModel
SIP_SKIP
274 RoleCrs = Qt::UserRole,
276 RoleOption = RoleCrs + 100,
279 StandardCoordinateReferenceSystemsModel( QObject *parent
SIP_TRANSFERTHIS =
nullptr );
281 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
282 QVariant data(
const QModelIndex &index,
int role )
const override;
283 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
284 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
285 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
286 QModelIndex parent(
const QModelIndex &index )
const override;
294 void setNotSetText(
const QString &text );
295 QString notSetText()
const {
return mNotSetText; }
308class CombinedCoordinateReferenceSystemsModel :
public QConcatenateTablesProxyModel
SIP_SKIP
313 CombinedCoordinateReferenceSystemsModel( QObject *parent );
314 void setNotSetText(
const QString &text );
315 QString notSetText()
const;
317 StandardCoordinateReferenceSystemsModel *standardModel() {
return mStandardModel; }
320 StandardCoordinateReferenceSystemsModel *mStandardModel =
nullptr;
324class CombinedCoordinateReferenceSystemsProxyModel :
public QSortFilterProxyModel
SIP_SKIP
329 CombinedCoordinateReferenceSystemsProxyModel( QObject *parent );
330 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
336 void setFilteredCrs(
const QList<QgsCoordinateReferenceSystem> &crses );
337 QList<QgsCoordinateReferenceSystem> filteredCrs()
const {
return mFilteredCrs; }
340 CombinedCoordinateReferenceSystemsModel *combinedModel()
const {
return mModel; }
343 CombinedCoordinateReferenceSystemsModel *mModel =
nullptr;
346 QList<QgsCoordinateReferenceSystem> mFilteredCrs;
@ FilterCompound
Include compound CRS.
@ FilterHorizontal
Include horizontal CRS (excludes compound CRS containing a horizontal component)
This class represents a coordinate reference system (CRS).
A QComboBox subclass with the ability to "highlight" the edges of the widget.
Base class for all map layer types.
A sort/filter proxy model for recent coordinate reference systems.
#define SIP_ENUM_BASETYPE(type)
const QgsCoordinateReferenceSystem & crs