QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsowsconnection.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsowsconnection.h - OWS connection
3  -------------------
4  begin : 3 April 2005
5  original : (C) 2005 by Brendan Morley email : morb at ozemail dot com dot au
6  wms search : (C) 2009 Mathias Walker <mwa at sourcepole.ch>, Sourcepole AG
7 
8  generalized : (C) 2012 Radim Blazek, based on qgswmsconnection.h
9 
10 
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 #ifndef QGSOWSCONNECTION_H
23 #define QGSOWSCONNECTION_H
24 
25 #include "qgis_core.h"
26 #include "qgsdatasourceuri.h"
27 
28 #include <QStringList>
29 #include <QPushButton>
30 
35 class CORE_EXPORT QgsOwsConnection : public QObject
36 {
37  Q_OBJECT
38 
39  public:
40 
46  QgsOwsConnection( const QString &service, const QString &connName );
47 
52  QString connectionName() const;
53 
58  QString connectionInfo() const;
59 
64  QString service() const;
65 
69  QgsDataSourceUri uri() const;
70 
76  static QgsDataSourceUri &addWmsWcsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey );
77 
83  static QgsDataSourceUri &addWfsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey );
84 
86  static QStringList connectionList( const QString &service );
87 
89  static void deleteConnection( const QString &service, const QString &name );
90 
92  static QString selectedConnection( const QString &service );
94  static void setSelectedConnection( const QString &service, const QString &name );
95 
96  protected:
97  QgsDataSourceUri mUri;
98 
99  private:
100 
101  QString mConnName;
102  QString mService;
103  QString mConnectionInfo;
104 
105  static void addCommonConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey );
106 
107 };
108 
109 
110 #endif // QGSOWSCONNECTION_H
QgsDataSourceUri
Definition: qgsdatasourceuri.h:35
QgsOwsConnection
Connections management.
Definition: qgsowsconnection.h:35
qgsdatasourceuri.h