GObject.BindingGroup¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GObject.BindingGroup(**kwargs)¶
- Bases:
- Abstract:
No
GBindingGroup
can be used to bind multiple properties from an object collectively.Use the various methods to bind properties from a single source object to multiple destination objects. Properties can be bound bidirectionally and are connected when the source object is set with [method`GObject`.BindingGroup.set_source].
New in version 2.72.
- classmethod new()[source]¶
- Returns:
a new
GObject.BindingGroup
- Return type:
Creates a new
GObject.BindingGroup
.New in version 2.72.
- bind(source_property, target, target_property, flags)[source]¶
- Parameters:
source_property (
str
) – the property on the source to bindtarget (
GObject.Object
) – the targetGObject.Object
target_property (
str
) – the property on target to bindflags (
GObject.BindingFlags
) – the flags used to create theGObject.Binding
Creates a binding between source_property on the source object and target_property on target. Whenever the source_property is changed the target_property is updated using the same value. The binding flag
GObject.BindingFlags.SYNC_CREATE
is automatically specified.See
GObject.Object.bind_property
() for more information.New in version 2.72.
- bind_full(source_property, target, target_property, flags, transform_to, transform_from)[source]¶
- Parameters:
source_property (
str
) – the property on the source to bindtarget (
GObject.Object
) – the targetGObject.Object
target_property (
str
) – the property on target to bindflags (
GObject.BindingFlags
) – the flags used to create theGObject.Binding
transform_to (
GObject.Closure
orNone
) – aGObject.Closure
wrapping the transformation function from the source object to the target, orNone
to use the defaulttransform_from (
GObject.Closure
orNone
) – aGObject.Closure
wrapping the transformation function from the target to the source object, orNone
to use the default
Creates a binding between source_property on the source object and target_property on target, allowing you to set the transformation functions to be used by the binding. The binding flag
GObject.BindingFlags.SYNC_CREATE
is automatically specified.This function is the language bindings friendly version of g_binding_group_bind_property_full(), using
GObject.Closures
instead of function pointers.See
GObject.Object.bind_property_full
() for more information.New in version 2.72.
- dup_source()[source]¶
- Returns:
a
GObject.Object
orNone
.- Return type:
Gets the source object used for binding properties.
New in version 2.72.
- set_source(source)[source]¶
- Parameters:
source (
GObject.Object
orNone
) – the sourceGObject.Object
, orNone
to clear it
Sets source as the source object used for creating property bindings. If there is already a source object all bindings from it will be removed.
Note that all properties that have been bound must exist on source.
New in version 2.72.
Property Details¶
- GObject.BindingGroup.props.source¶
- Name:
source
- Type:
- Default Value:
- Flags:
The source object used for binding properties.
New in version 2.72.