QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
A double settings entry. More...
#include <qgssettingsentry.h>
Public Member Functions | |
QgsSettingsEntryDouble (const QString &key, const QString &pluginName, double defaultValue, const QString &description=QString()) | |
Constructor for QgsSettingsEntryDouble. More... | |
QgsSettingsEntryDouble (const QString &key, QgsSettings::Section section, double defaultValue=0.0, const QString &description=QString(), double minValue=std::numeric_limits< double >::lowest(), double maxValue=std::numeric_limits< double >::max(), int displayDecimals=1) | |
Constructor for QgsSettingsEntryDouble. More... | |
double | defaultValue () const |
Returns settings default value. More... | |
int | displayHintDecimals () const |
Returns how much decimals should be shown in the Gui. More... | |
double | maxValue () const |
Returns the maximum value. More... | |
double | minValue () const |
Returns the minimum value. More... | |
void | setDisplayHintDecimals (int displayHintDecimals) |
Set the display hint decimals. More... | |
void | setMaxValue (double maxValue) |
Set the maximum value. More... | |
void | setMinValue (double minValue) |
Set the minimum value. More... | |
virtual SettingsType | settingsType () const override |
Returns the settings entry type. More... | |
bool | setValue (double value, const QString &dynamicKeyPart=QString()) const |
Set settings value. More... | |
bool | setValue (double value, const QStringList &dynamicKeyPartList) const |
Set settings value. More... | |
double | value (const QString &dynamicKeyPart=QString(), bool useDefaultValueOverride=false, double defaultValueOverride=0.0) const |
Returns settings value. More... | |
double | value (const QStringList &dynamicKeyPartList, bool useDefaultValueOverride=false, double defaultValueOverride=0.0) const |
Returns settings value. More... | |
Public Member Functions inherited from QgsSettingsEntryBase | |
QgsSettingsEntryBase (const QString &key, const QString &pluginName, const QVariant &defaultValue=QVariant(), const QString &description=QString()) | |
Constructor for QgsSettingsEntryBase. More... | |
QgsSettingsEntryBase (const QString &key, QgsSettings::Section section, const QVariant &defaultValue=QVariant(), const QString &description=QString()) | |
Constructor for QgsSettingsEntryBase. More... | |
virtual | ~QgsSettingsEntryBase () |
Destructor for QgsSettingsEntryBase. More... | |
QVariant | defaultValueAsVariant () const |
Returns settings default value. More... | |
QString | definitionKey () const |
Returns settings entry defining key. More... | |
QString | description () const |
Returns the settings entry description. More... | |
bool | exists (const QString &dynamicKeyPart=QString()) const |
Returns true if the settings is contained in the underlying QSettings. More... | |
bool | exists (const QStringList &dynamicKeyPartList) const |
Returns true if the settings is contained in the underlying QSettings. More... | |
bool | hasDynamicKey () const |
Returns true if a part of the settings key is built dynamically. More... | |
QString | key (const QString &dynamicKeyPart=QString()) const |
Returns settings entry key. More... | |
QString | key (const QStringList &dynamicKeyPartList) const |
Returns settings entry key. More... | |
bool | keyIsValid (const QString &key) const |
Returns true if the provided key match the settings entry. More... | |
void | remove (const QString &dynamicKeyPart=QString()) const |
Removes the settings from the underlying QSettings. More... | |
void | remove (const QStringList &dynamicKeyPartList) const |
Removes the settings from the underlying QSettings. More... | |
QgsSettings::Section | section () const |
Returns settings section. More... | |
virtual bool | setVariantValue (const QVariant &value, const QString &dynamicKeyPart=QString()) const |
Set settings value. More... | |
virtual bool | setVariantValue (const QVariant &value, const QStringList &dynamicKeyPartList) const |
Set settings value. More... | |
QVariant | valueAsVariant (const QString &dynamicKeyPart=QString(), bool useDefaultValueOverride=false, const QVariant &defaultValueOverride=QVariant()) const |
Returns settings value. More... | |
QVariant | valueAsVariant (const QStringList &dynamicKeyPartList, bool useDefaultValueOverride=false, const QVariant &defaultValueOverride=QVariant()) const |
Returns settings value. More... | |
Additional Inherited Members | |
Public Types inherited from QgsSettingsEntryBase | |
enum class | SettingsType : int { Variant , String , StringList , Bool , Integer , Double , EnumFlag , Color } |
Types of settings entries. More... | |
QgsSettingsEntryDouble::QgsSettingsEntryDouble | ( | const QString & | key, |
QgsSettings::Section | section, | ||
double | defaultValue = 0.0 , |
||
const QString & | description = QString() , |
||
double | minValue = std::numeric_limits<double>::lowest() , |
||
double | maxValue = std::numeric_limits<double>::max() , |
||
int | displayDecimals = 1 |
||
) |
Constructor for QgsSettingsEntryDouble.
The key argument specifies the final part of the settings key. The section argument specifies the section. The defaultValue argument specifies the default value for the settings entry. The description argument specifies a description for the settings entry. The minValue argument specifies the minimal value. The maxValue argument specifies the maximal value. The displayDecimals specifies an hint for the gui about how much decimals to show for example for a QDoubleSpinBox.
Definition at line 547 of file qgssettingsentry.cpp.
QgsSettingsEntryDouble::QgsSettingsEntryDouble | ( | const QString & | key, |
const QString & | pluginName, | ||
double | defaultValue, | ||
const QString & | description = QString() |
||
) |
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 defaultValueargument specifies the default value for the settings entry. The description argument specifies a description for the settings entry.
Definition at line 558 of file qgssettingsentry.cpp.
double QgsSettingsEntryDouble::defaultValue | ( | ) | const |
Returns settings default value.
Definition at line 611 of file qgssettingsentry.cpp.
int QgsSettingsEntryDouble::displayHintDecimals | ( | ) | const |
Returns how much decimals should be shown in the Gui.
Definition at line 646 of file qgssettingsentry.cpp.
double QgsSettingsEntryDouble::maxValue | ( | ) | const |
Returns the maximum value.
Definition at line 636 of file qgssettingsentry.cpp.
double QgsSettingsEntryDouble::minValue | ( | ) | const |
Returns the minimum value.
Definition at line 626 of file qgssettingsentry.cpp.
void QgsSettingsEntryDouble::setDisplayHintDecimals | ( | int | displayHintDecimals | ) |
Set the display hint decimals.
displayHintDecimals The number of decimals that should be shown in the Gui.
Definition at line 641 of file qgssettingsentry.cpp.
void QgsSettingsEntryDouble::setMaxValue | ( | double | maxValue | ) |
Set the maximum value.
maxValue The maximum value.
Definition at line 631 of file qgssettingsentry.cpp.
void QgsSettingsEntryDouble::setMinValue | ( | double | minValue | ) |
Set the minimum value.
minValue The minimum value.
Definition at line 621 of file qgssettingsentry.cpp.
|
overridevirtual |
Returns the settings entry type.
Implements QgsSettingsEntryBase.
Definition at line 616 of file qgssettingsentry.cpp.
bool QgsSettingsEntryDouble::setValue | ( | double | value, |
const QString & | dynamicKeyPart = QString() |
||
) | const |
Set settings value.
The value to set. The dynamicKeyPart argument specifies the dynamic part of the settings key.
Definition at line 569 of file qgssettingsentry.cpp.
bool QgsSettingsEntryDouble::setValue | ( | double | value, |
const QStringList & | dynamicKeyPartList | ||
) | const |
Set settings value.
The value to set. The dynamicKeyParts argument specifies the list of dynamic parts of the settings key.
Definition at line 578 of file qgssettingsentry.cpp.
double QgsSettingsEntryDouble::value | ( | const QString & | dynamicKeyPart = QString() , |
bool | useDefaultValueOverride = false , |
||
double | defaultValueOverride = 0.0 |
||
) | const |
Returns settings value.
The dynamicKeyPart argument specifies the dynamic part of the settings key. The useDefaultValueOverride argument specifies if defaultValueOverride should be used. The defaultValueOverride argument if valid is used instead of the normal default value.
Definition at line 601 of file qgssettingsentry.cpp.
double QgsSettingsEntryDouble::value | ( | const QStringList & | dynamicKeyPartList, |
bool | useDefaultValueOverride = false , |
||
double | defaultValueOverride = 0.0 |
||
) | const |
Returns settings value.
The dynamicKeyParts argument specifies the list of dynamic parts of the settings key. The useDefaultValueOverride argument specifies if defaultValueOverride should be used. The defaultValueOverride argument if valid is used instead of the normal default value.
Definition at line 606 of file qgssettingsentry.cpp.