Class: QgsNewHttpConnection¶
Dialog to allow the user to configure and save connection information for an HTTP Server for WMS, etc.
Class Hierarchy¶
Base classes¶
Methods
Returns the current connection name. |
|
Returns the selected preferred HTTP method. |
|
Returns the "test connection" button. |
|
Triggers a resync of the GUI widgets for the service specific settings (i.e. WFS and WMS related settings). |
|
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.
Adjust height of dialog to fit the content. |
|
Returns |
|
Returns the QSettings key for WFS related settings for the connection. |
|
Returns the QSettings key for WMS related settings for the connection. |
Attributes
- 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:
parent (Optional[QWidget] = None)
types (Union[QgsNewHttpConnection.ConnectionTypes, QgsNewHttpConnection.ConnectionType] = QgsNewHttpConnection.ConnectionWms)
settingsKey (Optional[str] = '')
connectionName (Optional[str] = '')
flags (Union[QgsNewHttpConnection.Flags, QgsNewHttpConnection.Flag] = QgsNewHttpConnection.Flags())
fl (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)
- 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
- preferredHttpMethod(self) Qgis.HttpMethod [source]¶
Returns the selected preferred HTTP method.
Added in version 3.44.
- Return type:
- 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).
- virtual validate(self) bool [source]¶
Returns
True
if dialog settings are valid, orFalse
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
- Parameters:
base (Optional[str])
connectionName (Optional[str])
- Return type:
str