QGIS API Documentation 3.41.0-Master (092dc69654e)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
QgsOwsConnection Class Reference

Connections management. More...

#include <qgsowsconnection.h>

Inheritance diagram for QgsOwsConnection:
Inheritance graph
[legend]

Public Member Functions

 QgsOwsConnection (const QString &service, const QString &connName)
 Constructor.
 
QString connectionInfo () const
 Returns connection info string.
 
QString connectionName () const
 Returns the connection name.
 
QString service () const
 Returns a string representing the service type, e.g.
 
QgsDataSourceUri uri () const
 Returns the connection uri.
 

Static Public Member Functions

static QgsDataSourceUriaddWfsConnectionSettings (QgsDataSourceUri &uri, const QString &service, const QString &connName)
 Adds uri parameters relating to the settings for a WFS connection to a QgsDataSourceUri uri.
 
static Q_DECL_DEPRECATED QgsDataSourceUriaddWfsConnectionSettings (QgsDataSourceUri &uri, const QString &settingsKey)
 Adds uri parameters relating to the settings for a WFS connection to a QgsDataSourceUri uri.
 
static QgsDataSourceUriaddWmsWcsConnectionSettings (QgsDataSourceUri &uri, const QString &service, const QString &connName)
 Adds uri parameters relating to the settings for a WMS or WCS connection to a QgsDataSourceUri uri.
 
static Q_DECL_DEPRECATED QgsDataSourceUriaddWmsWcsConnectionSettings (QgsDataSourceUri &uri, const QString &settingsKey)
 Adds uri parameters relating to the settings for a WMS or WCS connection to a QgsDataSourceUri uri.
 
static QStringList connectionList (const QString &service)
 Returns the list of connections for the specified service.
 
static void deleteConnection (const QString &service, const QString &name)
 Deletes the connection for the specified service with the specified name.
 
static QString selectedConnection (const QString &service)
 Retrieves the selected connection for the specified service.
 
static void setSelectedConnection (const QString &service, const QString &name)
 Marks the specified connection for the specified service as selected.
 

Static Public Attributes

static const QgsSettingsEntryStringsettingsAuthCfg = new QgsSettingsEntryString( QStringLiteral( "authcfg" ), sTreeOwsConnections )
 
static const QgsSettingsEntryEnumFlag< Qgis::DpiMode > * settingsDpiMode = new QgsSettingsEntryEnumFlag<Qgis::DpiMode>( QStringLiteral( "dpi-mode" ), sTreeOwsConnections, Qgis::DpiMode::All, QString(), Qgis::SettingsOption::SaveEnumFlagAsInt )
 
static const QgsSettingsEntryIntegersettingsFeatureCount = new QgsSettingsEntryInteger( QStringLiteral( "feature-count" ), sTreeOwsConnections, 10 )
 
static const QgsSettingsEntryVariantMapsettingsHeaders = new QgsSettingsEntryVariantMap( QStringLiteral( "http-header" ), sTreeOwsConnections )
 
