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 bool showBoundsMap()
const;
95 bool hasValidSelection()
const;
132 void setOgcWmsCrsFilter(
const QSet<QString> &crsFilter );
137 void pushProjectionToFront();
156 void projectionDoubleClicked();
160 void showEvent( QShowEvent *event )
override;
163 void resizeEvent( QResizeEvent *event )
override;
174 void loadUserCrsList( QSet<QString> *crsFilter =
nullptr );
183 void loadCrsList( QSet<QString> *crsFilter =
nullptr );
193 QString sqlSafeString(
const QString &
string )
const;
206 QString ogcWmsCrsFilterAsSqlExpression( QSet<QString> *crsFilter );
218 void applySelection(
int column = QgsProjectionSelectionTreeWidget::None, QString value = QString() );
225 QString getSelectedExpression(
const QString &e )
const;
227 QString selectedName();
229 QString selectedProj4String();
231 QString selectedWktString();
234 long selectedCrsId();
237 void showDBMissingWarning(
const QString &fileName );
241 RoleDeprecated = Qt::UserRole,
246 QTreeWidgetItem *mUserProjList =
nullptr;
248 QTreeWidgetItem *mGeoList =
nullptr;
250 QTreeWidgetItem *mProjList =
nullptr;
253 QString mCustomCsFile;
255 QString mSrsDatabaseFileName;
260 long getLargestCrsIdMatch(
const QString &sql );
263 void insertRecent(
long crsId );
266 bool mProjListDone =
false;
269 bool mUserProjListDone =
false;
273 bool mRecentProjListDone =
false;
275 enum Columns { NameColumn, AuthidColumn, QgisCrsIdColumn, None };
276 int mSearchColumn = QgsProjectionSelectionTreeWidget::None;
277 QString mSearchValue;
279 bool mPushProjectionToFront =
false;
282 QSet<QString> mCrsFilter;
285 QStringList mRecentProjections;
288 void hideDeprecated( QTreeWidgetItem *item );
290 bool mShowMap =
true;
292 bool mInitialized =
false;
296 void updateBoundsPreview();
297 QStringList authorities();
300 void lstCoordinateSystems_itemDoubleClicked( QTreeWidgetItem *current,
int column );
301 void lstRecent_itemDoubleClicked( QTreeWidgetItem *current,
int column );
302 void lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
303 void lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
A rectangle specified with double values.
const QgsCoordinateReferenceSystem & crs
This class represents a coordinate reference system (CRS).