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();
167 void showEvent( QShowEvent *event )
override;
170 void resizeEvent( QResizeEvent *event )
override;
181 void loadUserCrsList( QSet<QString> *crsFilter =
nullptr );
190 void loadCrsList( QSet<QString> *crsFilter =
nullptr );
203 QString sqlSafeString(
const QString &
string )
const;
216 QString ogcWmsCrsFilterAsSqlExpression( QSet<QString> *crsFilter );
228 void applySelection(
int column = QgsProjectionSelectionTreeWidget::None, QString value = QString() );
235 QString getSelectedExpression(
const QString &e )
const;
237 QString selectedName();
240 long selectedCrsId();
243 void showDBMissingWarning(
const QString &fileName );
247 RoleDeprecated = Qt::UserRole,
254 QTreeWidgetItem *mUserProjList =
nullptr;
256 QTreeWidgetItem *mGeoList =
nullptr;
258 QTreeWidgetItem *mProjList =
nullptr;
260 QTreeWidgetItem *mUnknownList =
nullptr;
263 QString mCustomCsFile;
265 QString mSrsDatabaseFileName;
270 long getLargestCrsIdMatch(
const QString &sql );
276 bool mProjListDone =
false;
279 bool mUserProjListDone =
false;
282 bool mRecentProjListDone =
false;
284 enum Columns { NameColumn, AuthidColumn, QgisCrsIdColumn, None };
285 int mSearchColumn = QgsProjectionSelectionTreeWidget::None;
286 QString mSearchValue;
288 bool mPushProjectionToFront =
false;
291 QSet<QString> mCrsFilter;
294 QList< QgsCoordinateReferenceSystem > mRecentProjections;
297 void hideDeprecated( QTreeWidgetItem *item );
299 bool mShowMap =
true;
301 bool mInitialized =
false;
303 bool mBlockSignals =
false;
307 void updateBoundsPreview();
308 QStringList authorities();
311 void lstCoordinateSystems_itemDoubleClicked( QTreeWidgetItem *current,
int column );
312 void lstRecent_itemDoubleClicked( QTreeWidgetItem *current,
int column );
313 void lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );
314 void lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );