|
Krita Source Code Documentation
|
#include <kis_properties_configuration.h>
Inheritance diagram for KisPropertiesConfiguration:Public Member Functions | |
| void | clearProperties () |
| Clear the map of properties. | |
| virtual bool | compareTo (const KisPropertiesConfiguration *rhs) const |
| virtual void | dump () const |
| void | fromXML (const QDomElement &) override |
| bool | fromXML (const QString &xml, bool clear=true) override |
| bool | getBool (const QString &name, bool def=false) const |
| KoColor | getColor (const QString &name, const KoColor &color=KoColor()) const |
| getColor fetch the given property as a KoColor. | |
| KisCubicCurve | getCubicCurve (const QString &name, const KisCubicCurve &curve=KisCubicCurve()) const |
| double | getDouble (const QString &name, double def=0.0) const |
| float | getFloat (const QString &name, float def=0.0) const |
| int | getInt (const QString &name, int def=0) const |
| void | getPrefixedProperties (const QString &prefix, KisPropertiesConfiguration *config) const |
| void | getPrefixedProperties (const QString &prefix, KisPropertiesConfigurationSP config) const |
| virtual QMap< QString, QVariant > | getProperties () const |
| virtual QList< QString > | getPropertiesKeys () const |
| virtual QVariant | getProperty (const QString &name) const |
| virtual bool | getProperty (const QString &name, QVariant &value) const |
| QString | getPropertyLazy (const QString &name, const char *defaultValue) const |
| QStringList | getPropertyLazy (const QString &name, const QStringList &defaultValue) const |
| template<typename T > | |
| T | getPropertyLazy (const QString &name, const T &defaultValue) const |
| QString | getString (const QString &name, const QString &def=QString()) const |
| QStringList | getStringList (const QString &name, const QStringList &defaultValue=QStringList()) const |
| virtual bool | hasProperty (const QString &name) const |
| KisPropertiesConfiguration () | |
| KisPropertiesConfiguration (const KisPropertiesConfiguration &rhs) | |
| KisPropertiesConfiguration & | operator= (const KisPropertiesConfiguration &rhs) |
| void | removeProperty (const QString &name) |
| void | setPrefixedProperties (const QString &prefix, const KisPropertiesConfiguration *config) |
| void | setPrefixedProperties (const QString &prefix, const KisPropertiesConfigurationSP config) |
| void | setProperty (const QString &name, const QStringList &value) |
| virtual void | setProperty (const QString &name, const QVariant &value) |
| void | setPropertyNotSaved (const QString &name) |
| Marks a property that should not be saved by toXML. | |
| QString | toXML () const override |
| void | toXML (QDomDocument &, QDomElement &) const override |
| ~KisPropertiesConfiguration () override | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KisSerializableConfiguration | |
| KisSerializableConfiguration () | |
| KisSerializableConfiguration (const KisSerializableConfiguration &rhs) | |
| virtual | ~KisSerializableConfiguration () |
Public Member Functions inherited from KisShared | |
| bool | deref () |
| bool | ref () |
| int | refCount () |
| QAtomicInt * | sharedWeakReference () |
Static Public Member Functions | |
| static QString | escapeString (const QString &string) |
| static QString | extractedPrefixKey () |
| static QString | unescapeString (const QString &string) |
Public Attributes | |
| QSet< QString > | notSavedProperties |
| QMap< QString, QVariant > | properties |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Private Attributes | |
| Private *const | d |
Additional Inherited Members | |
Protected Member Functions inherited from KisShared | |
| KisShared () | |
| ~KisShared () | |
KisPropertiesConfiguration is a map-based properties class that can be serialized and deserialized.
It differs from the base class KisSerializableConfiguration in that it provides a number of convenience methods to get at the data and
Definition at line 26 of file kis_properties_configuration.cc.
| KisPropertiesConfiguration::KisPropertiesConfiguration | ( | ) |
Create a new properties config.
Definition at line 31 of file kis_properties_configuration.cc.
|
override |
| KisPropertiesConfiguration::KisPropertiesConfiguration | ( | const KisPropertiesConfiguration & | rhs | ) |
Deep copy the properties rhs
Definition at line 40 of file kis_properties_configuration.cc.
| void KisPropertiesConfiguration::clearProperties | ( | ) |
Clear the map of properties.
Definition at line 301 of file kis_properties_configuration.cc.
References d.
|
virtual |
Structural comparison between two instances.
Reimplemented in KisFilterConfiguration, KisCrossChannelFilterConfiguration, and KisMultiChannelFilterConfiguration.
Definition at line 434 of file kis_properties_configuration.cc.
References getPropertiesKeys(), and getProperty().
|
virtual |
Reimplemented in KisLockedPropertiesProxy.
Definition at line 282 of file kis_properties_configuration.cc.
References d.
|
static |
Definition at line 373 of file kis_properties_configuration.cc.
|
static |
After calling getPropertiesConfiguration() the resulting properties will contain the prefix they were packed with. The prefix can be requested with the key returned by extractedPrefixKey() function.
Definition at line 367 of file kis_properties_configuration.cc.
|
overridevirtual |
Fill the properties configuration object from the XML encoded representation in s. This function use the "Legacy" style XML of the 1.x .kra file format.
Note: the existing properties will not be cleared
Implements KisSerializableConfiguration.
Definition at line 70 of file kis_properties_configuration.cc.
|
overridevirtual |
Fill the properties configuration object from the XML encoded representation in s. This function use the "Legacy" style XML of the 1.x .kra file format.
| xml | the string that will be parsed as xml |
| clear | if true, the properties map will be emptied. |
Reimplemented from KisSerializableConfiguration.
Definition at line 55 of file kis_properties_configuration.cc.
References clearProperties().
| bool KisPropertiesConfiguration::getBool | ( | const QString & | name, |
| bool | def = false ) const |
Definition at line 196 of file kis_properties_configuration.cc.
References getProperty(), and v.
| KoColor KisPropertiesConfiguration::getColor | ( | const QString & | name, |
| const KoColor & | color = KoColor() ) const |
getColor fetch the given property as a KoColor.
The color can be stored as
| name | the name of the property |
| color | the default value to be returned if the |
| name | does not exist. |
Definition at line 227 of file kis_properties_configuration.cc.
References KoColor::fromXML(), getProperty(), KoID::id(), KoColorSpaceRegistry::instance(), Integer16BitsColorDepthID, and v.
| KisCubicCurve KisPropertiesConfiguration::getCubicCurve | ( | const QString & | name, |
| const KisCubicCurve & | curve = KisCubicCurve() ) const |
Definition at line 214 of file kis_properties_configuration.cc.
References getProperty(), and v.
| double KisPropertiesConfiguration::getDouble | ( | const QString & | name, |
| double | def = 0.0 ) const |
Definition at line 177 of file kis_properties_configuration.cc.
References getProperty(), and v.
| float KisPropertiesConfiguration::getFloat | ( | const QString & | name, |
| float | def = 0.0 ) const |
Definition at line 186 of file kis_properties_configuration.cc.
References getProperty(), and v.
| int KisPropertiesConfiguration::getInt | ( | const QString & | name, |
| int | def = 0 ) const |
Definition at line 167 of file kis_properties_configuration.cc.
References getProperty(), and v.
| void KisPropertiesConfiguration::getPrefixedProperties | ( | const QString & | prefix, |
| KisPropertiesConfiguration * | config ) const |
Get a set of properties, which keys are prefixed with prefix. The settings object config will have all these properties with the prefix stripped from them.
Definition at line 326 of file kis_properties_configuration.cc.
References extractedPrefixKey(), getPropertiesKeys(), getProperty(), getString(), setProperty(), and setPropertyNotSaved().
| void KisPropertiesConfiguration::getPrefixedProperties | ( | const QString & | prefix, |
| KisPropertiesConfigurationSP | config ) const |
A convenience override
Definition at line 349 of file kis_properties_configuration.cc.
References KisSharedPtr< T >::data(), and getPrefixedProperties().
|
virtual |
Definition at line 311 of file kis_properties_configuration.cc.
References d.
|
virtual |
Get the keys of all the properties in the object
Reimplemented in KisLockedPropertiesProxy.
Definition at line 321 of file kis_properties_configuration.cc.
References d.
|
virtual |
Reimplemented in KisLockedPropertiesProxy, and KisLockedPropertiesProxy.
Definition at line 161 of file kis_properties_configuration.cc.
References d.
|
virtual |
Set value to the value associated with property name
XXX: API alert: a setter that is prefixed with get?
Reimplemented in KisLockedPropertiesProxy.
Definition at line 151 of file kis_properties_configuration.cc.
|
inline |
Definition at line 111 of file kis_properties_configuration.h.
| QStringList KisPropertiesConfiguration::getPropertyLazy | ( | const QString & | name, |
| const QStringList & | defaultValue ) const |
Definition at line 429 of file kis_properties_configuration.cc.
References getStringList().
|
inline |
| QString KisPropertiesConfiguration::getString | ( | const QString & | name, |
| const QString & | def = QString() ) const |
Definition at line 205 of file kis_properties_configuration.cc.
References getProperty(), and v.
| QStringList KisPropertiesConfiguration::getStringList | ( | const QString & | name, |
| const QStringList & | defaultValue = QStringList() ) const |
Definition at line 403 of file kis_properties_configuration.cc.
References getString(), hasProperty(), and unescapeString().
|
virtual |
Reimplemented in KisLockedPropertiesProxy.
Definition at line 137 of file kis_properties_configuration.cc.
References d.
| KisPropertiesConfiguration & KisPropertiesConfiguration::operator= | ( | const KisPropertiesConfiguration & | rhs | ) |
Deep copy the properties rhs
Definition at line 46 of file kis_properties_configuration.cc.
References d.
| void KisPropertiesConfiguration::removeProperty | ( | const QString & | name | ) |
Definition at line 316 of file kis_properties_configuration.cc.
References d.
| void KisPropertiesConfiguration::setPrefixedProperties | ( | const QString & | prefix, |
| const KisPropertiesConfiguration * | config ) |
Takes all the properties from config, adds prefix to all their keys and puts them into this properties object
Definition at line 354 of file kis_properties_configuration.cc.
References getPropertiesKeys(), getProperty(), and setProperty().
| void KisPropertiesConfiguration::setPrefixedProperties | ( | const QString & | prefix, |
| const KisPropertiesConfigurationSP | config ) |
A convenience override
Definition at line 362 of file kis_properties_configuration.cc.
References KisSharedPtr< T >::data(), and setPrefixedProperties().
| void KisPropertiesConfiguration::setProperty | ( | const QString & | name, |
| const QStringList & | value ) |
Definition at line 391 of file kis_properties_configuration.cc.
References escapeString(), setProperty(), and value().
|
virtual |
Set the property with name to value.
Reimplemented in KisLockedPropertiesProxy, KisLockedPropertiesProxy, KisPaintOpSettings, KisColorTransformationConfiguration, KisCrossChannelFilterConfiguration, KisMultiChannelFilterConfiguration, KisHalftoneFilterConfiguration, and KisLevelsFilterConfiguration.
Definition at line 142 of file kis_properties_configuration.cc.
| void KisPropertiesConfiguration::setPropertyNotSaved | ( | const QString & | name | ) |
Marks a property that should not be saved by toXML.
Definition at line 306 of file kis_properties_configuration.cc.
References d.
|
overridevirtual |
Create a serialized version of this properties config This function use the "Legacy" style XML of the 1.x .kra file format.
Reimplemented from KisSerializableConfiguration.
Definition at line 127 of file kis_properties_configuration.cc.
References toXML().
|
overridevirtual |
Create a serialized version of this properties config This function use the "Legacy" style XML of the 1.x .kra file format.
Implements KisSerializableConfiguration.
Definition at line 89 of file kis_properties_configuration.cc.
|
static |
Definition at line 382 of file kis_properties_configuration.cc.
|
private |
Definition at line 209 of file kis_properties_configuration.h.
| QSet<QString> KisPropertiesConfiguration::notSavedProperties |
Definition at line 28 of file kis_properties_configuration.cc.
| QMap<QString, QVariant> KisPropertiesConfiguration::properties |
Definition at line 27 of file kis_properties_configuration.cc.