static const QgsSettingsEntryBoolsettingsIgnoreAxisOrientation = new QgsSettingsEntryBool( QStringLiteral( "ignore-axis-orientation" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryBoolsettingsIgnoreGetFeatureInfoURI = new QgsSettingsEntryBool( QStringLiteral( "ignore-get-feature-info-uri" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryBoolsettingsIgnoreGetMapURI = new QgsSettingsEntryBool( QStringLiteral( "ignore-get-map-uri" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryBoolsettingsInvertAxisOrientation = new QgsSettingsEntryBool( QStringLiteral( "invert-axis-orientation" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryStringsettingsMaxNumFeatures = new QgsSettingsEntryString( QStringLiteral( "max-num-features" ), sTreeOwsConnections )
 
static const QgsSettingsEntryStringsettingsPagesize = new QgsSettingsEntryString( QStringLiteral( "page-size" ), sTreeOwsConnections )
 
static const QgsSettingsEntryStringsettingsPagingEnabled = new QgsSettingsEntryString( QStringLiteral( "paging-enabled" ), sTreeOwsConnections, QString( "default" ) )
 
static const QgsSettingsEntryStringsettingsPassword = new QgsSettingsEntryString( QStringLiteral( "password" ), sTreeOwsConnections )
 
static const QgsSettingsEntryBoolsettingsPreferCoordinatesForWfsT11 = new QgsSettingsEntryBool( QStringLiteral( "prefer-coordinates-for-wfs-T11" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryBoolsettingsReportedLayerExtents = new QgsSettingsEntryBool( QStringLiteral( "reported-layer-extents" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryBoolsettingsSmoothPixmapTransform = new QgsSettingsEntryBool( QStringLiteral( "smooth-pixmap-transform" ), sTreeOwsConnections, false )
 
static const QgsSettingsEntryEnumFlag< Qgis::TilePixelRatio > * settingsTilePixelRatio = new QgsSettingsEntryEnumFlag<Qgis::TilePixelRatio>( QStringLiteral( "tile-pixel-ratio" ), sTreeOwsConnections, Qgis::TilePixelRatio::Undefined, QString(), Qgis::SettingsOption::SaveEnumFlagAsInt )
 
static const QgsSettingsEntryStringsettingsUrl = new QgsSettingsEntryString( QStringLiteral( "url" ), sTreeOwsConnections, QString() )
 
static const QgsSettingsEntryStringsettingsUsername = new QgsSettingsEntryString( QStringLiteral( "username" ), sTreeOwsConnections )
 
static const QgsSettingsEntryStringsettingsVersion = new QgsSettingsEntryString( QStringLiteral( "version" ), sTreeOwsConnections, QString() )
 
static QgsSettingsTreeNamedListNodesTreeOwsConnections = sTtreeOwsServices->createNamedListNode( QStringLiteral( "connections" ), Qgis::SettingsTreeNodeOption::NamedListSelectedItemSetting )
 
static QgsSettingsTreeNamedListNodesTtreeOwsServices = QgsSettingsTree::sTreeConnections->createNamedListNode( QStringLiteral( "ows" ) )
 

Protected Attributes

QgsDataSourceUri mUri
 

Detailed Description

Connections management.

Definition at line 90 of file qgsowsconnection.h.

Constructor & Destructor Documentation

◆ QgsOwsConnection()

QgsOwsConnection::QgsOwsConnection ( const QString &  service,
const QString &  connName 
)

Constructor.

Parameters
serviceservice name: WMS,WFS,WCS
connNameconnection name

Definition at line 80 of file qgsowsconnection.cpp.

Member Function Documentation

◆ addWfsConnectionSettings() [1/2]

QgsDataSourceUri & QgsOwsConnection::addWfsConnectionSettings ( QgsDataSourceUri uri,
const QString &  service,
const QString &  connName 
)
static

Adds uri parameters relating to the settings for a WFS connection to a QgsDataSourceUri uri.

Connection settings are taken from the specified servcie and connName

Since
QGIS 3.26

Definition at line 247 of file qgsowsconnection.cpp.

◆ addWfsConnectionSettings() [2/2]

QgsDataSourceUri & QgsOwsConnection::addWfsConnectionSettings ( QgsDataSourceUri uri,
const QString &  settingsKey 
)
static

Adds uri parameters relating to the settings for a WFS connection to a QgsDataSourceUri uri.

Connection settings are taken from the specified QSettings settingsKey.

Deprecated:
QGIS 3.26. Use addWfsConnectionSettings with service and connection name parameters.

Definition at line 225 of file qgsowsconnection.cpp.

◆ addWmsWcsConnectionSettings() [1/2]

QgsDataSourceUri & QgsOwsConnection::addWmsWcsConnectionSettings ( QgsDataSourceUri uri,
const QString &  service,
const QString &  connName 
)
static

Adds uri parameters relating to the settings for a WMS or WCS connection to a QgsDataSourceUri uri.

Connection settings are taken from the specified servcie and connName

Since
QGIS 3.26

Definition at line 187 of file qgsowsconnection.cpp.

◆ addWmsWcsConnectionSettings() [2/2]

QgsDataSourceUri & QgsOwsConnection::addWmsWcsConnectionSettings ( QgsDataSourceUri uri,
const QString &  settingsKey 
)
static

Adds uri parameters relating to the settings for a WMS or WCS connection to a QgsDataSourceUri uri.

Connection settings are taken from the specified QSettings settingsKey.

Deprecated:
QGIS 3.26. Use addWmsWcsConnectionSettings with service and connection name parameters.

Definition at line 148 of file qgsowsconnection.cpp.

◆ connectionInfo()

QString QgsOwsConnection::connectionInfo ( ) const

Returns connection info string.

Definition at line 133 of file qgsowsconnection.cpp.

◆ connectionList()

QStringList QgsOwsConnection::connectionList ( const QString &  service)
static

Returns the list of connections for the specified service.

Definition at line 266 of file qgsowsconnection.cpp.

◆ connectionName()

QString QgsOwsConnection::connectionName ( ) const

Returns the connection name.

Definition at line 128 of file qgsowsconnection.cpp.

◆ deleteConnection()

void QgsOwsConnection::deleteConnection ( const QString &  service,
const QString &  name 
)
static

Deletes the connection for the specified service with the specified name.

Definition at line 308 of file qgsowsconnection.cpp.

◆ selectedConnection()

QString QgsOwsConnection::selectedConnection ( const QString &  service)
static

Retrieves the selected connection for the specified service.

Definition at line 271 of file qgsowsconnection.cpp.

◆ service()

QString QgsOwsConnection::service ( ) const

Returns a string representing the service type, e.g.

"WMS".

Definition at line 138 of file qgsowsconnection.cpp.

◆ setSelectedConnection()

void QgsOwsConnection::setSelectedConnection ( const QString &  service,
const QString &  name 
)
static

Marks the specified connection for the specified service as selected.

Definition at line 276 of file qgsowsconnection.cpp.

◆ uri()

QgsDataSourceUri QgsOwsConnection::uri ( ) const

Returns the connection uri.

Definition at line 143 of file qgsowsconnection.cpp.

Member Data Documentation

◆ mUri

QgsDataSourceUri QgsOwsConnection::mUri
protected

Definition at line 189 of file qgsowsconnection.h.

◆ settingsAuthCfg

const QgsSettingsEntryString * QgsOwsConnection::settingsAuthCfg = new QgsSettingsEntryString( QStringLiteral( "authcfg" ), sTreeOwsConnections )
static

Definition at line 117 of file qgsowsconnection.h.

◆ settingsDpiMode

const QgsSettingsEntryEnumFlag< Qgis::DpiMode > * QgsOwsConnection::settingsDpiMode = new QgsSettingsEntryEnumFlag<Qgis::DpiMode>( QStringLiteral( "dpi-mode" ), sTreeOwsConnections, Qgis::DpiMode::All, QString(), Qgis::SettingsOption::SaveEnumFlagAsInt )
static

Definition at line 107 of file qgsowsconnection.h.

◆ settingsFeatureCount

const QgsSettingsEntryInteger * QgsOwsConnection::settingsFeatureCount = new QgsSettingsEntryInteger( QStringLiteral( "feature-count" ), sTreeOwsConnections, 10 )
static

Definition at line 118 of file qgsowsconnection.h.

◆ settingsHeaders

const QgsSettingsEntryVariantMap * QgsOwsConnection::settingsHeaders = new QgsSettingsEntryVariantMap( QStringLiteral( "http-header" ), sTreeOwsConnections )
static

Definition at line 101 of file qgsowsconnection.h.

◆ settingsIgnoreAxisOrientation

const QgsSettingsEntryBool * QgsOwsConnection::settingsIgnoreAxisOrientation = new QgsSettingsEntryBool( QStringLiteral( "ignore-axis-orientation" ), sTreeOwsConnections, false )
static

Definition at line 113 of file qgsowsconnection.h.

◆ settingsIgnoreGetFeatureInfoURI

const QgsSettingsEntryBool * QgsOwsConnection::settingsIgnoreGetFeatureInfoURI = new QgsSettingsEntryBool( QStringLiteral( "ignore-get-feature-info-uri" ), sTreeOwsConnections, false )
static

Definition at line 104 of file qgsowsconnection.h.

◆ settingsIgnoreGetMapURI

const QgsSettingsEntryBool * QgsOwsConnection::settingsIgnoreGetMapURI = new QgsSettingsEntryBool( QStringLiteral( "ignore-get-map-uri" ), sTreeOwsConnections, false )
static

Definition at line 103 of file qgsowsconnection.h.

◆ settingsInvertAxisOrientation

const QgsSettingsEntryBool * QgsOwsConnection::settingsInvertAxisOrientation = new QgsSettingsEntryBool( QStringLiteral( "invert-axis-orientation" ), sTreeOwsConnections, false )
static

Definition at line 114 of file qgsowsconnection.h.

◆ settingsMaxNumFeatures

const QgsSettingsEntryString * QgsOwsConnection::settingsMaxNumFeatures = new QgsSettingsEntryString( QStringLiteral( "max-num-features" ), sTreeOwsConnections )
static

Definition at line 109 of file qgsowsconnection.h.

◆ settingsPagesize

const QgsSettingsEntryString * QgsOwsConnection::settingsPagesize = new QgsSettingsEntryString( QStringLiteral( "page-size" ), sTreeOwsConnections )
static

Definition at line 110 of file qgsowsconnection.h.

◆ settingsPagingEnabled

const QgsSettingsEntryString * QgsOwsConnection::settingsPagingEnabled = new QgsSettingsEntryString( QStringLiteral( "paging-enabled" ), sTreeOwsConnections, QString( "default" ) )
static

Definition at line 111 of file qgsowsconnection.h.

◆ settingsPassword

const QgsSettingsEntryString * QgsOwsConnection::settingsPassword = new QgsSettingsEntryString( QStringLiteral( "password" ), sTreeOwsConnections )
static

Definition at line 116 of file qgsowsconnection.h.

◆ settingsPreferCoordinatesForWfsT11

const QgsSettingsEntryBool * QgsOwsConnection::settingsPreferCoordinatesForWfsT11 = new QgsSettingsEntryBool( QStringLiteral( "prefer-coordinates-for-wfs-T11" ), sTreeOwsConnections, false )
static

Definition at line 112 of file qgsowsconnection.h.

◆ settingsReportedLayerExtents

const QgsSettingsEntryBool * QgsOwsConnection::settingsReportedLayerExtents = new QgsSettingsEntryBool( QStringLiteral( "reported-layer-extents" ), sTreeOwsConnections, false )
static

Definition at line 106 of file qgsowsconnection.h.

◆ settingsSmoothPixmapTransform

const QgsSettingsEntryBool * QgsOwsConnection::settingsSmoothPixmapTransform = new QgsSettingsEntryBool( QStringLiteral( "smooth-pixmap-transform" ), sTreeOwsConnections, false )
static

Definition at line 105 of file qgsowsconnection.h.

◆ settingsTilePixelRatio

const QgsSettingsEntryEnumFlag< Qgis::TilePixelRatio > * QgsOwsConnection::settingsTilePixelRatio = new QgsSettingsEntryEnumFlag<Qgis::TilePixelRatio>( QStringLiteral( "tile-pixel-ratio" ), sTreeOwsConnections, Qgis::TilePixelRatio::Undefined, QString(), Qgis::SettingsOption::SaveEnumFlagAsInt )
static

Definition at line 108 of file qgsowsconnection.h.

◆ settingsUrl

const QgsSettingsEntryString * QgsOwsConnection::settingsUrl = new QgsSettingsEntryString( QStringLiteral( "url" ), sTreeOwsConnections, QString() )
static

Definition at line 100 of file qgsowsconnection.h.

◆ settingsUsername

const QgsSettingsEntryString * QgsOwsConnection::settingsUsername = new QgsSettingsEntryString( QStringLiteral( "username" ), sTreeOwsConnections )
static

Definition at line 115 of file qgsowsconnection.h.

◆ settingsVersion

const QgsSettingsEntryString * QgsOwsConnection::settingsVersion = new QgsSettingsEntryString( QStringLiteral( "version" ), sTreeOwsConnections, QString() )
static

Definition at line 102 of file qgsowsconnection.h.

◆ sTreeOwsConnections

QgsSettingsTreeNamedListNode* QgsOwsConnection::sTreeOwsConnections = sTtreeOwsServices->createNamedListNode( QStringLiteral( "connections" ), Qgis::SettingsTreeNodeOption::NamedListSelectedItemSetting )
inlinestatic

Definition at line 98 of file qgsowsconnection.h.

◆ sTtreeOwsServices

QgsSettingsTreeNamedListNode* QgsOwsConnection::sTtreeOwsServices = QgsSettingsTree::sTreeConnections->createNamedListNode( QStringLiteral( "ows" ) )
inlinestatic

Definition at line 97 of file qgsowsconnection.h.


The documentation for this class was generated from the following files: