QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmanageconnectionsdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmanageconnectionsdialog.h
3  ---------------------
4  begin : Dec 2009
5  copyright : (C) 2009 by Alexander Bruy
6  email : alexander dot bruy at gmail dot com
7 
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 
18 #ifndef QGSMANAGECONNECTIONSDIALOG_H
19 #define QGSMANAGECONNECTIONSDIALOG_H
20 
21 #include <QDialog>
22 #include <QDomDocument>
23 #include "ui_qgsmanageconnectionsdialogbase.h"
24 #include "qgis_gui.h"
25 #include "qgis_sip.h"
26 
31 class GUI_EXPORT QgsManageConnectionsDialog : public QDialog, private Ui::QgsManageConnectionsDialogBase
32 {
33  Q_OBJECT
34 
35  public:
36  enum Mode
37  {
39  Import
40  };
41 
42  enum Type
43  {
44  WMS,
46  WFS,
48  WCS,
55  VectorTile
56  };
57 
61  QgsManageConnectionsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Mode mode = Export, Type type = WMS, const QString &fileName = QString() );
62 
63  public slots:
64  void doExportImport();
65  void selectAll();
66  void clearSelection();
67  void selectionChanged();
68 
69  private:
70  bool populateConnections();
71 
72  QDomDocument saveOWSConnections( const QStringList &connections, const QString &service );
73  QDomDocument saveWfsConnections( const QStringList &connections );
74  QDomDocument savePgConnections( const QStringList &connections );
75  QDomDocument saveMssqlConnections( const QStringList &connections );
76  QDomDocument saveOracleConnections( const QStringList &connections );
77  QDomDocument saveHanaConnections( const QStringList &connections );
78  QDomDocument saveGeonodeConnections( const QStringList &connections );
79  QDomDocument saveXyzTilesConnections( const QStringList &connections );
80  QDomDocument saveArcgisConnections( const QStringList &connections, const QString &service );
81  QDomDocument saveVectorTileConnections( const QStringList &connections );
82 
83  void loadOWSConnections( const QDomDocument &doc, const QStringList &items, const QString &service );
84  void loadWfsConnections( const QDomDocument &doc, const QStringList &items );
85  void loadPgConnections( const QDomDocument &doc, const QStringList &items );
86  void loadMssqlConnections( const QDomDocument &doc, const QStringList &items );
87  void loadOracleConnections( const QDomDocument &doc, const QStringList &items );
88  void loadHanaConnections( const QDomDocument &doc, const QStringList &items );
89  void loadGeonodeConnections( const QDomDocument &doc, const QStringList &items );
90  void loadXyzTilesConnections( const QDomDocument &doc, const QStringList &items );
91  void loadArcgisConnections( const QDomDocument &doc, const QStringList &items, const QString &service );
92  void loadVectorTileConnections( const QDomDocument &doc, const QStringList &items );
93 
94  QString mFileName;
95  Mode mDialogMode;
96  Type mConnectionType;
97 };
98 
99 // clazy:excludeall=qstring-allocations
100 
101 #endif // QGSMANAGECONNECTIONSDIALOG_H
102 
QgsManageConnectionsDialog::XyzTiles
@ XyzTiles
Definition: qgsmanageconnectionsdialog.h:52
QgsManageConnectionsDialog
Definition: qgsmanageconnectionsdialog.h:31
QgsManageConnectionsDialog::Mode
Mode
Definition: qgsmanageconnectionsdialog.h:36
QgsManageConnectionsDialog::MSSQL
@ MSSQL
Definition: qgsmanageconnectionsdialog.h:47
QgsManageConnectionsDialog::Oracle
@ Oracle
Definition: qgsmanageconnectionsdialog.h:49
qgis_sip.h
QgsManageConnectionsDialog::PostGIS
@ PostGIS
Definition: qgsmanageconnectionsdialog.h:45
QgsManageConnectionsDialog::Export
@ Export
Definition: qgsmanageconnectionsdialog.h:38
QgsManageConnectionsDialog::WCS
@ WCS
Definition: qgsmanageconnectionsdialog.h:48
QgsManageConnectionsDialog::ArcgisFeatureServer
@ ArcgisFeatureServer
Definition: qgsmanageconnectionsdialog.h:54
QgsManageConnectionsDialog::Type
Type
Definition: qgsmanageconnectionsdialog.h:42
QgsManageConnectionsDialog::WMS
@ WMS
Definition: qgsmanageconnectionsdialog.h:44
QgsManageConnectionsDialog::ArcgisMapServer
@ ArcgisMapServer
Definition: qgsmanageconnectionsdialog.h:53
QgsManageConnectionsDialog::HANA
@ HANA
Definition: qgsmanageconnectionsdialog.h:50
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
QgsManageConnectionsDialog::WFS
@ WFS
Definition: qgsmanageconnectionsdialog.h:46
QgsManageConnectionsDialog::GeoNode
@ GeoNode
Definition: qgsmanageconnectionsdialog.h:51