|
| WidgetPropertyManager (ManagedWidgetPropertyObject *_object=(ManagedWidgetPropertyObject *) nullptr) |
| Constructor. Creates a default PropertyManager.
|
|
| WidgetPropertyManager (WidgetPropertyManager &&_other) noexcept |
| Move constructor.
|
|
virtual | ~WidgetPropertyManager () |
| Destructor.
|
|
WidgetPropertyManager & | operator= (WidgetPropertyManager &&_other) noexcept |
| Assignment move operator.
|
|
virtual void | propertyChanged (const Property *_property) override |
| Will be called whenever a property has been changed.
|
|
virtual void | readingProperty (const std::string &_propertyGroupName, const std::string &_propertyName) const override |
| Will be called before a property will be read.
|
|
void | addPropertyLink (ManagedPropertyLink *_link) |
| Add property link to list.
|
|
void | forgetPropertyLink (ManagedPropertyLink *_link) |
| Remove the property link from the lists.
|
|
const std::list< ManagedPropertyLink * > & | getPropertyLinks (void) const |
| Return all currently registered propery links.
|
|
void | setManagedObject (ManagedWidgetPropertyObject *_object) |
| Set the managed property object that owns this manager.
|
|
ManagedWidgetPropertyObject * | getManagedObject (void) const |
| Returns the managed property object that owns this manager.
|
|
| PropertyManager () |
| Default constructor.
|
|
| PropertyManager (const ConstJsonObject &_jsonObject) |
| Deserialize constructor.
|
|
| PropertyManager (PropertyManager &&_other) noexcept |
| Move constructor.
|
|
virtual | ~PropertyManager () |
| Destructor.
|
|
PropertyManager & | operator= (PropertyManager &&_other) noexcept |
| Move assignment operator.
|
|
virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override |
| Serializes the object to a JSON structure.
|
|
virtual void | setFromJsonObject (const ot::ConstJsonObject &_object) override |
| Deserializes the object from a JSON structure.
|
|
void | setSilenceNotifications (bool _silence) |
| Set the notifications silenced. If set property access won't trigger any notification.
|
|
bool | getSilenceNotifications (void) const |
|
void | notifyAllChanged (void) |
| Will call PropertyManager::propertyChanged for every property that is currently registered. Calling this method if the manager is currently silenced will have no effect.
|
|
ot::Property * | addProperty (const std::string &_groupName, Property *_property) |
| Adds the property to the specified group. The property should not exist, an existing one will be replaced.
|
|
void | updateProperty (const std::string &_groupName, Property *_property) |
| Updates an existing property or creates a new one.
|
|
void | mergeWith (const PropertyManager &_other, const PropertyBase::MergeMode &_mergeMode=PropertyBase::MergeValues) |
| Merge the properties with the other manager.
|
|
void | updateProperty (const std::string &_groupName, const Property *_property, bool _deleteProvidedProperty) |
| Updates an existing property or creates a new one.
|
|
PropertyBool * | setBool (const std::string &_groupName, const std::string &_valueName, bool _value) |
| Sets boolean property.
|
|
PropertyInt * | setInt (const std::string &_groupName, const std::string &_valueName, int _value) |
| Sets integer property.
|
|
PropertyDouble * | setDouble (const std::string &_groupName, const std::string &_valueName, double _value) |
| Sets double property.
|
|
PropertyString * | setString (const std::string &_groupName, const std::string &_valueName, const std::string &_value) |
| Sets string property.
|
|
PropertyStringList * | setStringList (const std::string &_groupName, const std::string &_valueName, const std::string &_value) |
| Sets string property.
|
|
PropertyColor * | setColor (const std::string &_groupName, const std::string &_valueName, const Color &_value) |
| Sets color property.
|
|
PropertyPainter2D * | setPainter2D (const std::string &_groupName, const std::string &_valueName, Painter2D *_painter) |
| Sets painter property.
|
|
PropertyPainter2D * | setPainter2D (const std::string &_groupName, const std::string &_valueName, const Painter2D *_painter) |
| Sets painter property.
|
|
PropertyPath * | setPath (const std::string &_groupName, const std::string &_valueName, const std::string &_path) |
| Sets path property.
|
|
Property * | findProperty (const std::string &_groupName, const std::string &_valueName) |
| Finds a property by group and name.
|
|
const Property * | findProperty (const std::string &_groupName, const std::string &_valueName) const |
| Finds a property by group and name.
|
|
bool | getBool (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves boolean property value.
|
|
int | getInt (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves int property value.
|
|
double | getDouble (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves double property value.
|
|
const std::string & | getString (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves string property value.
|
|
const Color & | getColor (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves color property value.
|
|
const Painter2D * | getPainter2D (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves Painter2D property value.
|
|
const std::string & | getPath (const std::string &_groupName, const std::string &_valueName) const |
| Retrieves path property value.
|
|
template<class T > |
T * | getProperty (const std::string &_groupName, const std::string &_valueName) |
| Finds a property by group and name. The found property will be casted to the specified type.
|
|
template<class T > |
const T * | getProperty (const std::string &_groupName, const std::string &_valueName) const |
| Finds a property by group and name. The found property will be casted to the specified type.
|
|
PropertyGridCfg | createGridConfiguration (void) const |
| Creates a grid configuration that can be used to serialize or visualize the properties.
|
|
void | clear (void) |
| Removes all groups and properties.
|
|
const std::map< std::string, PropertyGroup * > & | getData (void) const |
| Return data that is managed by this property manager.
|
|
void | addNotifier (PropertyManagerNotifier *_notifier) |
| Register property manager notifier.
|
|
PropertyManagerNotifier * | removeNotifier (PropertyManagerNotifier *_notifier, bool _destroyObject) |
| Remove given notifier from this manager.
|
|
void | addReadCallbackNotifier (PropertyReadCallbackNotifier *_notifier) |
| Add read callback notifier. The read callback notifier will receive read callbacks for the property under the currently set property path. The callback method is called before the property read operation starts.
|
|
void | removeReadCallbackNotifier (PropertyReadCallbackNotifier *_notifier) |
|
void | addWriteCallbackNotifier (PropertyWriteCallbackNotifierBase *_notifier) |
| Add write callback notifier. The write callback notifier will receive write callbacks for the property under the currently set property path. The callback method is called after the property write operation finishes and before the.
|
|
void | removeWriteCallbackNotifier (PropertyWriteCallbackNotifierBase *_notifier) |
| Remove write callback notifier.
|
|
| Serializable () |
|
| Serializable (const Serializable &) |
|
| Serializable (Serializable &&) noexcept |
|
virtual | ~Serializable () |
|
Serializable & | operator= (const Serializable &) |
|
Serializable & | operator= (Serializable &&) noexcept |
|
The WidgetPropertyManager class is an extended PropertyManager wrapper. It allows to use frontend component links to the properties enabling build in property handling.