QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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  DB2,
49  WCS,
52  XyzTiles
53  };
54 
58  QgsManageConnectionsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Mode mode = Export, Type type = WMS, const QString &fileName = QString() );
59 
60  public slots:
61  void doExportImport();
62  void selectAll();
63  void clearSelection();
64  void selectionChanged();
65 
66  private:
67  bool populateConnections();
68 
69  QDomDocument saveOWSConnections( const QStringList &connections, const QString &service );
70  QDomDocument saveWfsConnections( const QStringList &connections );
71  QDomDocument savePgConnections( const QStringList &connections );
72  QDomDocument saveMssqlConnections( const QStringList &connections );
73  QDomDocument saveOracleConnections( const QStringList &connections );
74  QDomDocument saveDb2Connections( const QStringList &connections );
75  QDomDocument saveGeonodeConnections( const QStringList &connections );
76  QDomDocument saveXyzTilesConnections( const QStringList &connections );
77 
78  void loadOWSConnections( const QDomDocument &doc, const QStringList &items, const QString &service );
79  void loadWfsConnections( const QDomDocument &doc, const QStringList &items );
80  void loadPgConnections( const QDomDocument &doc, const QStringList &items );
81  void loadMssqlConnections( const QDomDocument &doc, const QStringList &items );
82  void loadOracleConnections( const QDomDocument &doc, const QStringList &items );
83  void loadDb2Connections( const QDomDocument &doc, const QStringList &items );
84  void loadGeonodeConnections( const QDomDocument &doc, const QStringList &items );
85  void loadXyzTilesConnections( const QDomDocument &doc, const QStringList &items );
86 
87  QString mFileName;
88  Mode mDialogMode;
89  Type mConnectionType;
90 };
91 
92 // clazy:excludeall=qstring-allocations
93 
94 #endif // QGSMANAGECONNECTIONSDIALOG_H
95 
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46