QgsNewHttpConnection class

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

Public types

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

Constructors, destructors, conversion operators

QgsNewHttpConnection(QWidget* parent = nullptr, QgsNewHttpConnection::ConnectionTypes types = ConnectionWms, const QString& baseKey = "qgis/connections-wms/", const QString& connectionName = QString(), QgsNewHttpConnection::Flags flags = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags)
Constructor for QgsNewHttpConnection.

Public functions

auto name() const -> QString
Returns the current connection name.
auto url() const -> QString
Returns the current connection url.

Protected functions

auto testConnectButton() -> QPushButton*
Returns the "test connection" button.
void updateServiceSpecificSettings()
Triggers a resync of the GUI widgets for the service specific settings (i.e.
auto urlTrimmed() const -> QUrl
Returns the url.
auto validate() -> bool virtual
Returns true if dialog settings are valid, or false if current settings are not valid and the dialog should not be acceptable.
auto wfsPageSizeLineEdit() -> QLineEdit*
Returns the "WFS page size" edit.
auto wfsPagingEnabledCheckBox() -> QCheckBox*
Returns the "WFS paging enabled" checkbox.
auto wfsSettingsKey(const QString& base, const QString& connectionName) const -> QString virtual
Returns the QSettings key for WFS related settings for the connection.
auto wfsVersionComboBox() -> QComboBox*
Returns the "WFS version" combobox.
auto wfsVersionDetectButton() -> QPushButton*
Returns the "WFS version detect" button.
auto wmsSettingsKey(const QString& base, const QString& connectionName) const -> QString virtual
Returns the QSettings key for WMS related settings for the connection.

Enum documentation

enum QgsNewHttpConnection::ConnectionType

Available connection types for configuring in the dialog.

Enumerators
ConnectionWfs

WFS connection.

ConnectionWms

WMS connection.

ConnectionWcs

WCS connection.

ConnectionOther

Other connection type.

enum QgsNewHttpConnection::Flag

Flags controlling dialog behavior.

Enumerators
FlagShowTestConnection

Display the 'test connection' button.

FlagHideAuthenticationGroup

Hide the Authentication group.

Function documentation

QgsNewHttpConnection::QgsNewHttpConnection(QWidget* parent = nullptr, QgsNewHttpConnection::ConnectionTypes types = ConnectionWms, const QString& baseKey = "qgis/connections-wms/", const QString& connectionName = QString(), QgsNewHttpConnection::Flags flags = nullptr, 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.

QString QgsNewHttpConnection::name() const

Returns the current connection name.

QString QgsNewHttpConnection::url() const

Returns the current connection url.

QPushButton* QgsNewHttpConnection::testConnectButton() protected

Returns the "test connection" button.

void QgsNewHttpConnection::updateServiceSpecificSettings() protected

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

WFS and WMS related settings).

QUrl QgsNewHttpConnection::urlTrimmed() const protected

Returns the url.

bool QgsNewHttpConnection::validate() virtual protected

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

QLineEdit* QgsNewHttpConnection::wfsPageSizeLineEdit() protected

Returns the "WFS page size" edit.

QCheckBox* QgsNewHttpConnection::wfsPagingEnabledCheckBox() protected

Returns the "WFS paging enabled" checkbox.

QString QgsNewHttpConnection::wfsSettingsKey(const QString& base, const QString& connectionName) const virtual protected

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

QComboBox* QgsNewHttpConnection::wfsVersionComboBox() protected

Returns the "WFS version" combobox.

QPushButton* QgsNewHttpConnection::wfsVersionDetectButton() protected

Returns the "WFS version detect" button.

QString QgsNewHttpConnection::wmsSettingsKey(const QString& base, const QString& connectionName) const virtual protected

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