16#ifndef QGSSETTINGSENTRYIMPL_H
17#define QGSSETTINGSENTRYIMPL_H
45 const QVariant &defaultValue = QVariant(),
46 const QString &description = QString(),
62 const QString §ion,
63 const QVariant &defaultValue = QVariant(),
64 const QString &description = QString(),
82 const QString &pluginName,
83 const QVariant &defaultValue = QVariant(),
84 const QString &description = QString(),
99 SIP_PYOBJECT valueAs( SIP_PYOBJECT type )
const;
101 typedef PyObject *( *pyqt_from_qvariant_by_type )( QVariant &
value, PyObject *type );
104 value = sipCpp->value();
106 pyqt_from_qvariant_by_type f = ( pyqt_from_qvariant_by_type ) sipImportSymbol( SIP_PYQT_FROM_QVARIANT_BY_TYPE );
107 sipRes = f( value, a0 );
143 const QString &defaultValue = QString(),
144 const QString &description = QString(),
145 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
149 , mMinLength( minLength )
150 , mMaxLength( maxLength )
165 const QString §ion,
166 const QString &defaultValue = QString(),
167 const QString &description = QString(),
168 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
172 , mMinLength( minLength )
173 , mMaxLength( maxLength )
189 const QString &pluginName,
190 const QString &defaultValue = QString(),
191 const QString &description = QString(),
192 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
205 int minLength()
const;
210 int maxLength()
const;
245 const QStringList &defaultValue = QStringList(),
246 const QString &description = QString(),
261 const QString §ion,
262 const QStringList &defaultValue = QStringList(),
263 const QString &description = QString(),
282 const QString &pluginName,
283 const QStringList &defaultValue = QStringList(),
284 const QString &description = QString(),
319 bool defaultValue =
false,
320 const QString &description = QString(),
335 const QString §ion,
336 bool defaultValue =
false,
337 const QString &description = QString(),
355 const QString &pluginName,
356 bool defaultValue =
false,
357 const QString &description = QString(),
395 int defaultValue = 0,
396 const QString &description = QString(),
397 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
398 int minValue = std::numeric_limits<int>::min(),
401 , mMinValue( minValue )
402 , mMaxValue( maxValue )
417 const QString §ion,
418 int defaultValue = 0,
419 const QString &description = QString(),
420 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
421 int minValue = std::numeric_limits<int>::min(),
424 , mMinValue( minValue )
425 , mMaxValue( maxValue )
443 const QString &pluginName,
444 int defaultValue = 0,
445 const QString &description = QString(),
446 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
447 int minValue = std::numeric_limits<int>::min(),
459 int minValue()
const;
464 int maxValue()
const;
501 qlonglong defaultValue = 0,
502 const QString &description = QString(),
503 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
504 qlonglong minValue = std::numeric_limits<qlonglong>::min(),
507 , mMinValue( minValue )
508 , mMaxValue( maxValue )
523 const QString §ion,
524 qlonglong defaultValue = 0,
525 const QString &description = QString(),
526 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
527 qlonglong minValue = std::numeric_limits<qlonglong>::min(),
528 qlonglong maxValue = std::numeric_limits<qlonglong>::max() )
530 , mMinValue( minValue )
531 , mMaxValue( maxValue )
539 qlonglong minValue()
const;
544 qlonglong maxValue()
const;
581 double defaultValue = 0.0,
582 const QString &description = QString(),
583 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
584 double minValue = std::numeric_limits<double>::lowest(),
585 double maxValue = std::numeric_limits<double>::max(),
588 , mMinValue( minValue )
589 , mMaxValue( maxValue )
590 , mDisplayHintDecimals( displayDecimals )
607 const QString §ion,
608 double defaultValue = 0.0,
609 const QString &description = QString(),
610 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
611 double minValue = std::numeric_limits<double>::lowest(),
612 double maxValue = std::numeric_limits<double>::max(),
615 , mMinValue( minValue )
616 , mMaxValue( maxValue )
617 , mDisplayHintDecimals( displayDecimals )
636 const QString &pluginName,
638 const QString &description = QString(),
639 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
640 double minValue = std::numeric_limits<double>::lowest(),
641 double maxValue = std::numeric_limits<double>::max(),
654 double minValue()
const;
659 double maxValue()
const;
666 void setDisplayHintDecimals(
int displayHintDecimals );
671 int displayHintDecimals()
const;
680 int mDisplayHintDecimals;
709 const QColor &defaultValue = QColor(),
710 const QString &description = QString(),
711 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
714 , mAllowAlpha( allowAlpha )
728 const QString §ion,
729 const QColor &defaultValue = QColor(),
730 const QString &description = QString(),
731 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
734 , mAllowAlpha( allowAlpha )
750 const QString &pluginName,
751 const QColor &defaultValue = QColor(),
752 const QString &description = QString(),
753 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
773 bool copyValueFromKeys(
const QString &redKey,
const QString &greenKey,
const QString &blueKey,
const QString &alphaKey = QString(),
bool removeSettingAtKey =
false ) const
SIP_SKIP;
779 void copyValueToKeys( const QString &redKey, const QString &greenKey, const QString &blueKey, const QString &alphaKey = QString() ) const
SIP_SKIP;
781 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 &name, QgsSettingsTreeNode *parent, bool defaultValue=false, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryBool.
QgsSettingsEntryBool(const QString &key, const QString §ion, bool defaultValue=false, const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryBool.
QgsSettingsEntryColor(const QString &key, const QString §ion, const QColor &defaultValue=QColor(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), bool allowAlpha=true)
Constructor for QgsSettingsEntryColor.
bool allowAlpha() const
Returns true if transparency is allowed for the color.
QgsSettingsEntryColor(const QString &name, QgsSettingsTreeNode *parent, const QColor &defaultValue=QColor(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions(), bool allowAlpha=true)
Constructor for QgsSettingsEntryColor.
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)
Constructor for QgsSettingsEntryDouble.
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)
Constructor for QgsSettingsEntryDouble.
A 64 bits integer (long long) settings entry.
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())
Constructor for QgsSettingsEntryInteger64.
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.
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())
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())
Constructor for QgsSettingsEntryInteger.
A string list settings entry.
QgsSettingsEntryStringList(const QString &name, QgsSettingsTreeNode *parent, const QStringList &defaultValue=QStringList(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryStringList.
QgsSettingsEntryStringList(const QString &key, const QString §ion, const QStringList &defaultValue=QStringList(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryStringList.
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)
Constructor for QgsSettingsEntryString.
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)
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())
Constructor for QgsSettingsEntryVariantMap.
QgsSettingsEntryVariantMap(const QString &name, QgsSettingsTreeNode *parent, const QVariantMap &defaultValue=QVariantMap(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryVariantMap.
A variant settings entry.
QgsSettingsEntryVariant(const QString &name, QgsSettingsTreeNode *parent, const QVariant &defaultValue=QVariant(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryVariant.
QVariant convertFromVariant(const QVariant &value) const override
Converts the variant value to the value type of the setting.
QgsSettingsEntryVariant(const QString &key, const QString §ion, const QVariant &defaultValue=QVariant(), const QString &description=QString(), Qgis::SettingsOptions options=Qgis::SettingsOptions())
Constructor for QgsSettingsEntryVariant.
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,...)