SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
crsselectiondialog.h
Go to the documentation of this file.
1
11#ifndef CRSSELECTIONDIALOG_H
12#define CRSSELECTIONDIALOG_H
13
14#include <QDialog>
15#include <QString>
16
17class QLineEdit;
18class QComboBox;
19class QTreeView;
20class QTextBrowser;
21class QDialogButtonBox;
22class QSortFilterProxyModel;
23class QStandardItemModel;
24class QStandardItem;
26
37class CRSSelectionDialog : public QDialog
38{
39 Q_OBJECT
40
41public:
42
43 explicit CRSSelectionDialog(QWidget *parent = nullptr);
45
46 void setCurrentCRS(const SpatialReferenceSystem *current);
47
48 [[nodiscard]] SpatialReferenceSystem *selectedSRS() const;
49 [[nodiscard]] QString selectedAuthCode() const;
50
51private slots:
52 void onSearchTextChanged(const QString &text);
53 void onAuthorityFilterChanged(int index);
54 void onTypeFilterChanged(int index);
55 void onTreeSelectionChanged();
56 void onAccepted();
57
58private:
59 void setupUi();
60 void buildTree(const QString &authority = {},
61 const QString &typeFilter = {},
62 const QString &searchText = {});
63 void updatePreview();
64
65 // Data roles for tree items
66 static constexpr int AuthCodeRole = Qt::UserRole + 1;
67 static constexpr int IsLeafRole = Qt::UserRole + 2;
68
69 QLineEdit *m_searchEdit = nullptr;
70 QComboBox *m_authorityCombo = nullptr;
71 QComboBox *m_typeCombo = nullptr;
72 QTreeView *m_treeView = nullptr;
73 QTextBrowser *m_wktPreview = nullptr;
74 QDialogButtonBox *m_buttonBox = nullptr;
75 QStandardItemModel *m_treeModel = nullptr;
76
77 QString m_selectedAuthCode;
78};
79
80#endif // CRSSELECTIONDIALOG_H
Modal dialog for browsing and selecting a CRS from the GDAL database.
Definition crsselectiondialog.h:38
void setCurrentCRS(const SpatialReferenceSystem *current)
Definition crsselectiondialog.cpp:136
QString selectedAuthCode() const
Definition crsselectiondialog.cpp:195
SpatialReferenceSystem * selectedSRS() const
Definition crsselectiondialog.cpp:170
~CRSSelectionDialog() override
Represents a coordinate reference system backed by a GDAL OGRSpatialReference.
Definition spatialreferencesystem.h:28
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35