# Class k.u.PropertyObject(object):

Part of kiwi.utils View In Hierarchy

Known subclasses: kiwi.ui.entry.KiwiEntry, kiwi.ui.hyperlink.HyperLink, kiwi.ui.objectlist.Column, kiwi.ui.objectlist.ObjectList, kiwi.ui.widgets.button.ProxyButton, kiwi.ui.widgets.checkbutton.ProxyCheckButton, kiwi.ui.widgets.colorbutton.ProxyColorButton, kiwi.ui.widgets.combo.ProxyComboBox, kiwi.ui.widgets.combo.ProxyComboBoxEntry, kiwi.ui.widgets.combo.ProxyComboEntry, kiwi.ui.widgets.entry.ProxyDateEntry, kiwi.ui.widgets.filechooser.ProxyFileChooserButton, kiwi.ui.widgets.filechooser.ProxyFileChooserWidget, kiwi.ui.widgets.fontbutton.ProxyFontButton, kiwi.ui.widgets.label.ProxyLabel, kiwi.ui.widgets.radiobutton.ProxyRadioButton, kiwi.ui.widgets.scale.ProxyHScale, kiwi.ui.widgets.scale.ProxyVScale, kiwi.ui.widgets.spinbutton.ProxySpinButton, kiwi.ui.widgets.textview.ProxyTextView

I am an object which maps GObject properties to attributes To be able to use me, you must also inherit from a gobject.GObject subclass.

Example:

    >>> from kiwi.utils import PropertyObject, gproperty

    >>> class Person(PropertyObject, gobject.GObject):
    >>>     gproperty('name', str)
    >>>     gproperty('age', int)
    >>>     gproperty('married', bool, False)

    >>> test = Test()
    >>> test.age = 20
    >>> test.age
    20
    >>> test.married
    False

Method | __init__ | Undocumented
Class Method | __class_init__ | Undocumented
Method | __post_init__ | A hook which is called after the constructor is called.
Method | _set | Undocumented
Method | _get | Undocumented
Method | get_attribute_names | Undocumented
Method | is_default_value | Undocumented
Method | do_set_property | Undocumented
Method | do_get_property | Undocumented

def __init__(self, **kwargs):
overridden in kiwi.ui.entry.KiwiEntry, kiwi.ui.hyperlink.HyperLink, kiwi.ui.objectlist.Column, kiwi.ui.objectlist.ObjectList, kiwi.ui.widgets.button.ProxyButton, kiwi.ui.widgets.checkbutton.ProxyCheckButton, kiwi.ui.widgets.colorbutton.ProxyColorButton, kiwi.ui.widgets.combo.ProxyComboBox, kiwi.ui.widgets.combo.ProxyComboBoxEntry, kiwi.ui.widgets.combo.ProxyComboEntry, kiwi.ui.widgets.entry.ProxyDateEntry, kiwi.ui.widgets.filechooser.ProxyFileChooserButton, kiwi.ui.widgets.filechooser.ProxyFileChooserWidget, kiwi.ui.widgets.fontbutton.ProxyFontButton, kiwi.ui.widgets.label.ProxyLabel, kiwi.ui.widgets.radiobutton.ProxyRadioButton, kiwi.ui.widgets.scale.ProxyHScale, kiwi.ui.widgets.scale.ProxyVScale, kiwi.ui.widgets.spinbutton.ProxySpinButton, kiwi.ui.widgets.textview.ProxyTextView
Undocumented
@classmethod
def __class_init__(cls, namespace):
Undocumented
def __post_init__(self):
overridden in kiwi.ui.widgets.entry.ProxyEntry
A hook which is called after the constructor is called. It's mainly here to workaround http://bugzilla.gnome.org/show_bug.cgi?id=425501 so you can set properties at construction time

def _set(self, name, value):
Undocumented
def _get(self, name):
Undocumented
def get_attribute_names(self):
Undocumented
def is_default_value(self, attr, value):
Undocumented
def do_set_property(self, pspec, value):
Undocumented
def do_get_property(self, pspec):
Undocumented