QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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 QgsSettingsEntryString settingsConnectionAuthCfg = QgsSettingsEntryString( QStringLiteral( "%1/%2/authcfg" ), QgsSettings::Prefix::QGIS )
 
static const QgsSettingsEntryEnumFlag< Qgis::DpiModesettingsConnectionDpiMode = QgsSettingsEntryEnumFlag<Qgis::DpiMode>( QStringLiteral( "connections-%1/%2/dpiMode" ), QgsSettings::Prefix::QGIS, Qgis::DpiMode::All, QString(), Qgis::SettingsOption::SaveEnumFlagAsInt )
 
static const QgsSettingsEntryBool settingsConnectionIgnoreAxisOrientation = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/ignoreAxisOrientation" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryBool settingsConnectionIgnoreGetFeatureInfoURI = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/ignoreGetFeatureInfoURI" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryBool settingsConnectionIgnoreGetMapURI = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/ignoreGetMapURI" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryBool settingsConnectionInvertAxisOrientation = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/invertAxisOrientation" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryString settingsConnectionMaxNumFeatures = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/maxnumfeatures" ), QgsSettings::Prefix::QGIS )
 
static const QgsSettingsEntryString settingsConnectionPagesize = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/pagesize" ), QgsSettings::Prefix::QGIS )
 
static const QgsSettingsEntryBool settingsConnectionPagingEnabled = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/pagingenabled" ), QgsSettings::Prefix::QGIS, true )
 
static const QgsSettingsEntryString settingsConnectionPassword = QgsSettingsEntryString( QStringLiteral( "%1/%2/password" ), QgsSettings::Prefix::QGIS )
 
static const QgsSettingsEntryBool settingsConnectionPreferCoordinatesForWfsT11 = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/preferCoordinatesForWfsT11" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryString settingsConnectionReferer = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/referer" ), QgsSettings::Prefix::QGIS, QString() )
 
static const QgsSettingsEntryBool settingsConnectionReportedLayerExtents = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/reportedLayerExtents" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryString settingsConnectionSelected = QgsSettingsEntryString( QStringLiteral( "connections-%1/selected" ), QgsSettings::Prefix::QGIS )
 
static const QgsSettingsEntryBool settingsConnectionSmoothPixmapTransform = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/smoothPixmapTransform" ), QgsSettings::Prefix::QGIS, false )
 
static const QgsSettingsEntryString settingsConnectionUrl = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/url" ), QgsSettings::Prefix::QGIS, QString() )
 
static const QgsSettingsEntryString settingsConnectionUsername = QgsSettingsEntryString( QStringLiteral( "%1/%2/username" ), QgsSettings::Prefix::QGIS )
 
static const QgsSettingsEntryString settingsConnectionVersion = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/version" ), QgsSettings::Prefix::QGIS, QString() )
 
static const QgsSettingsEntryGroup settingsServiceConnectionCredentialsGroup = QgsSettingsEntryGroup( {&settingsConnectionUsername, &settingsConnectionPassword, &settingsConnectionAuthCfg} )
 
static const QgsSettingsEntryGroup settingsServiceConnectionDetailsGroup = QgsSettingsEntryGroup( {&settingsConnectionUrl, &settingsConnectionReferer, &settingsConnectionVersion, &settingsConnectionIgnoreGetMapURI, &settingsConnectionIgnoreGetFeatureInfoURI, &settingsConnectionSmoothPixmapTransform, &settingsConnectionReportedLayerExtents, &settingsConnectionDpiMode, &settingsConnectionMaxNumFeatures, &settingsConnectionPagesize, &settingsConnectionPagingEnabled, &settingsConnectionPreferCoordinatesForWfsT11, &settingsConnectionIgnoreAxisOrientation, &settingsConnectionInvertAxisOrientation} )
 

Protected Attributes

QgsDataSourceUri mUri
 

Detailed Description

Connections management.

Definition at line 37 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 37 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 193 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 171 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 139 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 105 of file qgsowsconnection.cpp.

◆ connectionInfo()

QString QgsOwsConnection::connectionInfo ( ) const

Returns connection info string.

Since
QGIS 3.0

Definition at line 90 of file qgsowsconnection.cpp.

◆ connectionList()

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

Returns the list of connections for the specified service.

Definition at line 212 of file qgsowsconnection.cpp.

◆ connectionName()

QString QgsOwsConnection::connectionName ( ) const

Returns the connection name.

Since
QGIS 3.0

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

◆ selectedConnection()

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

Retrieves the selected connection for the specified service.

Definition at line 219 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 95 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 225 of file qgsowsconnection.cpp.

◆ uri()

QgsDataSourceUri QgsOwsConnection::uri ( ) const

Returns the connection uri.

Definition at line 100 of file qgsowsconnection.cpp.

Member Data Documentation

◆ mUri

QgsDataSourceUri QgsOwsConnection::mUri
protected

Definition at line 139 of file qgsowsconnection.h.

