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
sublayerselectiondialog.h
Go to the documentation of this file.
1
12#ifndef SUBLAYERSELECTIONDIALOG_H
13#define SUBLAYERSELECTIONDIALOG_H
14
15#include <QDialog>
16#include <QList>
17#include <QStringList>
18
19#include "layers/gisvectorlayer.h" // GISVectorLayer::OgrSublayerInfo
20
21class QLineEdit;
22class QTableWidget;
23
28class SublayerSelectionDialog : public QDialog
29{
30 Q_OBJECT
31
32public:
40 const QString &sourcePath,
41 const QList<GISVectorLayer::OgrSublayerInfo> &sublayers,
42 QWidget *parent = nullptr);
43
45 [[nodiscard]] QStringList selectedLayerNames() const;
46
48 [[nodiscard]] QList<GISVectorLayer::OgrSublayerInfo> selectedSublayers() const;
49
50private:
51 void buildUi(const QString &sourcePath);
52 void setAllChecked(bool checked);
53 void invertChecked();
54 void applyNameFilter(const QString &text);
55
56 QList<GISVectorLayer::OgrSublayerInfo> m_sublayers;
57 QTableWidget *m_table = nullptr;
58 QLineEdit *m_filter = nullptr;
59};
60
61#endif // SUBLAYERSELECTIONDIALOG_H
Lets the user choose which sublayers of a vector datasource to add.
Definition sublayerselectiondialog.h:29
QStringList selectedLayerNames() const
OGR names of the checked sublayers, in listed order.
Definition sublayerselectiondialog.cpp:141
QList< GISVectorLayer::OgrSublayerInfo > selectedSublayers() const
The checked sublayer descriptors, in listed order.
Definition sublayerselectiondialog.cpp:152
Map layer backed by an OGR vector dataset (Shapefile, GeoJSON, GeoPackage, …), rendering features as ...
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35