QGIS API Documentation  3.20.0-Odense (decaadbb31)
qgsgeonodeconnection.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgeonodeconnection.h
3  ---------------------
4  begin : Feb 2017
5  copyright : (C) 2017 by Muhammad Yarjuna Rohmat, Ismail Sunni
6  email : rohmat at kartoza dot com, ismail at kartoza dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSGEONODECONNECTION_H
17 #define QGSGEONODECONNECTION_H
18 
19 #include "qgis_core.h"
20 #include "qgsdatasourceuri.h"
21 
28 class CORE_EXPORT QgsGeoNodeConnection
29 {
30 
31  public:
32 
36  explicit QgsGeoNodeConnection( const QString &name );
37 
42  QString connectionName() const;
43 
48  void setConnectionName( const QString &connectionName );
49 
54  QgsDataSourceUri uri() const;
55 
60  void setUri( const QgsDataSourceUri &uri );
61 
66  QgsDataSourceUri &addWmsConnectionSettings( QgsDataSourceUri &uri ) const;
67 
72  QgsDataSourceUri &addWfsConnectionSettings( QgsDataSourceUri &uri ) const;
73 
80  QgsDataSourceUri &addWcsConnectionSettings( QgsDataSourceUri &uri ) const;
81 
82 
83  private:
84 
86  QString mConnName;
87 
89  QgsDataSourceUri mUri;
90 
91  QString settingsKey() const;
92 };
93 
101 class CORE_EXPORT QgsGeoNodeConnectionUtils
102 {
103  public:
104 
108  static QStringList connectionList();
109 
113  static void deleteConnection( const QString &name );
114 
118  static QString pathGeoNodeConnection();
119 
123  static QString pathGeoNodeConnectionDetails();
124 
125  private:
126 
127  // Path in QSetting
128  static const QString sPathGeoNodeConnection;
129  static const QString sPathGeoNodeConnectionDetails;
130 
131 };
132 
133 
134 #endif //QGSGEONODECONNECTION_H
Class for storing the component parts of a RDBMS data source URI (e.g.
Contains various utilities for managing the known collection of GeoNode servers associated with a QGI...
Encapsulates settings related to a single GeoNode connection.