Gladeui.Property

g GObject.Object GObject.Object Gladeui.Property Gladeui.Property GObject.Object->Gladeui.Property

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (def_, widget, value)

class

pop_superuser ()

class

push_superuser ()

class

superuser ()

add_object (object)

default ()

dup (widget)

equals_value (value)

get_def ()

get_default (value)

get_enabled ()

get_save_always ()

get_sensitive ()

get_state ()

get_support_warning ()

get_value (value)

get_widget ()

i18n_get_comment ()

i18n_get_context ()

i18n_get_translatable ()

i18n_set_comment (str)

i18n_set_context (str)

i18n_set_translatable (translatable)

inline_value ()

load ()

make_string ()

original_default ()

original_reset ()

read (project, node)

remove_object (object)

reset ()

set_enabled (enabled)

set_save_always (setting)

set_sensitive (sensitive, reason)

set_support_warning (disable, reason)

set_value (value)

set_widget (widget)

sync ()

warn_usage ()

write (context, node)

Virtual Methods

Inherited:

GObject.Object (7)

do_dup (widget)

do_equals_value (value)

do_get_value (value)

do_load ()

do_set_value (value)

do_sync ()

do_tooltip_changed (tooltip, insensitive_tooltip, support_warning)

do_value_changed (old_value, new_value)

Properties

Name

Type

Flags

Short Description

class

int

r/w/co

The Gladeui.PropertyDef for this property

enabled

bool

r/w

If the property is optional, this is its enabled state

i18n-comment

str

r/w

Comment for translators

i18n-context

str

r/w

Context for translation

i18n-translatable

bool

r/w

Whether this property is translatable

precision

int

r/w

Where applicable, precision to use on editors

sensitive

bool

r/w

This gives backends control to set property sensitivity

state

int

r

Priority information for the property editor to act on

Signals

Inherited:

GObject.Object (1)

Name

Short Description

tooltip-changed

value-changed

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Gladeui.Property(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gladeui.PropertyClass

classmethod new(def_, widget, value)
Parameters:
Returns:

The newly created Gladeui.Property

Return type:

Gladeui.Property

Creates a Gladeui.Property of type klass for widget with value; if value is None, then the introspected default value for that property will be used.

classmethod pop_superuser()
classmethod push_superuser()
classmethod superuser()
Return type:

bool

add_object(object)
Parameters:

object (GObject.Object) – The GObject.Object to add

Adds object to the object list in self.

Note: This function expects self to be a Gladeui.ParamSpecObjects or GObject.ParamSpecObject type property.

default()
Returns:

Whether this property is at its default value

Return type:

bool

dup(widget)
Parameters:

widget (Gladeui.Widget) – A Gladeui.Widget

Returns:

A newly duplicated property based on the new widget

Return type:

Gladeui.Property

equals_value(value)
Parameters:

value (GObject.Value) – a GObject.Value

Returns:

Whether this property is equal to the value provided

Return type:

bool

get_def()
Returns:

a Gladeui.PropertyDef

Return type:

Gladeui.PropertyDef

Get the Gladeui.PropertyDef this property was created for.

get_default(value)
Parameters:

value (GObject.Value) – a GObject.Value

Retrieve the default property value

get_enabled()
Return type:

bool

get_save_always()
Returns:

whether this property is special cased to always be saved regardless of its default value.

Return type:

bool

get_sensitive()
Return type:

bool

get_state()
Return type:

Gladeui.PropertyState

get_support_warning()
Return type:

str

get_value(value)
Parameters:

value (GObject.Value) – a GObject.Value

Retrieve the property value

get_widget()
Returns:

a Gladeui.Widget

Return type:

Gladeui.Widget

i18n_get_comment()
Return type:

str

i18n_get_context()
Return type:

str

i18n_get_translatable()
Return type:

bool

i18n_set_comment(str)
Parameters:

str (str) –

i18n_set_context(str)
Parameters:

str (str) –

i18n_set_translatable(translatable)
Parameters:

translatable (bool) –

inline_value()
Return type:

GObject.Value

load()

Loads the value of self from the corresponding object instance

make_string()
Return type:

str

original_default()
Returns:

Whether this property is at its original default value

Return type:

bool

original_reset()

Resets this property to its original default value

read(project, node)
Parameters:

Read the value and any attributes for self from node, assumes self is being loaded for project

Note that object values will only be resolved after the project is completely loaded

remove_object(object)
Parameters:

object (GObject.Object) – The GObject.Object to add

Removes object from the object list in self.

Note: This function expects self to be a Gladeui.ParamSpecObjects or GObject.ParamSpecObject type property.

reset()

Resets this property to its default value

set_enabled(enabled)
Parameters:

enabled (bool) –

set_save_always(setting)
Parameters:

setting (bool) – the value to set

Sets whether this property should be special cased to always be saved regardless of its default value. (used for some special cases like properties that are assigned initial values in composite widgets or derived widget code).

set_sensitive(sensitive, reason)
Parameters:
  • sensitive (bool) –

  • reason (str) –

set_support_warning(disable, reason)
Parameters:
  • disable (bool) –

  • reason (str) –

set_value(value)
Parameters:

value (GObject.Value) – a GObject.Value

Returns:

Whether the property was successfully set.

Return type:

bool

Sets the property’s value

set_widget(widget)
Parameters:

widget (Gladeui.Widget) – a Gladeui.Widget

sync()

Synchronize the object with this property

warn_usage()
Return type:

bool

write(context, node)
Parameters:

Write self to node

do_dup(widget) virtual
Parameters:

widget (Gladeui.Widget) – A Gladeui.Widget

Returns:

A newly duplicated property based on the new widget

Return type:

Gladeui.Property

do_equals_value(value) virtual
Parameters:

value (GObject.Value) – a GObject.Value

Returns:

Whether this property is equal to the value provided

Return type:

bool

do_get_value(value) virtual
Parameters:

value (GObject.Value) – a GObject.Value

Retrieve the property value

do_load() virtual

Loads the value of property from the corresponding object instance

do_set_value(value) virtual
Parameters:

value (GObject.Value) – a GObject.Value

Returns:

Whether the property was successfully set.

Return type:

bool

Sets the property’s value

do_sync() virtual

Synchronize the object with this property

do_tooltip_changed(tooltip, insensitive_tooltip, support_warning) virtual
Parameters:
  • tooltip (str) –

  • insensitive_tooltip (str) –

  • support_warning (str) –

do_value_changed(old_value, new_value) virtual
Parameters:

Signal Details

Gladeui.Property.signals.tooltip_changed(property, object, p0, p1)
Signal Name:

tooltip-changed

Flags:

RUN_LAST

Parameters:
Gladeui.Property.signals.value_changed(property, object, p0)
Signal Name:

value-changed

Flags:

RUN_LAST

Parameters:

Property Details

Gladeui.Property.props.class_
Name:

class

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Gladeui.PropertyDef for this property

Gladeui.Property.props.enabled
Name:

enabled

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

If the property is optional, this is its enabled state

Gladeui.Property.props.i18n_comment
Name:

i18n-comment

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Comment for translators

Gladeui.Property.props.i18n_context
Name:

i18n-context

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Context for translation

Gladeui.Property.props.i18n_translatable
Name:

i18n-translatable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether this property is translatable

Gladeui.Property.props.precision
Name:

precision

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE

Where applicable, precision to use on editors

Gladeui.Property.props.sensitive
Name:

sensitive

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

This gives backends control to set property sensitivity

Gladeui.Property.props.state
Name:

state

Type:

int

Default Value:

0

Flags:

READABLE

Priority information for the property editor to act on