QGIS API Documentation
3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
src
core
providers
sensorthings
qgssensorthingsconnection.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssensorthingsconnection.h
3
---------------------
4
Date : December 2023
5
Copyright : (C) 2023 by Nyall Dawson
6
Email : nyall dot dawson at gmail 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 QGSSENSORTHINGSCONNECTION_H
17
18
#define SIP_NO_FILE
19
20
#include <QStringList>
21
22
#include "
qgshttpheaders.h
"
23
#include "qgis_core.h"
24
#include "
qgssettingstree.h
"
25
#include "
qgsabstractproviderconnection.h
"
26
27
class
QgsSettingsEntryBool
;
28
class
QgsSettingsEntryDouble
;
29
class
QgsSettingsEntryInteger
;
30
class
QgsSettingsEntryString
;
31
class
QgsSettingsEntryVariantMap
;
32
template
<
class
T>
class
QgsSettingsEntryEnumFlag
;
33
42
class
CORE_EXPORT
QgsSensorThingsProviderConnection
:
public
QgsAbstractProviderConnection
43
{
44
45
public
:
46
48
static
inline
QgsSettingsTreeNamedListNode
*sTreeSensorThingsConnections =
QgsSettingsTree::sTreeConnections
->
createNamedListNode
(
49
QStringLiteral(
"sensorthings"
),
Qgis::SettingsTreeNodeOption::NamedListSelectedItemSetting
);
50
51
static
const
QgsSettingsEntryString
*settingsUrl;
52
static
const
QgsSettingsEntryVariantMap
*settingsHeaders;
53
static
const
QgsSettingsEntryString
*settingsUsername;
54
static
const
QgsSettingsEntryString
*settingsPassword;
55
static
const
QgsSettingsEntryString
*settingsAuthcfg;
57
61
QgsSensorThingsProviderConnection
(
const
QString &name );
62
66
QgsSensorThingsProviderConnection
(
const
QString &uri,
const
QVariantMap &configuration );
67
68
void
store
(
const
QString &name )
const
final
;
69
void
remove
(
const
QString &name )
const
final
;
70
79
struct
Data
80
{
82
QString
url
;
84
QString
authCfg
;
86
QString
username
;
88
QString
password
;
90
QgsHttpHeaders
httpHeaders
;
91
};
92
99
static
QString encodedUri(
const
Data
&data );
100
107
static
Data
decodedUri(
const
QString &uri );
108
115
static
QString encodedLayerUri(
const
Data
&data );
116
120
static
QStringList connectionList();
121
125
static
Data
connection(
const
QString &name );
126
130
static
void
addConnection(
const
QString &name,
const
Data
&connection );
131
137
static
QString selectedConnection();
138
144
static
void
setSelectedConnection(
const
QString &name );
145
};
146
147
148
#endif
// QGSSENSORTHINGSCONNECTION_H
Qgis::SettingsTreeNodeOption::NamedListSelectedItemSetting
@ NamedListSelectedItemSetting
Creates a setting to store which is the current item.
QgsAbstractProviderConnection
The QgsAbstractProviderConnection provides an interface for data provider connections.
Definition
qgsabstractproviderconnection.h:43
QgsAbstractProviderConnection::remove
virtual void remove(const QString &name) const =0
Deletes the connection from the settings.
QgsAbstractProviderConnection::store
virtual void store(const QString &name) const =0
Stores the connection in the settings.
QgsHttpHeaders
This class implements simple http header management.
Definition
qgshttpheaders.h:42
QgsSensorThingsProviderConnection
Represents connections to SensorThings data sources.
Definition
qgssensorthingsconnection.h:43
QgsSettingsEntryBool
A boolean settings entry.
Definition
qgssettingsentryimpl.h:305
QgsSettingsEntryDouble
A double settings entry.
Definition
qgssettingsentryimpl.h:563
QgsSettingsEntryEnumFlag
A template class for enum and flag settings entry.
Definition
qgssettingsentryenumflag.h:36
QgsSettingsEntryInteger
An integer settings entry.
Definition
qgssettingsentryimpl.h:379
QgsSettingsEntryString
A string settings entry.
Definition
qgssettingsentryimpl.h:127
QgsSettingsEntryVariantMap
A string list settings entry.
Definition
qgssettingsentryimpl.h:797
QgsSettingsTreeNamedListNode
QgsSettingsTreeNamedListNode is a named list tree node for the settings tree to help organizing and i...
Definition
qgssettingstreenode.h:190
QgsSettingsTreeNode::createNamedListNode
QgsSettingsTreeNamedListNode * createNamedListNode(const QString &key, const Qgis::SettingsTreeNodeOptions &options=Qgis::SettingsTreeNodeOptions())
Creates a named list tree node.
Definition
qgssettingstreenode.cpp:57
QgsSettingsTree::sTreeConnections
static QgsSettingsTreeNode * sTreeConnections
Definition
qgssettingstree.h:44
qgsabstractproviderconnection.h
qgshttpheaders.h
qgssettingstree.h
QgsSensorThingsProviderConnection::Data
Represents decoded data of a SensorThings connection.
Definition
qgssensorthingsconnection.h:80
QgsSensorThingsProviderConnection::Data::password
QString password
HTTP Basic password.
Definition
qgssensorthingsconnection.h:88
QgsSensorThingsProviderConnection::Data::url
QString url
Source URI.
Definition
qgssensorthingsconnection.h:82
QgsSensorThingsProviderConnection::Data::username
QString username
HTTP Basic username.
Definition
qgssensorthingsconnection.h:86
QgsSensorThingsProviderConnection::Data::httpHeaders
QgsHttpHeaders httpHeaders
HTTP headers.
Definition
qgssensorthingsconnection.h:90
QgsSensorThingsProviderConnection::Data::authCfg
QString authCfg
Authentication configuration id.
Definition
qgssensorthingsconnection.h:84
Generated on Thu Jun 27 2024 20:32:11 for QGIS API Documentation by
1.9.8