17#ifndef QGSPROJECTIONSELECTIONWIDGET_H
18#define QGSPROJECTIONSELECTIONWIDGET_H
26#include <QConcatenateTablesProxyModel>
38class CombinedCoordinateReferenceSystemsProxyModel;
92 void setOptionVisible(
CrsOption option,
bool visible );
98 bool optionVisible(
CrsOption option )
const;
104 void setNotSetText(
const QString &text );
111 void setMessage(
const QString &text );
128 bool showAccuracyWarnings()
const;
137 void setShowAccuracyWarnings(
bool show );
148 void setSourceEnsemble(
const QString &ensemble );
159 QString sourceEnsemble()
const;
166 void setDialogTitle(
const QString &title );
173 QString dialogTitle()
const;
180 void setFilter(
const QList< QgsCoordinateReferenceSystem > &crses );
232 void dragEnterEvent( QDragEnterEvent *event )
override;
233 void dragLeaveEvent( QDragLeaveEvent *event )
override;
234 void dropEvent( QDropEvent *event )
override;
238 CombinedCoordinateReferenceSystemsProxyModel *mModel =
nullptr;
241 QToolButton *mButton =
nullptr;
245 bool mShowAccuracyWarnings =
false;
246 QString mSourceEnsemble;
248 QWidget *mWarningLabelContainer =
nullptr;
249 QLabel *mWarningLabel =
nullptr;
251 QPointer< QgsCrsSelectionWidget > mActivePanel;
252 int mIgnorePanelSignals = 0;
254 QString mDialogTitle;
256 void updateTooltip();
258 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
262 void comboIndexChanged(
int idx );
263 void updateWarning();
272class StandardCoordinateReferenceSystemsModel :
public QAbstractItemModel
SIP_SKIP
281 RoleCrs = Qt::UserRole,
283 RoleOption = RoleCrs + 100,
286 StandardCoordinateReferenceSystemsModel( QObject *parent
SIP_TRANSFERTHIS =
nullptr );
288 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
289 QVariant data(
const QModelIndex &index,
int role )
const override;
290 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
291 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
292 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
293 QModelIndex parent(
const QModelIndex &index )
const override;
301 void setNotSetText(
const QString &text );
302 QString notSetText()
const {
return mNotSetText; }
315class CombinedCoordinateReferenceSystemsModel :
public QConcatenateTablesProxyModel
SIP_SKIP
320 CombinedCoordinateReferenceSystemsModel( QObject *parent );
321 void setNotSetText(
const QString &text );
322 QString notSetText()
const;
324 StandardCoordinateReferenceSystemsModel *standardModel() {
return mStandardModel; }
327 StandardCoordinateReferenceSystemsModel *mStandardModel =
nullptr;
331class CombinedCoordinateReferenceSystemsProxyModel :
public QSortFilterProxyModel
SIP_SKIP
337 CombinedCoordinateReferenceSystemsProxyModel( QObject *parent );
338 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
344 void setFilteredCrs(
const QList< QgsCoordinateReferenceSystem > &crses );
345 QList< QgsCoordinateReferenceSystem > filteredCrs()
const {
return mFilteredCrs; }
348 CombinedCoordinateReferenceSystemsModel *combinedModel()
const {
return mModel; }
351 CombinedCoordinateReferenceSystemsModel *mModel =
nullptr;
354 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)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)
const QgsCoordinateReferenceSystem & crs