◆ settingsConnectionAuthCfg

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionAuthCfg = QgsSettingsEntryString( QStringLiteral( "%1/%2/authcfg" ), QgsSettings::Prefix::QGIS )
inlinestatic

Definition at line 62 of file qgsowsconnection.h.

◆ settingsConnectionDpiMode

const QgsSettingsEntryEnumFlag<Qgis::DpiMode> QgsOwsConnection::settingsConnectionDpiMode = QgsSettingsEntryEnumFlag<Qgis::DpiMode>( QStringLiteral( "connections-%1/%2/dpiMode" ), QgsSettings::Prefix::QGIS, Qgis::DpiMode::All, QString(), Qgis::SettingsOption::SaveEnumFlagAsInt )
inlinestatic

Definition at line 52 of file qgsowsconnection.h.

◆ settingsConnectionIgnoreAxisOrientation

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionIgnoreAxisOrientation = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/ignoreAxisOrientation" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 57 of file qgsowsconnection.h.

◆ settingsConnectionIgnoreGetFeatureInfoURI

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionIgnoreGetFeatureInfoURI = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/ignoreGetFeatureInfoURI" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 49 of file qgsowsconnection.h.

◆ settingsConnectionIgnoreGetMapURI

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionIgnoreGetMapURI = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/ignoreGetMapURI" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 48 of file qgsowsconnection.h.

◆ settingsConnectionInvertAxisOrientation

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionInvertAxisOrientation = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/invertAxisOrientation" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 58 of file qgsowsconnection.h.

◆ settingsConnectionMaxNumFeatures

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionMaxNumFeatures = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/maxnumfeatures" ), QgsSettings::Prefix::QGIS )
inlinestatic

Definition at line 53 of file qgsowsconnection.h.

◆ settingsConnectionPagesize

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionPagesize = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/pagesize" ), QgsSettings::Prefix::QGIS )
inlinestatic

Definition at line 54 of file qgsowsconnection.h.

◆ settingsConnectionPagingEnabled

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionPagingEnabled = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/pagingenabled" ), QgsSettings::Prefix::QGIS, true )
inlinestatic

Definition at line 55 of file qgsowsconnection.h.

◆ settingsConnectionPassword

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionPassword = QgsSettingsEntryString( QStringLiteral( "%1/%2/password" ), QgsSettings::Prefix::QGIS )
inlinestatic

Definition at line 61 of file qgsowsconnection.h.

◆ settingsConnectionPreferCoordinatesForWfsT11

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionPreferCoordinatesForWfsT11 = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/preferCoordinatesForWfsT11" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 56 of file qgsowsconnection.h.

◆ settingsConnectionReferer

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionReferer = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/referer" ), QgsSettings::Prefix::QGIS, QString() )
inlinestatic

Definition at line 46 of file qgsowsconnection.h.

◆ settingsConnectionReportedLayerExtents

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionReportedLayerExtents = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/reportedLayerExtents" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 51 of file qgsowsconnection.h.

◆ settingsConnectionSelected

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionSelected = QgsSettingsEntryString( QStringLiteral( "connections-%1/selected" ), QgsSettings::Prefix::QGIS )
inlinestatic

Definition at line 43 of file qgsowsconnection.h.

◆ settingsConnectionSmoothPixmapTransform

const QgsSettingsEntryBool QgsOwsConnection::settingsConnectionSmoothPixmapTransform = QgsSettingsEntryBool( QStringLiteral( "connections-%1/%2/smoothPixmapTransform" ), QgsSettings::Prefix::QGIS, false )
inlinestatic

Definition at line 50 of file qgsowsconnection.h.

◆ settingsConnectionUrl

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionUrl = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/url" ), QgsSettings::Prefix::QGIS, QString() )
inlinestatic

Definition at line 45 of file qgsowsconnection.h.

◆ settingsConnectionUsername

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionUsername = QgsSettingsEntryString( QStringLiteral( "%1/%2/username" ), QgsSettings::Prefix::QGIS )
inlinestatic

Definition at line 60 of file qgsowsconnection.h.

◆ settingsConnectionVersion

const QgsSettingsEntryString QgsOwsConnection::settingsConnectionVersion = QgsSettingsEntryString( QStringLiteral( "connections-%1/%2/version" ), QgsSettings::Prefix::QGIS, QString() )
inlinestatic

Definition at line 47 of file qgsowsconnection.h.

◆ settingsServiceConnectionCredentialsGroup

const QgsSettingsEntryGroup QgsOwsConnection::settingsServiceConnectionCredentialsGroup = QgsSettingsEntryGroup( {&settingsConnectionUsername, &settingsConnectionPassword, &settingsConnectionAuthCfg} )
inlinestatic

Definition at line 65 of file qgsowsconnection.h.

◆ settingsServiceConnectionDetailsGroup

Definition at line 64 of file qgsowsconnection.h.


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