# Class e.p.p.w.s.Style(gobject.GObject):

Part of elisa.plugins.pigment.widgets.style View In Hierarchy

A very simple and dynamic style object.

Just a set of properties (object attributes) and a reference to the widget owning it. When changed, a property emit the 'property-changed' signal.

Instance Variables | widget | the widget owning the style (type: `elisa.plugins.pigment.widgets.Widget` )

Line # | Kind | Name | Docs
--- | --- | --- | ---
37 | Method | __init__ | Initialize the style object with the given properties
57 | Method | __setattr__ | Set the property's value, emitting a 'property-changed' signal
76 | Method | update | Merge in-place the properties of another style.
80 | Method | merge | Merge the properties of another style and returns a new one.
108 | Method | do_property_changed | Dummy 'property-changed' signal handler
112 | Method | __iter__ | Undocumented
115 | Method | get_properties | The list of set properties.
124 | Method | get_items | The dictionary of properties => property values.
133 | Method | __repr__ | Undocumented

def __init__(self, **kwargs):
Initialize the style object with the given properties

Parameters | kwargs | the properties dictionary (type: dictionary )

def __setattr__(self, key, value):
Set the property's value, emitting a 'property-changed' signal

Parameters | key | the property to set (type: the string )
| value | the property's value (type: any )

def update(self, other):
Merge in-place the properties of another style.

def merge(self, other, inplace=True):

Merge the properties of another style and returns a new one.

The new style will have all the properties of the current style, with replaced values from the second, plus further properties coming from the other style.

Parameters | other | the style to merge (type: `elisa.plugins.pigment.widgets.Style` )
| inplace | whether to build another style, or update the current one
| inplate | (type: boolean )
Returns | the new style (type: `elisa.plugins.pigment.widgets.Style` )

def do_property_changed(self, key, value):
Dummy 'property-changed' signal handler

def __iter__(self):
Undocumented
def get_properties(self):
The list of set properties.

Returns | the list of set properties (type: list of strings )

def get_items(self):
The dictionary of properties => property values.

Returns | the dictionary of properties (type: dict )

def __repr__(self):
Undocumented