glibmm 2.66.5
|
A PropertyProxy can be used to get and set the value of an object's property. More...
#include <glibmm/propertyproxy.h>
Public Types | |
using | PropertyType = T |
Public Member Functions | |
PropertyProxy (ObjectBase * obj, const char * name) | |
void | set_value (const PropertyType &data) |
Set the value of this property. More... | |
PropertyType | get_value () const |
Get the value of this property. More... | |
void | reset_value () |
Set the value of this property back to its default value. More... | |
PropertyProxy< T > & | operator= (const PropertyType &data) |
operator PropertyType () const | |
Public Member Functions inherited from Glib::PropertyProxy_Base | |
PropertyProxy_Base (ObjectBase * obj, const char * property_name) | |
PropertyProxy_Base (const PropertyProxy_Base & other) | |
SignalProxyProperty | signal_changed () |
This signal will be emitted when the property changes. More... | |
ObjectBase * | get_object () const |
const char * | get_name () const |
Additional Inherited Members | |
Protected Member Functions inherited from Glib::PropertyProxy_Base | |
void | set_property_ (const Glib::ValueBase & value) |
void | get_property_ (Glib::ValueBase & value) const |
void | reset_property_ () |
Protected Attributes inherited from Glib::PropertyProxy_Base | |
ObjectBase * | obj_ |
const char * | property_name_ |
A PropertyProxy can be used to get and set the value of an object's property.
There are usually also get and set methods on the class itself, which you might find more convenient. With the PropertyProxy, you may use either get_value() and set_value(), or operator=() and operator PropertyType(), like so:
You may also receive notification when a property's value changes, by connecting to signal_changed().
using Glib::PropertyProxy< T >::PropertyType = T |
|
inline |
PropertyType Glib::PropertyProxy< T >::get_value | ( | ) | const |
Get the value of this property.
|
inline |
|
inline |
|
inline |
Set the value of this property back to its default value.
void Glib::PropertyProxy< T >::set_value | ( | const PropertyType & | data | ) |
Set the value of this property.
data | The new value for the property. |