QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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. More...
 
QString connectionInfo () const
 Returns connection info string. More...
 
QString connectionName () const
 Returns the connection name. More...
 
QString service () const
 Returns a string representing the service type, e.g. More...
 
QgsDataSourceUri uri () const
 Returns the connection uri. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
static QStringList connectionList (const QString &service)
 Returns the list of connections for the specified service. More...
 
static void deleteConnection (const QString &service, const QString &name)
 Deletes the connection for the specified service with the specified name. More...
 
static QString selectedConnection (const QString &service)
 Retrieves the selected connection for the specified service. More...
 
static void setSelectedConnection (const QString &service, const QString &name)
 Marks the specified connection for the specified service as selected. More...
 

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 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 QgsSettingsEntryBoolsettingsPagingEnabled = new QgsSettingsEntryBool( QStringLiteral( "paging-enabled" ), sTreeOwsConnections, true )
 
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 89 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 77 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 240 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.

Since
QGIS 3.0
Deprecated:
since QGIS 3.26 use addWfsConnectionSettings with service and connection name parameters

Definition at line 218 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 184 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.

Since
QGIS 3.0
Deprecated:
since QGIS 3.26 use addWmsWcsConnectionSettings with service and connection name parameters

Definition at line 145 of file qgsowsconnection.cpp.

◆ connectionInfo()

QString QgsOwsConnection::connectionInfo ( ) const

Returns connection info string.

Since
QGIS 3.0

Definition at line 130 of file qgsowsconnection.cpp.

◆ connectionList()

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

Returns the list of connections for the specified service.

Definition at line 259 of file qgsowsconnection.cpp.

◆ connectionName()

QString QgsOwsConnection::connectionName ( ) const

Returns the connection name.

Since
QGIS 3.0

Definition at line 125 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 301 of file qgsowsconnection.cpp.

◆ selectedConnection()

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

Retrieves the selected connection for the specified service.

Definition at line 264 of file qgsowsconnection.cpp.

◆ service()

QString QgsOwsConnection::service ( ) const

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

"WMS".

Since
QGIS 3.0

Definition at line 135 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 269 of file qgsowsconnection.cpp.

◆ uri()

QgsDataSourceUri QgsOwsConnection::uri ( ) const

Returns the connection uri.

Definition at line 140 of file qgsowsconnection.cpp.

Member Data Documentation

◆ mUri

QgsDataSourceUri QgsOwsConnection::mUri
protected

Definition at line 192 of file qgsowsconnection.h.

◆ settingsAuthCfg

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

Definition at line 116 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 106 of file qgsowsconnection.h.

◆ settingsHeaders

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

Definition at line 100 of file qgsowsconnection.h.

◆ settingsIgnoreAxisOrientation

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

Definition at line 112 of file qgsowsconnection.h.

◆ settingsIgnoreGetFeatureInfoURI

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

Definition at line 103 of file qgsowsconnection.h.

◆ settingsIgnoreGetMapURI

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

Definition at line 102 of file qgsowsconnection.h.

◆ settingsInvertAxisOrientation

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

Definition at line 113 of file qgsowsconnection.h.

◆ settingsMaxNumFeatures

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

Definition at line 108 of file qgsowsconnection.h.

◆ settingsPagesize

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

Definition at line 109 of file qgsowsconnection.h.

◆ settingsPagingEnabled

const QgsSettingsEntryBool * QgsOwsConnection::settingsPagingEnabled = new QgsSettingsEntryBool( QStringLiteral( "paging-enabled" ), sTreeOwsConnections, true )
static

Definition at line 110 of file qgsowsconnection.h.

◆ settingsPassword

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

Definition at line 115 of file qgsowsconnection.h.

◆ settingsPreferCoordinatesForWfsT11

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

Definition at line 111 of file qgsowsconnection.h.

◆ settingsReportedLayerExtents

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

Definition at line 105 of file qgsowsconnection.h.

◆ settingsSmoothPixmapTransform

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

Definition at line 104 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 107 of file qgsowsconnection.h.

◆ settingsUrl

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

Definition at line 99 of file qgsowsconnection.h.

◆ settingsUsername

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

Definition at line 114 of file qgsowsconnection.h.

◆ settingsVersion

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

Definition at line 101 of file qgsowsconnection.h.

◆ sTreeOwsConnections

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

Definition at line 97 of file qgsowsconnection.h.

◆ sTtreeOwsServices

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

Definition at line 96 of file qgsowsconnection.h.


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