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 );
145 const QString &defaultValue = QString(),
146 const QString &description = QString(),
147 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
151 , mMinLength( minLength )
152 , mMaxLength( maxLength )
167 const QString §ion,
168 const QString &defaultValue = QString(),
169 const QString &description = QString(),
170 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
174 , mMinLength( minLength )
175 , mMaxLength( maxLength )
191 const QString &pluginName,
192 const QString &defaultValue = QString(),
193 const QString &description = QString(),
194 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
207 int minLength()
const;
212 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(),
322 bool defaultValue =
false,
323 const QString &description = QString(),
338 const QString §ion,
339 bool defaultValue =
false,
340 const QString &description = QString(),
358 const QString &pluginName,
359 bool defaultValue =
false,
360 const QString &description = QString(),
399 int defaultValue = 0,
400 const QString &description = QString(),
401 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
402 int minValue = std::numeric_limits<int>::min(),
405 , mMinValue( minValue )
406 , mMaxValue( maxValue )
421 const QString §ion,
422 int defaultValue = 0,
423 const QString &description = QString(),
424 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
425 int minValue = std::numeric_limits<int>::min(),
428 , mMinValue( minValue )
429 , mMaxValue( maxValue )
447 const QString &pluginName,
448 int defaultValue = 0,
449 const QString &description = QString(),
450 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
451 int minValue = std::numeric_limits<int>::min(),
463 int minValue()
const;
468 int maxValue()
const;
504 qlonglong defaultValue = 0,
505 const QString &description = QString(),
506 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
507 qlonglong minValue = std::numeric_limits<qlonglong>::min(),
510 , mMinValue( minValue )
511 , mMaxValue( maxValue )
526 const QString §ion,
527 qlonglong defaultValue = 0,
528 const QString &description = QString(),
529 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
530 qlonglong minValue = std::numeric_limits<qlonglong>::min(),
531 qlonglong maxValue = std::numeric_limits<qlonglong>::max() )
533 , mMinValue( minValue )
534 , mMaxValue( maxValue )
542 qlonglong minValue()
const;
547 qlonglong maxValue()
const;
550 bool checkValue( qlonglong value )
const override;
583 double defaultValue = 0.0,
584 const QString &description = QString(),
585 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
586 double minValue = std::numeric_limits<double>::lowest(),
587 double maxValue = std::numeric_limits<double>::max(),
590 , mMinValue( minValue )
591 , mMaxValue( maxValue )
592 , mDisplayHintDecimals( displayDecimals )
609 const QString §ion,
610 double defaultValue = 0.0,
611 const QString &description = QString(),
612 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
613 double minValue = std::numeric_limits<double>::lowest(),
614 double maxValue = std::numeric_limits<double>::max(),
617 , mMinValue( minValue )
618 , mMaxValue( maxValue )
619 , mDisplayHintDecimals( displayDecimals )
638 const QString &pluginName,
640 const QString &description = QString(),
641 Qgis::SettingsOptions options = Qgis::SettingsOptions(),
642 double minValue = std::numeric_limits<double>::lowest(),
643 double maxValue = std::numeric_limits<double>::max(),
656 double minValue()
const;
661 double maxValue()
const;
668 void setDisplayHintDecimals(
int displayHintDecimals );
673 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;
784 QColor convertFromVariant( const QVariant &value ) const override
SIP_FORCE;
785 bool checkValue( 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.
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.
Base abstract class for settings entry which are passed by reference.
virtual Qgis::SettingsType settingsType() const override=0
Returns the settings entry type.
virtual T convertFromVariant(const QVariant &value) const =0
Converts the variant value to the value type of the setting.
virtual bool checkValue(const T &value) const
Check if the value is valid.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
Base abstract class for settings entry which are passed by value.
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.
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,...)