11#ifndef QGSCRSSELECTOR_H
12#define QGSCRSSELECTOR_H
14#include "ui_qgsprojectionselectorbase.h"
65 void setShowNoProjection(
bool show );
72 void setShowBoundsMap(
bool show );
80 bool showNoProjection()
const;
87 void setNotSetText(
const QString &text );
94 bool showBoundsMap()
const;
102 bool hasValidSelection()
const;
139 void setOgcWmsCrsFilter(
const QSet<QString> &crsFilter );
154 void clearRecentCrs();
184 void showEvent( QShowEvent *event )
override;
187 void resizeEvent( QResizeEvent *event )
override;
190 bool eventFilter( QObject *obj, QEvent *ev )
override;
201 void loadUserCrsList( QSet<QString> *crsFilter =
nullptr );
210 void loadCrsList( QSet<QString> *crsFilter =
nullptr );
223 QString sqlSafeString(
const QString &
string )
const;
236 QString ogcWmsCrsFilterAsSqlExpression( QSet<QString> *crsFilter );
248 void applySelection(
int column = QgsProjectionSelectionTreeWidget::None, QString value = QString() );
251 QString expressionForItem( QTreeWidgetItem *item,
const QString &expression )
const;
256 QString selectedName();
259 long selectedCrsId();
262 void showDBMissingWarning(
const QString &fileName );
266 RoleDeprecated = Qt::UserRole,
273 QTreeWidgetItem *mUserProjList =
nullptr;
275 QTreeWidgetItem *mGeoList =
nullptr;
277 QTreeWidgetItem *mProjList =
nullptr;
279 QTreeWidgetItem *mUnknownList =
nullptr;
282 QString mCustomCsFile;
284 QString mSrsDatabaseFileName;
289 long getLargestCrsIdMatch(
const QString &sql );
295 bool mProjListDone =
false;
298 bool mUserProjListDone =
false;
301 bool mRecentProjListDone =
false;
303 enum Columns { NameColumn, AuthidColumn, QgisCrsIdColumn, ClearColumn,
None };
304 int mSearchColumn = QgsProjectionSelectionTreeWidget::None;
305 QString mSearchValue;
308 QSet<QString> mCrsFilter;
311 QList< QgsCoordinateReferenceSystem > mRecentProjections;
314 void hideDeprecated( QTreeWidgetItem *item );
316 bool mShowMap =
true;
318 bool mInitialized =
false;
320 bool mBlockSignals =
false;
324 void updateBoundsPreview();
325 QStringList authorities();
328 void lstCoordinateSystems_itemDoubleClicked( QTreeWidgetItem *current,
int column );
329 void lstRecent_itemDoubleClicked( QTreeWidgetItem *current,
int column );
330 void lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
331 void lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
334 void removeRecentCrsItem( QTreeWidgetItem *item );
This class represents a coordinate reference system (CRS).
A rectangle specified with double values.
const QgsCoordinateReferenceSystem & crs