16#ifndef QGSSETTINGSENTRYIMPL_H
17#define QGSSETTINGSENTRYIMPL_H
46 const QVariant &defaultValue = QVariant(),
47 const QString &description = QString(),
63 const QString §ion,
64 const QVariant &defaultValue = QVariant(),
65 const QString &description = QString(),
83 const QString &pluginName,
84 const QVariant &defaultValue = QVariant(),
85 const QString &description = QString(),
100 SIP_PYOBJECT valueAs( SIP_PYOBJECT type )
const;
102 typedef PyObject *( *pyqt5_from_qvariant_by_type )( QVariant &
value, PyObject *type );
105 value = sipCpp->value();
107 pyqt5_from_qvariant_by_type f = ( pyqt5_from_qvariant_by_type ) sipImportSymbol(
"pyqt5_from_qvariant_by_type" );
108 sipRes = f( value, a0 );
144 const QString &defaultValue = QString(),
145 const QString &description = QString(),
146 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
150 , mMinLength( minLength )
151 , mMaxLength( maxLength )
166 const QString §ion,
167 const QString &defaultValue = QString(),
168 const QString &description = QString(),
169 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
173 , mMinLength( minLength )
174 , mMaxLength( maxLength )
190 const QString &pluginName,
191 const QString &defaultValue = QString(),
192 const QString &description = QString(),
193 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
206 int minLength()
const;
211 int maxLength()
const;
246 const QStringList &defaultValue = QStringList(),
247 const QString &description = QString(),
262 const QString §ion,
263 const QStringList &defaultValue = QStringList(),
264 const QString &description = QString(),
283 const QString &pluginName,
284 const QStringList &defaultValue = QStringList(),
285 const QString &description = QString(),
320 bool defaultValue =
false,
321 const QString &description = QString(),
336 const QString §ion,
337 bool defaultValue =
false,
338 const QString &description = QString(),
356 const QString &pluginName,
357 bool defaultValue =
false,
358 const QString &description = QString(),
396 int defaultValue = 0,
397 const QString &description = QString(),
398 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
399 int minValue = std::numeric_limits<int>::min(),
402 , mMinValue( minValue )
403 , mMaxValue( maxValue )
418 const QString §ion,
419 int defaultValue = 0,
420 const QString &description = QString(),
421 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
422 int minValue = std::numeric_limits<int>::min(),
425 , mMinValue( minValue )
426 , mMaxValue( maxValue )
444 const QString &pluginName,
445 int defaultValue = 0,
446 const QString &description = QString(),
447 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
448 int minValue = std::numeric_limits<int>::min(),
460 int minValue()
const;
465 int maxValue()
const;
502 qlonglong defaultValue = 0,
503 const QString &description = QString(),
504 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
505 qlonglong minValue = std::numeric_limits<qlonglong>::min(),
508 , mMinValue( minValue )
509 , mMaxValue( maxValue )
524 const QString §ion,
525 qlonglong defaultValue = 0,
526 const QString &description = QString(),
527 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
528 qlonglong minValue = std::numeric_limits<qlonglong>::min(),
529 qlonglong maxValue = std::numeric_limits<qlonglong>::max() )
531 , mMinValue( minValue )
532 , mMaxValue( maxValue )
540 qlonglong minValue()
const;
545 qlonglong maxValue()
const;
582 double defaultValue = 0.0,
583 const QString &description = QString(),
584 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
585 double minValue = std::numeric_limits<double>::lowest(),
586 double maxValue = std::numeric_limits<double>::max(),
589 , mMinValue( minValue )
590 , mMaxValue( maxValue )
591 , mDisplayHintDecimals( displayDecimals )
608 const QString §ion,
609 double defaultValue = 0.0,
610 const QString &description = QString(),
611 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
612 double minValue = std::numeric_limits<double>::lowest(),
613 double maxValue = std::numeric_limits<double>::max(),
616 , mMinValue( minValue )
617 , mMaxValue( maxValue )
618 , mDisplayHintDecimals( displayDecimals )
637 const QString &pluginName,
639 const QString &description = QString(),
640 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
641 double minValue = std::numeric_limits<double>::lowest(),
642 double maxValue = std::numeric_limits<double>::max(),
655 double minValue()
const;
660 double maxValue()
const;
667 void setDisplayHintDecimals(
int displayHintDecimals );
672 int displayHintDecimals()
const;
681 int mDisplayHintDecimals;
710 const QColor &defaultValue = QColor(),
711 const QString &description = QString(),
712 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
715 , mAllowAlpha( allowAlpha )
729 const QString §ion,
730 const QColor &defaultValue = QColor(),
731 const QString &description = QString(),
732 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
735 , mAllowAlpha( allowAlpha )
751 const QString &pluginName,
752 const QColor &defaultValue = QColor(),
753 const QString &description = QString(),
754 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
774 bool copyValueFromKeys(
const QString &redKey,
const QString &greenKey,
const QString &blueKey,
const QString &alphaKey = QString(),
bool removeSettingAtKey =
false ) const
SIP_SKIP;
780 void copyValueToKeys( const QString &redKey, const QString &greenKey, const QString &blueKey, const QString &alphaKey = QString() ) const
SIP_SKIP;
782 QColor convertFromVariant( const QVariant &value ) const override
SIP_FORCE;
785 bool checkValuePrivate( const QColor &value ) const override
SIP_FORCE;
786 bool mAllowAlpha = true;
812 const QVariantMap &defaultValue = QVariantMap(),
813 const QString &description = QString(),
829 const QString §ion,
830 const QVariantMap &defaultValue = QVariantMap(),
831 const QString &description = QString(),
850 const QString &pluginName,
851 const QVariantMap &defaultValue = QVariantMap(),
852 const QString &description = QString(),
SettingsType
Types of settings entries.
Base abstract class for settings entries with typed get and set methods.
virtual T convertFromVariant(const QVariant &value) const =0
Converts the variant value to the value type of the setting.
virtual Qgis::SettingsType settingsType() const override=0
Returns the settings entry type.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
virtual bool checkValuePrivate(const T &value) const
Check if the value is valid.
A boolean settings entry.
QgsSettingsEntryBool(const QString &key, const QString §ion, bool defaultValue=false, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryBool.
QgsSettingsEntryBool(const QString &name, QgsSettingsTreeNode *parent, bool defaultValue=false, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryBool.
bool allowAlpha() const
Returns true if transparency is allowed for the color.
QgsSettingsEntryColor(const QString &key, const QString §ion, const QColor &defaultValue=QColor(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), bool allowAlpha=true) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryColor.
QgsSettingsEntryColor(const QString &name, QgsSettingsTreeNode *parent, const QColor &defaultValue=QColor(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), bool allowAlpha=true) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryColor.
QgsSettingsEntryDouble(const QString &key, const QString §ion, double defaultValue=0.0, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), double minValue=std::numeric_limits< double >::lowest(), double maxValue=std::numeric_limits< double >::max(), int displayDecimals=1) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryDouble.
QgsSettingsEntryDouble(const QString &name, QgsSettingsTreeNode *parent, double defaultValue=0.0, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), double minValue=std::numeric_limits< double >::lowest(), double maxValue=std::numeric_limits< double >::max(), int displayDecimals=1) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryDouble.
A 64 bits integer (long long) settings entry.
QgsSettingsEntryInteger64(const QString &key, const QString §ion, qlonglong defaultValue=0, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), qlonglong minValue=std::numeric_limits< qlonglong >::min(), qlonglong maxValue=std::numeric_limits< qlonglong >::max())
Constructor for QgsSettingsEntryInteger64.
QgsSettingsEntryInteger64(const QString &name, QgsSettingsTreeNode *parent, qlonglong defaultValue=0, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), qlonglong minValue=std::numeric_limits< qlonglong >::min(), qlonglong maxValue=std::numeric_limits< qlonglong >::max()) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryInteger64.
An integer settings entry.
QgsSettingsEntryInteger(const QString &name, QgsSettingsTreeNode *parent, int defaultValue=0, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), int minValue=std::numeric_limits< int >::min(), int maxValue=std::numeric_limits< int >::max()) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryInteger.
QgsSettingsEntryInteger(const QString &key, const QString §ion, int defaultValue=0, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), int minValue=std::numeric_limits< int >::min(), int maxValue=std::numeric_limits< int >::max()) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryInteger.
A string list settings entry.
QgsSettingsEntryStringList(const QString &key, const QString §ion, const QStringList &defaultValue=QStringList(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryStringList.
QgsSettingsEntryStringList(const QString &name, QgsSettingsTreeNode *parent, const QStringList &defaultValue=QStringList(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryStringList.
QgsSettingsEntryString(const QString &key, const QString §ion, const QString &defaultValue=QString(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), int minLength=0, int maxLength=-1) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryString.
QgsSettingsEntryString(const QString &name, QgsSettingsTreeNode *parent, const QString &defaultValue=QString(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), int minLength=0, int maxLength=-1) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryString.
A string list settings entry.
QgsSettingsEntryVariantMap(const QString &key, const QString §ion, const QVariantMap &defaultValue=QVariantMap(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryVariantMap.
QgsSettingsEntryVariantMap(const QString &name, QgsSettingsTreeNode *parent, const QVariantMap &defaultValue=QVariantMap(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryVariantMap.
A variant settings entry.
QgsSettingsEntryVariant(const QString &key, const QString §ion, const QVariant &defaultValue=QVariant(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException) SIP_MAKE_PRIVATE
Constructor for QgsSettingsEntryVariant.
QgsSettingsEntryVariant(const QString &name, QgsSettingsTreeNode *parent, const QVariant &defaultValue=QVariant(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions()) SIP_THROW(QgsSettingsException)
Constructor for QgsSettingsEntryVariant.
QVariant convertFromVariant(const QVariant &value) const override SIP_FORCE
Converts the variant value to the value type of the setting.
Custom exception class for settings related exceptions.
QgsSettingsTreeNode is a tree node for the settings tree to help organizing and introspecting the tre...
QgsSettingsTree holds the tree structure for the settings in QGIS core.
#define SIP_THROW(name,...)