QGIS API Documentation  3.6.0-Noosa (5873452)
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 
74  private:
75 
77  QString mConnName;
78 
80  QgsDataSourceUri mUri;
81 
82  QString settingsKey() const;
83 };
84 
92 class CORE_EXPORT QgsGeoNodeConnectionUtils
93 {
94  public:
95 
99  static QStringList connectionList();
100 
104  static void deleteConnection( const QString &name );
105 
109  static QString pathGeoNodeConnection();
110 
114  static QString pathGeoNodeConnectionDetails();
115 
116  private:
117 
118  // Path in QSetting
119  static const QString sPathGeoNodeConnection;
120  static const QString sPathGeoNodeConnectionDetails;
121 
122 };
123 
124 
125 #endif //QGSGEONODECONNECTION_H
Class for storing the component parts of a PostgreSQL/RDBMS datasource URI.
Encapsulates settings related to a single GeoNode connection.
Contains various utilities for managing the known collection of GeoNode servers associated with a QGI...