mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
sipify
This commit is contained in:
parent
4790f92444
commit
6dd66759cd
10
python/core/auto_additions/qgsowsconnection.py
Normal file
10
python/core/auto_additions/qgsowsconnection.py
Normal file
@ -0,0 +1,10 @@
|
||||
# The following has been generated automatically from src/core/qgsowsconnection.h
|
||||
# monkey patching scoped based enum
|
||||
QgsOwsConnection.DpiMode.All.__doc__ = ""
|
||||
QgsOwsConnection.DpiMode.Off.__doc__ = ""
|
||||
QgsOwsConnection.DpiMode.QGIS.__doc__ = ""
|
||||
QgsOwsConnection.DpiMode.UMN.__doc__ = ""
|
||||
QgsOwsConnection.DpiMode.GeoServer.__doc__ = ""
|
||||
QgsOwsConnection.DpiMode.__doc__ = 'DpiMode enum\n\n.. versionadded:: 3.26\n\n' + '* ``All``: ' + QgsOwsConnection.DpiMode.All.__doc__ + '\n' + '* ``Off``: ' + QgsOwsConnection.DpiMode.Off.__doc__ + '\n' + '* ``QGIS``: ' + QgsOwsConnection.DpiMode.QGIS.__doc__ + '\n' + '* ``UMN``: ' + QgsOwsConnection.DpiMode.UMN.__doc__ + '\n' + '* ``GeoServer``: ' + QgsOwsConnection.DpiMode.GeoServer.__doc__
|
||||
# --
|
||||
QgsOwsConnection.DpiMode.baseClass = QgsOwsConnection
|
@ -8,6 +8,46 @@
|
||||
|
||||
|
||||
|
||||
class QgsGeoNodeConnectionUtils
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
Contains various utilities for managing the known collection of
|
||||
GeoNode servers associated with a QGIS install.
|
||||
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsgeonodeconnection.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
static QStringList connectionList();
|
||||
%Docstring
|
||||
Returns a list of all known GeoNode connection names.
|
||||
%End
|
||||
|
||||
static void deleteConnection( const QString &name );
|
||||
%Docstring
|
||||
Deletes the GeoNode connection with matching ``name``.
|
||||
%End
|
||||
|
||||
static QString pathGeoNodeConnection();
|
||||
%Docstring
|
||||
Returns the base path for settings related to GeoNode connections.
|
||||
%End
|
||||
|
||||
static QString pathGeoNodeConnectionDetails() /Deprecated/;
|
||||
%Docstring
|
||||
Returns the base path for settings related to GeoNode connection details.
|
||||
|
||||
.. deprecated:: QGIS 3.26
|
||||
use :py:func:`~QgsGeoNodeConnectionUtils.pathGeonNodeConnection` instead
|
||||
%End
|
||||
|
||||
static const QString sGeoNodeConnection;
|
||||
};
|
||||
|
||||
class QgsGeoNodeConnection
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
@ -80,41 +120,6 @@ Adds uri parameters relating to the settings for a WCS layer on the connection t
|
||||
|
||||
};
|
||||
|
||||
class QgsGeoNodeConnectionUtils
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
Contains various utilities for managing the known collection of
|
||||
GeoNode servers associated with a QGIS install.
|
||||
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsgeonodeconnection.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
static QStringList connectionList();
|
||||
%Docstring
|
||||
Returns a list of all known GeoNode connection names.
|
||||
%End
|
||||
|
||||
static void deleteConnection( const QString &name );
|
||||
%Docstring
|
||||
Deletes the GeoNode connection with matching ``name``.
|
||||
%End
|
||||
|
||||
static QString pathGeoNodeConnection();
|
||||
%Docstring
|
||||
Returns the base path for settings related to GeoNode connections.
|
||||
%End
|
||||
|
||||
static QString pathGeoNodeConnectionDetails();
|
||||
%Docstring
|
||||
Returns the base path for settings related to GeoNode connection details.
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************
|
||||
|
@ -21,6 +21,21 @@ Connections management
|
||||
%End
|
||||
public:
|
||||
|
||||
enum class DpiMode
|
||||
{
|
||||
All,
|
||||
Off,
|
||||
QGIS,
|
||||
UMN,
|
||||
GeoServer,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
const QgsSettingsEntryGroup settingsServiceConnectionDetailsGroup;
|
||||
const QgsSettingsEntryGroup settingsServiceConnectionCredentialsGroup;
|
||||
|
||||
QgsOwsConnection( const QString &service, const QString &connName );
|
||||
%Docstring
|
||||
Constructor
|
||||
@ -55,20 +70,42 @@ Returns a string representing the service type, e.g. "WMS".
|
||||
Returns the connection uri.
|
||||
%End
|
||||
|
||||
static QgsDataSourceUri &addWmsWcsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey );
|
||||
static QgsDataSourceUri &addWmsWcsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey ) /Deprecated/;
|
||||
%Docstring
|
||||
Adds uri parameters relating to the settings for a WMS or WCS connection to a :py:class:`QgsDataSourceUri` ``uri``.
|
||||
Connection settings are taken from the specified QSettings ``settingsKey``.
|
||||
|
||||
.. versionadded:: 3.0
|
||||
|
||||
.. deprecated:: QGIS 3.26
|
||||
use addWmsWcsConnectionSettings with service and connection name parameters
|
||||
%End
|
||||
|
||||
static QgsDataSourceUri &addWfsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey );
|
||||
static QgsDataSourceUri &addWmsWcsConnectionSettings( QgsDataSourceUri &uri, const QString &service, const QString &connName );
|
||||
%Docstring
|
||||
Adds uri parameters relating to the settings for a WMS or WCS connection to a :py:class:`QgsDataSourceUri` ``uri``.
|
||||
Connection settings are taken from the specified ``servcie`` and ``connName``
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
static QgsDataSourceUri &addWfsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey ) /Deprecated/;
|
||||
%Docstring
|
||||
Adds uri parameters relating to the settings for a WFS connection to a :py:class:`QgsDataSourceUri` ``uri``.
|
||||
Connection settings are taken from the specified QSettings ``settingsKey``.
|
||||
|
||||
.. versionadded:: 3.0
|
||||
|
||||
.. deprecated:: QGIS 3.26
|
||||
use addWfsConnectionSettings with service and connection name parameters
|
||||
%End
|
||||
|
||||
static QgsDataSourceUri &addWfsConnectionSettings( QgsDataSourceUri &uri, const QString &service, const QString &connName );
|
||||
%Docstring
|
||||
Adds uri parameters relating to the settings for a WFS connection to a :py:class:`QgsDataSourceUri` ``uri``.
|
||||
Connection settings are taken from the specified ``servcie`` and ``connName``
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
static QStringList connectionList( const QString &service );
|
||||
|
@ -9,6 +9,67 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsSettingsEntryGroup
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
Creates a group of setting which have a common definition of base key
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgssettingsentry.h"
|
||||
%End
|
||||
public:
|
||||
QgsSettingsEntryGroup( const QList<const QgsSettingsEntryBase *> settings );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
%MethodCode
|
||||
sipCpp = new QgsSettingsEntryGroup( *a0, false );
|
||||
sipIsErr = sipCpp->isValid() ? 0 : 1;
|
||||
if ( sipIsErr )
|
||||
PyErr_SetString( PyExc_ValueError, QStringLiteral( "Settings do not share the same base definition key for this group. This will lead to unpredictable results." ).toUtf8().constData() );
|
||||
%End
|
||||
|
||||
|
||||
bool isValid() const;
|
||||
%Docstring
|
||||
Returns if the group is valid (if settings share the same base key)
|
||||
%End
|
||||
|
||||
QString baseKey( const QStringList &dynamicKeyPartList = QStringList() ) const;
|
||||
%Docstring
|
||||
Returns the base key for the given ``dynamicKeyPartList``
|
||||
%End
|
||||
|
||||
const QList<const QgsSettingsEntryBase *> settings() const;
|
||||
%Docstring
|
||||
Returns all the settings
|
||||
%End
|
||||
|
||||
void removeAllSettingsAtBaseKey( const QStringList &dynamicKeyPartList = QStringList() ) const;
|
||||
%Docstring
|
||||
Removes all the settings at the base key for the given ``dynamicKeyPartList``
|
||||
This means it might remove more settings than the ones registered in the group, use with caution
|
||||
%End
|
||||
|
||||
void removeAllChildrenSettings( const QString &dynamicKeyPart = QString() ) const;
|
||||
%Docstring
|
||||
Removes all the settings from this group
|
||||
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
|
||||
%End
|
||||
|
||||
void removeAllChildrenSettings( const QStringList &dynamicKeyPartList ) const;
|
||||
%Docstring
|
||||
Removes all the settings from this group
|
||||
The ``dynamicKeyPartList`` argument specifies the dynamic part of the settings key.
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
class QgsSettingsEntryBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
@ -43,6 +104,13 @@ to validate set values and provide more accurate settings description for the gu
|
||||
%End
|
||||
public:
|
||||
|
||||
static QStringList dynamicKeyPartToList( const QString &dynamicKeyPart );
|
||||
%Docstring
|
||||
Transforms a dynamic key part string to list
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
|
||||
QgsSettingsEntryBase( const QString &key,
|
||||
const QString §ion,
|
||||
@ -245,13 +313,6 @@ Returns the current value (or default) if there is no former value.
|
||||
Sets the settings value with a variant value.
|
||||
This should be called from any implementation as it takes care of actually calling QSettings
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
QStringList dynamicKeyPartToList( const QString &dynamicKeyPart ) const;
|
||||
%Docstring
|
||||
Transforms a dynamic key part string to list
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
|
@ -73,7 +73,6 @@ The ``options`` arguments specifies the options for the settings entry.
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef QgsSettingsEntryByReference<QString> QgsSettingsEntryByReferenceQStringBase;
|
||||
|
||||
class QgsSettingsEntryString : QgsSettingsEntryByReferenceQStringBase
|
||||
|
@ -60,9 +60,16 @@ Returns the list of registered child QgsSettingsRegistry.
|
||||
|
||||
protected:
|
||||
|
||||
void addSettingsEntry( const QgsSettingsEntryBase *settingsEntry );
|
||||
bool addSettingsEntry( const QgsSettingsEntryBase *settingsEntry );
|
||||
%Docstring
|
||||
Add ``settingsEntry`` to the register.
|
||||
Adds ``settingsEntry`` to the registry.
|
||||
%End
|
||||
|
||||
void addSettingsEntryGroup( const QgsSettingsEntryGroup *settingsGroup );
|
||||
%Docstring
|
||||
Adds a group of setting to the registry
|
||||
|
||||
.. versionadded:: 3.26
|
||||
%End
|
||||
|
||||
};
|
||||
|
@ -43,7 +43,7 @@ information for an HTTP Server for WMS, etc.
|
||||
|
||||
QgsNewHttpConnection( QWidget *parent /TransferThis/ = 0,
|
||||
QgsNewHttpConnection::ConnectionTypes types = ConnectionWms,
|
||||
const QString &baseKey = "qgis/connections-wms/",
|
||||
const QString &serviceName = "WMS",
|
||||
const QString &connectionName = QString(),
|
||||
QgsNewHttpConnection::Flags flags = QgsNewHttpConnection::Flags(),
|
||||
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
|
||||
|
Loading…
x
Reference in New Issue
Block a user