QGIS/python/core/auto_generated/settings/qgssettingsentry.sip.in

555 lines
14 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/settings/qgssettingsentry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSettingsEntryBase
{
%Docstring(signature="appended")
Represent settings entry and provides methods for reading and writing settings values.
Different subclasses are provided for different settings types with metainformations
to validate set values and provide more accurate settings description for the gui.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast< QgsSettingsEntryVariant * >( sipCpp ) )
sipType = sipType_QgsSettingsEntryVariant;
else if ( dynamic_cast< QgsSettingsEntryString * >( sipCpp ) )
sipType = sipType_QgsSettingsEntryString;
else if ( dynamic_cast< QgsSettingsEntryStringList * >( sipCpp ) )
sipType = sipType_QgsSettingsEntryStringList;
else if ( dynamic_cast< QgsSettingsEntryBool * >( sipCpp ) )
sipType = sipType_QgsSettingsEntryBool;
else if ( dynamic_cast< QgsSettingsEntryInteger * >( sipCpp ) )
sipType = sipType_QgsSettingsEntryInteger;
else if ( dynamic_cast< QgsSettingsEntryDouble * >( sipCpp ) )
sipType = sipType_QgsSettingsEntryDouble;
else
sipType = NULL;
%End
public:
enum SettingsType
{
Variant,
String,
StringList,
Bool,
Integer,
Double,
Enum,
Flag
};
QgsSettingsEntryBase( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for :py:class:`QgsSettingsEntry`.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual ~QgsSettingsEntryBase();
QString key( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings entry key.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
bool hasDynamicKey() const;
%Docstring
Returns true if a part of the settings key is built dynamically.
%End
bool exists( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Returns true if the settings is contained in the underlying QSettings.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
void remove( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Removes the settings from the underlying QSettings.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
QgsSettings::Section section() const;
%Docstring
Get settings section. The settings section of the parent group is returned if available.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
Set settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
QVariant valueAsVariant( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
QVariant defaultValueAsVariant() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const = 0;
%Docstring
Get the settings entry type.
%End
QString description() const;
%Docstring
Get the settings entry description.
%End
};
class QgsSettingsEntryVariant : QgsSettingsEntryBase
{
%Docstring(signature="appended")
A variant settings entry.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
public:
QgsSettingsEntryVariant( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for QgsSettingsEntryVariant.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.setValue
%End
QVariant value( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
QVariant defaultValue() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.settingsType
%End
};
class QgsSettingsEntryString : QgsSettingsEntryBase
{
%Docstring(signature="appended")
A string settings entry.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
public:
QgsSettingsEntryString( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for QgsSettingsEntryString.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.setValue
%End
QString value( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
QString defaultValue() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.settingsType
%End
void setMinLength( int minLength );
%Docstring
Set the string minimum length.
minLength The string minimum length.
%End
int minLength();
%Docstring
Returns the string minimum length.
%End
void setMaxLength( int maxLength );
%Docstring
Set the string maximum length.
maxLength The string maximum length.
%End
int maxLength();
%Docstring
Returns the string maximum length. By -1 there is no limitation.
%End
};
class QgsSettingsEntryStringList : QgsSettingsEntryBase
{
%Docstring(signature="appended")
A string list settings entry.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
public:
QgsSettingsEntryStringList( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for QgsSettingsEntryStringList.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.setValue
%End
QStringList value( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
QStringList defaultValue() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.settingsType
%End
};
class QgsSettingsEntryBool : QgsSettingsEntryBase
{
%Docstring(signature="appended")
A boolean settings entry.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
public:
QgsSettingsEntryBool( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for QgsSettingsEntryBool.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.setValue
%End
bool value( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
bool defaultValue() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.settingsType
%End
};
class QgsSettingsEntryInteger : QgsSettingsEntryBase
{
%Docstring(signature="appended")
An integer settings entry.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
public:
QgsSettingsEntryInteger( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for QgsSettingsEntryInteger.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.setValue
%End
qlonglong value( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
qlonglong defaultValue() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.settingsType
%End
void setMinValue( qlonglong minValue );
%Docstring
Set the minimum value.
minValue The minimum value.
%End
qlonglong minValue();
%Docstring
Returns the minimum value.
%End
void setMaxValue( qlonglong maxValue );
%Docstring
Set the maximum value.
maxValue The maximum value.
%End
qlonglong maxValue();
%Docstring
Returns the maximum value.
%End
};
class QgsSettingsEntryDouble : QgsSettingsEntryBase
{
%Docstring(signature="appended")
A double settings entry.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgssettingsentry.h"
%End
public:
QgsSettingsEntryDouble( const QString &key,
const QString &pluginName,
const QVariant &defaultValue = QVariant(),
const QString &description = QString() );
%Docstring
Constructor for QgsSettingsEntryDouble.
This constructor is intended to be used from plugins.
The ``key`` argument specifies the key of the settings.
The ``pluginName`` argument is inserted in the key after the section.
The ``default`` value argument specifies the default value for the settings entry.
The ``description`` argument specifies a description for the settings entry.
%End
virtual bool setValue( const QVariant &value, const QString &dynamicKeyPart = QString() ) const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.setValue
%End
double value( const QString &dynamicKeyPart = QString() ) const;
%Docstring
Get settings value.
The ``dynamicKeyPart`` argument specifies the dynamic part of the settings key.
%End
double defaultValue() const;
%Docstring
Get settings default value.
%End
virtual SettingsType settingsType() const;
%Docstring
\copydoc :py:class:`QgsSettingsEntry`.settingsType
%End
void setMinValue( double minValue );
%Docstring
Set the minimum value.
minValue The minimum value.
%End
double minValue() const;
%Docstring
Returns the minimum value.
%End
void setMaxValue( double maxValue );
%Docstring
Set the maximum value.
maxValue The maximum value.
%End
double maxValue() const;
%Docstring
Returns the maximum value.
%End
void setDisplayHintDecimals( int displayHintDecimals );
%Docstring
Set the display hint decimals.
displayHintDecimals The number of decimals that should be shown in the Gui.
%End
int displayHintDecimals() const;
%Docstring
Returns how much decimals should be shown in the Gui.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/settings/qgssettingsentry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/