11 #ifndef QGSCRSSELECTOR_H
12 #define QGSCRSSELECTOR_H
14 #include "ui_qgsprojectionselectorbase.h"
17 #include <QStringList>
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 );
144 void pushProjectionToFront();
174 void showEvent( QShowEvent *event )
override;
177 void resizeEvent( QResizeEvent *event )
override;
188 void loadUserCrsList( QSet<QString> *crsFilter =
nullptr );
197 void loadCrsList( QSet<QString> *crsFilter =
nullptr );
210 QString sqlSafeString(
const QString &
string )
const;
223 QString ogcWmsCrsFilterAsSqlExpression( QSet<QString> *crsFilter );
235 void applySelection(
int column = QgsProjectionSelectionTreeWidget::None, QString value = QString() );
242 QString getSelectedExpression(
const QString &e )
const;
244 QString selectedName();
247 long selectedCrsId();
250 void showDBMissingWarning(
const QString &fileName );
254 RoleDeprecated = Qt::UserRole,
261 QTreeWidgetItem *mUserProjList =
nullptr;
263 QTreeWidgetItem *mGeoList =
nullptr;
265 QTreeWidgetItem *mProjList =
nullptr;
267 QTreeWidgetItem *mUnknownList =
nullptr;
270 QString mCustomCsFile;
272 QString mSrsDatabaseFileName;
277 long getLargestCrsIdMatch(
const QString &sql );
283 bool mProjListDone =
false;
286 bool mUserProjListDone =
false;
289 bool mRecentProjListDone =
false;
291 enum Columns { NameColumn, AuthidColumn, QgisCrsIdColumn, None };
292 int mSearchColumn = QgsProjectionSelectionTreeWidget::None;
293 QString mSearchValue;
295 bool mPushProjectionToFront =
false;
298 QSet<QString> mCrsFilter;
301 QList< QgsCoordinateReferenceSystem > mRecentProjections;
304 void hideDeprecated( QTreeWidgetItem *item );
306 bool mShowMap =
true;
308 bool mInitialized =
false;
310 bool mBlockSignals =
false;
314 void updateBoundsPreview();
315 QStringList authorities();
318 void lstCoordinateSystems_itemDoubleClicked( QTreeWidgetItem *current,
int column );
319 void lstRecent_itemDoubleClicked( QTreeWidgetItem *current,
int column );
320 void lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
321 void lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
This class represents a coordinate reference system (CRS).
A rectangle specified with double values.
const QgsCoordinateReferenceSystem & crs