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
wmsconnectiondialog.h
Go to the documentation of this file.
1
11#ifndef WMSCONNECTIONDIALOG_H
12#define WMSCONNECTIONDIALOG_H
13
14#include <QDialog>
15#include <QString>
16#include <QUrl>
17#include <QList>
18
19class QLineEdit;
20class QComboBox;
21class QTreeWidget;
22class QTreeWidgetItem;
23class QLabel;
24class QDialogButtonBox;
25class QProgressIndicator;
26class WMSLayer;
27struct WMSServiceInfo;
28struct WMSLayerInfo;
29
53class WMSConnectionDialog : public QDialog
54{
55 Q_OBJECT
56
57public:
58
59 explicit WMSConnectionDialog(QWidget *parent = nullptr);
60 ~WMSConnectionDialog() override;
61
67 [[nodiscard]] WMSLayer *createLayer(QObject *project = nullptr) const;
68
69private slots:
70 void onConnectClicked();
71 void onCapabilitiesFetched(const WMSServiceInfo &info);
72 void onCapabilitiesError(const QString &error);
73 void onLayerSelectionChanged();
74 void onUrlComboChanged(const QString &text);
75
76private:
77 void setupUi();
78 void populateLayerTree(const WMSServiceInfo &info);
79 void saveRecentUrls();
80 void loadRecentUrls();
81
82 QComboBox *m_urlCombo = nullptr;
83 QTreeWidget *m_layerTree = nullptr;
84 QComboBox *m_styleCombo = nullptr;
85 QComboBox *m_formatCombo = nullptr;
86 QComboBox *m_crsCombo = nullptr;
87 QLabel *m_serviceTitle = nullptr;
88 QDialogButtonBox *m_buttonBox = nullptr;
89
90 WMSLayer *m_pendingLayer = nullptr;
91 WMSServiceInfo *m_serviceInfo = nullptr;
92 QString m_selectedLayerName;
93};
94
95#endif // WMSCONNECTIONDIALOG_H
Dialog for connecting to an OGC WMS service and selecting a layer to add.
Definition wmsconnectiondialog.h:54
WMSLayer * createLayer(QObject *project=nullptr) const
Returns a configured WMSLayer instance for the user's selection.
Definition wmsconnectiondialog.cpp:53
~WMSConnectionDialog() override
Definition wmsconnectiondialog.cpp:41
A map layer that fetches and displays images from an OGC WMS service.
Definition wmslayer.h:70
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35
Describes one named layer returned by a WMS GetCapabilities response.
Definition wmslayer.h:33
Metadata returned by a WMS GetCapabilities request.
Definition wmslayer.h:48