Class: QgsNewHttpConnection

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

Class Hierarchy

Inheritance diagram of qgis.gui.QgsNewHttpConnection

Base classes

QDialog

QWidget

QObject

QPaintDevice

Methods

name

Returns the current connection name.

preferredHttpMethod

Returns the selected preferred HTTP method.

testConnectButton

Returns the "test connection" button.

updateServiceSpecificSettings

Triggers a resync of the GUI widgets for the service specific settings (i.e. WFS and WMS related settings).

url

Returns the current connection url.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsNewHttpConnection. See the FAQ for more details.

showEvent

Adjust height of dialog to fit the content.

validate

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

wfsSettingsKey

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

wmsSettingsKey

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

Attributes

ConnectionOther

ConnectionWcs

ConnectionWfs

ConnectionWms

FlagHideAuthenticationGroup

FlagShowHttpSettings

FlagShowTestConnection

WFS_VERSION_1_0

WFS_VERSION_1_1

WFS_VERSION_2_0

WFS_VERSION_API_FEATURES_1_0

WFS_VERSION_MAX

class qgis.gui.QgsNewHttpConnection[source]

Bases: QDialog

__init__(parent: QWidget | None = None, types: QgsNewHttpConnection.ConnectionTypes | QgsNewHttpConnection.ConnectionType = QgsNewHttpConnection.ConnectionWms, settingsKey: str | None = '', connectionName: str | None = '', flags: QgsNewHttpConnection.Flags | QgsNewHttpConnection.Flag = QgsNewHttpConnection.Flags(), fl: Qt.WindowFlags | Qt.WindowType = 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.

Parameters:
ConnectionOther = 16
class ConnectionType

Bases: int

class ConnectionTypes
class ConnectionTypes(f: QgsNewHttpConnection.ConnectionTypes | QgsNewHttpConnection.ConnectionType)
class ConnectionTypes(a0: QgsNewHttpConnection.ConnectionTypes)

Bases: object

ConnectionWcs = 8
ConnectionWfs = 2
ConnectionWms = 4
class Flag

Bases: int

FlagHideAuthenticationGroup = 4
FlagShowHttpSettings = 8
FlagShowTestConnection = 2
class Flags
class Flags(f: QgsNewHttpConnection.Flags | QgsNewHttpConnection.Flag)
class Flags(a0: QgsNewHttpConnection.Flags)

Bases: object

WFS_VERSION_1_0 = 1
WFS_VERSION_1_1 = 2
WFS_VERSION_2_0 = 3
WFS_VERSION_API_FEATURES_1_0 = 4
WFS_VERSION_MAX = 0
class WfsVersionIndex

Bases: int

name(self) str[source]

Returns the current connection name.

Return type:

str

preferredHttpMethod(self) Qgis.HttpMethod[source]

Returns the selected preferred HTTP method.

Added in version 3.44.

Return type:

Qgis.HttpMethod

virtual showEvent(self, event: QShowEvent | None)[source]

Adjust height of dialog to fit the content.

Parameters:

event (Optional[QShowEvent])

testConnectButton(self) QPushButton | None[source]

Returns the “test connection” button.

Return type:

Optional[QPushButton]

updateServiceSpecificSettings(self)[source]

Triggers a resync of the GUI widgets for the service specific settings (i.e. WFS and WMS related settings).

url(self) str[source]

Returns the current connection url.

Return type:

str

virtual validate(self) bool[source]

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

Return type:

bool

virtual wfsSettingsKey(self, base: str | None, connectionName: str | None) str[source]

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

See also

wmsSettingsKey()

Parameters:
  • base (Optional[str])

  • connectionName (Optional[str])

Return type:

str

virtual wmsSettingsKey(self, base: str | None, connectionName: str | None) str[source]

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

See also

wfsSettingsKey()

Parameters:
  • base (Optional[str])

  • connectionName (Optional[str])

Return type:

str