Dazzle.PropertiesGroup

g Dazzle.PropertiesGroup Dazzle.PropertiesGroup GObject.GInterface GObject.GInterface Gio.ActionGroup Gio.ActionGroup GObject.GInterface->Gio.ActionGroup GObject.Object GObject.Object GObject.Object->Dazzle.PropertiesGroup Gio.ActionGroup->Dazzle.PropertiesGroup

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ActionGroup (14)

Structs:

GObject.ObjectClass (5)

class

new (object)

class

new_for_type (object_type)

add_all_properties ()

add_property (name, property_name)

add_property_full (name, property_name, flags)

remove (name)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ActionGroup (14)

Properties

Name

Type

Flags

Short Description

object

GObject.Object

r/w

The source object for the properties

object-type

GObject.GType

r/w/co

A type the object must conform to.

Signals

Inherited:

GObject.Object (1), Gio.ActionGroup (4)

Fields

Inherited:

GObject.Object (1), Gio.ActionGroup (4)

Class Details

class Dazzle.PropertiesGroup(**kwargs)
Bases:

GObject.Object, Gio.ActionGroup

Abstract:

No

Structure:

Dazzle.PropertiesGroupClass

classmethod new(object)
Parameters:

object (GObject.Object) – The object containing the properties

Returns:

A Dazzle.PropertiesGroup

Return type:

Dazzle.PropertiesGroup

This creates a new Dazzle.PropertiesGroup to create stateful actions around properties in object.

Call Dazzle.PropertiesGroup.add_property() to add a property to action name mapping for this group. Until you’ve called this, no actions are mapped.

Note that Dazzle.PropertiesGroup only holds a weak reference to object and therefore you must keep object alive elsewhere.

New in version 3.26.

classmethod new_for_type(object_type)
Parameters:

object_type (GObject.GType) – A GObject.ObjectClass based type

Returns:

A Dazzle.PropertiesGroup.

Return type:

Dazzle.PropertiesGroup

This creates a new Dazzle.PropertiesGroup for which the initial object is None.

Set object_type to a type of a class which is a GObject.Object-based type.

add_all_properties()

This function will try to add all properties found on the target instance to the group. Only properties that are supported by the Dazzle.PropertiesGroup will be added.

The action name of all added properties will be identical to their property name.

New in version 3.26.

add_property(name, property_name)
Parameters:
  • name (str) – the name of the action

  • property_name (str) – the name of the property

Adds a new stateful action named name which maps to the underlying property property_name of Dazzle.PropertiesGroup :object.

New in version 3.26.

add_property_full(name, property_name, flags)
Parameters:
  • name (str) – the name of the action

  • property_name (str) – the name of the property

  • flags (Dazzle.PropertiesFlags) – optional flags for the action

Adds a new stateful action named name which maps to the underlying property property_name of Dazzle.PropertiesGroup :object.

Seting flags allows you to tweak some settings about the action.

New in version 3.26.

remove(name)
Parameters:

name (str) – the name of the action

Removes an action from self that was previously added with Dazzle.PropertiesGroup.add_property(). name should match the name parameter to that function.

New in version 3.26.

Property Details

Dazzle.PropertiesGroup.props.object
Name:

object

Type:

GObject.Object

Default Value:

None

Flags:

READABLE, WRITABLE

The source object for the properties

Dazzle.PropertiesGroup.props.object_type
Name:

object-type

Type:

GObject.GType

Default Value:

<GType GObject>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

A type the object must conform to.