QGIS API Documentation 3.99.0-Master (d270888f95f)
Loading...
Searching...
No Matches
QgsNewHttpConnection Class Reference

Dialog to allow the user to configure and save connection information for an HTTP Server for WMS, etc. More...

#include <qgsnewhttpconnection.h>

Inheritance diagram for QgsNewHttpConnection:

Public Types

enum  ConnectionType { ConnectionWfs = 1 << 1 , ConnectionWms = 1 << 2 , ConnectionWcs = 1 << 3 , ConnectionOther = 1 << 4 }
 Available connection types for configuring in the dialog. More...
typedef QFlags< ConnectionTypeConnectionTypes
enum  Flag { FlagShowTestConnection = 1 << 1 , FlagHideAuthenticationGroup = 1 << 2 , FlagShowHttpSettings = 1 << 3 }
 Flags controlling dialog behavior. More...
typedef QFlags< FlagFlags

Public Slots

void accept () override

Public Member Functions

 QgsNewHttpConnection (QWidget *parent=nullptr, QgsNewHttpConnection::ConnectionTypes types=ConnectionWms, const QString &serviceName="WMS", const QString &connectionName=QString(), QgsNewHttpConnection::Flags flags=QgsNewHttpConnection::Flags(), Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
 Constructor for QgsNewHttpConnection.
QString name () const
 Returns the current connection name.
QString originalConnectionName () const
 Returns the original connection name (might be empty).
QString url () const
 Returns the current connection url.

Static Public Attributes

static const QgsSettingsEntryBoolsettingsIgnoreReportedLayerExtentsDefault = new QgsSettingsEntryBool( u"ignore-reported-layer-extents-default"_s, sTreeHttpConnectionDialog, false )
static QgsSettingsTreeNodesTreeHttpConnectionDialog = QgsSettingsTree::sTreeConnections->createChildNode( u"http-connection-dialog"_s )

Protected Types

enum class  WfsFeaturePagingIndex { DEFAULT = 0 , ENABLED = 1 , DISABLED = 2 }
 Index of wfsFeaturePaging. More...
enum  WfsVersionIndex {
  WFS_VERSION_MAX = 0 , WFS_VERSION_1_0 = 1 , WFS_VERSION_1_1 = 2 , WFS_VERSION_2_0 = 3 ,
  WFS_VERSION_API_FEATURES_1_0 = 4
}
 Index of wfsVersionComboBox. More...

Protected Member Functions

QgsAuthorizationSettings authorizationSettings () const
 Returns the authorization settings.
QgsAuthSettingsWidgetauthSettingsWidget ()
 Returns the current authentication settings widget.
QComboBox * featureFormatComboBox ()
 Returns the "Feature format" combobox.
QPushButton * featureFormatDetectButton ()
 Returns the "Feature format detect" button.
bool ignoreAxisOrientation () const
 Returns the ignore axis orientation checkbox status.
bool invertAxisOrientation () const
 Returns the invert axis orientation checkbox status.
Qgis::HttpMethod preferredHttpMethod () const
 Returns the selected preferred HTTP method.
void showEvent (QShowEvent *event) override
 Adjust height of dialog to fit the content.
QPushButton * testConnectButton ()
 Returns the "test connection" button.
void updateServiceSpecificSettings ()
 Triggers a resync of the GUI widgets for the service specific settings (i.e.
QUrl urlTrimmed () const
 Returns the url.
virtual bool validate ()
 Returns true if dialog settings are valid, or false if current settings are not valid and the dialog should not be acceptable.
QLineEdit * wfsPageSizeLineEdit ()
 Returns the "WFS page size" edit.
QComboBox * wfsPagingComboBox ()
 Returns the "WFS paging" combobox.
virtual QString wfsSettingsKey (const QString &base, const QString &connectionName) const
 Returns the QSettings key for WFS related settings for the connection.
QCheckBox * wfsUseGml2EncodingForTransactions ()
 Returns the "Use GML2 encoding for transactions" checkbox.
QComboBox * wfsVersionComboBox ()
 Returns the "WFS version" combobox.
QPushButton * wfsVersionDetectButton ()
 Returns the "WFS version detect" button.
QPushButton * wmsFormatDetectButton ()
 Returns the WMS Format Detect Button.
QComboBox * wmsPreferredFormatCombo () const
 Returns the "WMS preferred format" combobox.
virtual QString wmsSettingsKey (const QString &base, const QString &connectionName) const
 Returns the QSettings key for WMS related settings for the connection.

Detailed Description

Dialog to allow the user to configure and save connection information for an HTTP Server for WMS, etc.

Definition at line 41 of file qgsnewhttpconnection.h.

Member Typedef Documentation

◆ ConnectionTypes

Definition at line 62 of file qgsnewhttpconnection.h.

◆ Flags

typedef QFlags< Flag > QgsNewHttpConnection::Flags

Definition at line 73 of file qgsnewhttpconnection.h.

Member Enumeration Documentation

◆ ConnectionType

Available connection types for configuring in the dialog.

Enumerator
ConnectionWfs 

WFS connection.

ConnectionWms 

WMS connection.

ConnectionWcs 

WCS connection.

ConnectionOther 

Other connection type.

Definition at line 55 of file qgsnewhttpconnection.h.

◆ Flag

Flags controlling dialog behavior.

Enumerator
FlagShowTestConnection 

Display the 'test connection' button.

FlagHideAuthenticationGroup 

Hide the Authentication group.

FlagShowHttpSettings 

Display the 'http' group.

Definition at line 67 of file qgsnewhttpconnection.h.

◆ WfsFeaturePagingIndex

enum class QgsNewHttpConnection::WfsFeaturePagingIndex
strongprotected

Index of wfsFeaturePaging.

Enumerator
DEFAULT 
ENABLED 
DISABLED 

Definition at line 130 of file qgsnewhttpconnection.h.

◆ WfsVersionIndex

Index of wfsVersionComboBox.

Enumerator
WFS_VERSION_MAX 
WFS_VERSION_1_0 
WFS_VERSION_1_1 
WFS_VERSION_2_0 
WFS_VERSION_API_FEATURES_1_0 

Definition at line 119 of file qgsnewhttpconnection.h.

Constructor & Destructor Documentation

◆ QgsNewHttpConnection()

QgsNewHttpConnection::QgsNewHttpConnection ( QWidget * parent = nullptr,
QgsNewHttpConnection::ConnectionTypes types = ConnectionWms,
const QString & serviceName = "WMS",
const QString & connectionName = QString(),
QgsNewHttpConnection::Flags flags = QgsNewHttpConnection::Flags(),
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags )

Constructor for QgsNewHttpConnection.

The types argument dictates which connection type settings should be shown in the dialog.

The flags argument allows specifying flags which control the dialog behavior and appearance.

Definition at line 42 of file qgsnewhttpconnection.cpp.

Member Function Documentation

◆ accept

void QgsNewHttpConnection::accept ( )
overrideslot

Definition at line 479 of file qgsnewhttpconnection.cpp.

◆ authorizationSettings()

QgsAuthorizationSettings QgsNewHttpConnection::authorizationSettings ( ) const
protected

Returns the authorization settings.

Note
Not available in Python bindings
Since
QGIS 4.0

Definition at line 312 of file qgsnewhttpconnection.cpp.

◆ authSettingsWidget()

QgsAuthSettingsWidget * QgsNewHttpConnection::authSettingsWidget ( )
protected

Returns the current authentication settings widget.

Note
Not available in Python bindings
Since
QGIS 3.8

Definition at line 307 of file qgsnewhttpconnection.cpp.

◆ featureFormatComboBox()

QComboBox * QgsNewHttpConnection::featureFormatComboBox ( )
protected

Returns the "Feature format" combobox.

Since
QGIS 4.0

Definition at line 348 of file qgsnewhttpconnection.cpp.

◆ featureFormatDetectButton()

QPushButton * QgsNewHttpConnection::featureFormatDetectButton ( )
protected

Returns the "Feature format detect" button.

Since
QGIS 4.0

Definition at line 343 of file qgsnewhttpconnection.cpp.

◆ ignoreAxisOrientation()

bool QgsNewHttpConnection::ignoreAxisOrientation ( ) const
protected

Returns the ignore axis orientation checkbox status.

Since
QGIS 4.0

Definition at line 317 of file qgsnewhttpconnection.cpp.

◆ invertAxisOrientation()

bool QgsNewHttpConnection::invertAxisOrientation ( ) const
protected

Returns the invert axis orientation checkbox status.

Since
QGIS 4.0

Definition at line 327 of file qgsnewhttpconnection.cpp.

◆ name()

QString QgsNewHttpConnection::name ( ) const

Returns the current connection name.

Definition at line 247 of file qgsnewhttpconnection.cpp.

◆ originalConnectionName()

QString QgsNewHttpConnection::originalConnectionName ( ) const

Returns the original connection name (might be empty).

Since
QGIS 4.0

Definition at line 447 of file qgsnewhttpconnection.cpp.

◆ preferredHttpMethod()

Qgis::HttpMethod QgsNewHttpConnection::preferredHttpMethod ( ) const
protected

Returns the selected preferred HTTP method.

Since
QGIS 3.44

Definition at line 368 of file qgsnewhttpconnection.cpp.

◆ showEvent()

void QgsNewHttpConnection::showEvent ( QShowEvent * event)
overrideprotected

Adjust height of dialog to fit the content.

Definition at line 442 of file qgsnewhttpconnection.cpp.

◆ testConnectButton()

QPushButton * QgsNewHttpConnection::testConnectButton ( )
protected

Returns the "test connection" button.

Definition at line 297 of file qgsnewhttpconnection.cpp.

◆ updateServiceSpecificSettings()

void QgsNewHttpConnection::updateServiceSpecificSettings ( )
protected

Triggers a resync of the GUI widgets for the service specific settings (i.e.

WFS and WMS related settings).

Definition at line 383 of file qgsnewhttpconnection.cpp.

◆ url()

QString QgsNewHttpConnection::url ( ) const

Returns the current connection url.

Definition at line 252 of file qgsnewhttpconnection.cpp.

◆ urlTrimmed()

QUrl QgsNewHttpConnection::urlTrimmed ( ) const
protected

Returns the url.

Since
QGIS 3.2

Definition at line 452 of file qgsnewhttpconnection.cpp.

◆ validate()

bool QgsNewHttpConnection::validate ( )
protectedvirtual

Returns true if dialog settings are valid, or false if current settings are not valid and the dialog should not be acceptable.

Definition at line 277 of file qgsnewhttpconnection.cpp.

◆ wfsPageSizeLineEdit()

QLineEdit * QgsNewHttpConnection::wfsPageSizeLineEdit ( )
protected

Returns the "WFS page size" edit.

Since
QGIS 3.2

Definition at line 363 of file qgsnewhttpconnection.cpp.

◆ wfsPagingComboBox()

QComboBox * QgsNewHttpConnection::wfsPagingComboBox ( )
protected

Returns the "WFS paging" combobox.

Since
QGIS 3.36

Definition at line 353 of file qgsnewhttpconnection.cpp.

◆ wfsSettingsKey()

QString QgsNewHttpConnection::wfsSettingsKey ( const QString & base,
const QString & connectionName ) const
protectedvirtual

Returns the QSettings key for WFS related settings for the connection.

See also
wmsSettingsKey()

Definition at line 373 of file qgsnewhttpconnection.cpp.

◆ wfsUseGml2EncodingForTransactions()

QCheckBox * QgsNewHttpConnection::wfsUseGml2EncodingForTransactions ( )
protected

Returns the "Use GML2 encoding for transactions" checkbox.

Since
QGIS 3.16

Definition at line 358 of file qgsnewhttpconnection.cpp.

◆ wfsVersionComboBox()

QComboBox * QgsNewHttpConnection::wfsVersionComboBox ( )
protected

Returns the "WFS version" combobox.

Since
QGIS 3.2

Definition at line 338 of file qgsnewhttpconnection.cpp.

◆ wfsVersionDetectButton()

QPushButton * QgsNewHttpConnection::wfsVersionDetectButton ( )
protected

Returns the "WFS version detect" button.

Since
QGIS 3.2

Definition at line 333 of file qgsnewhttpconnection.cpp.

◆ wmsFormatDetectButton()

QPushButton * QgsNewHttpConnection::wmsFormatDetectButton ( )
protected

Returns the WMS Format Detect Button.

Since
QGIS 4.0

Definition at line 302 of file qgsnewhttpconnection.cpp.

◆ wmsPreferredFormatCombo()

QComboBox * QgsNewHttpConnection::wmsPreferredFormatCombo ( ) const
protected

Returns the "WMS preferred format" combobox.

Note
Not available in Python bindings
Since
QGIS 4.0

Definition at line 322 of file qgsnewhttpconnection.cpp.

◆ wmsSettingsKey()

QString QgsNewHttpConnection::wmsSettingsKey ( const QString & base,
const QString & connectionName ) const
protectedvirtual

Returns the QSettings key for WMS related settings for the connection.

See also
wfsSettingsKey()

Definition at line 378 of file qgsnewhttpconnection.cpp.

Member Data Documentation

◆ settingsIgnoreReportedLayerExtentsDefault

const QgsSettingsEntryBool * QgsNewHttpConnection::settingsIgnoreReportedLayerExtentsDefault = new QgsSettingsEntryBool( u"ignore-reported-layer-extents-default"_s, sTreeHttpConnectionDialog, false )
static

Definition at line 49 of file qgsnewhttpconnection.h.

◆ sTreeHttpConnectionDialog

QgsSettingsTreeNode* QgsNewHttpConnection::sTreeHttpConnectionDialog = QgsSettingsTree::sTreeConnections->createChildNode( u"http-connection-dialog"_s )
inlinestatic

Definition at line 47 of file qgsnewhttpconnection.h.


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