Panel.SessionItem

g GObject.Object GObject.Object Panel.SessionItem Panel.SessionItem GObject.Object->Panel.SessionItem

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_id ()

get_metadata_value (key, expected_type)

get_module_name ()

get_position ()

get_type_hint ()

get_workspace ()

has_metadata (key)

has_metadata_with_type (key, expected_type)

set_id (id)

set_metadata_value (key, value)

set_module_name (module_name)

set_position (position)

set_type_hint (type_hint)

set_workspace (workspace)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

id

str

r/w/en

module-name

str

r/w/en

position

Panel.Position

r/w/en

type-hint

str

r/w/en

workspace

str

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Panel.SessionItem(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Panel.SessionItemClass

classmethod new()
Return type:

Panel.SessionItem

get_id()
Returns:

a string containing the id; otherwise None

Return type:

str or None

Gets the id for the session item, if any.

get_metadata_value(key, expected_type)
Parameters:
Returns:

a non-floating GLib.Variant which should be released with GLib.Variant.unref(); otherwise None.

Return type:

GLib.Variant or None

Retrieves the metadata value for key.

If expected_type is non-None, any non-None value returned from this function will match expected_type.

get_module_name()
Returns:

a module-name or None

Return type:

str or None

Gets the module-name that created an item.

get_position()
Returns:

a Panel.Position or None

Return type:

Panel.Position or None

Gets the Panel.Position for the item.

get_type_hint()
Returns:

a type-hint or None

Return type:

str or None

Gets the type hint for an item.

get_workspace()
Returns:

a workspace or None

Return type:

str or None

Gets the workspace id for the item.

has_metadata(key)
Parameters:

key (str) – the name of the metadata

Returns:

True if self contains metadata named key and value_type is set to the value’s GLib.VariantType. Otherwise False and value_type is unchanged.

value_type:

a location for a GLib.VariantType or None

Return type:

(bool, value_type: GLib.VariantType or None)

If the item contains a metadata value for key.

Checks if a value exists for a metadata key and retrieves the GLib.VariantType for that key.

has_metadata_with_type(key, expected_type)
Parameters:
Returns:

True if a value was found for key matching expected_typed; otherwise False is returned.

Return type:

bool

Checks if the item contains metadata key with expected_type.

set_id(id)
Parameters:

id (str or None) – an optional identifier for the item

Sets the identifier for the item.

The identifier should generally be global to the session as it would not be expected to come across multiple items with the same id.

set_metadata_value(key, value)
Parameters:

Sets the value for metadata key.

If value is None, the metadata key is unset.

set_module_name(module_name)
Parameters:

module_name (str or None) – the module name owning the item

Sets the module-name for the session item.

This is generally used to help determine which plugin created the item when decoding them at project load time.

set_position(position)
Parameters:

position (Panel.Position or None) – a Panel.Position or None

Sets the position for self, if any.

set_type_hint(type_hint)
Parameters:

type_hint (str or None) – a type hint string for the item

Sets the type-hint value for the item.

This is generally used to help inflate the right version of an object when loading session items.

set_workspace(workspace)
Parameters:

workspace (str or None) – a workspace string for the item

Sets the workspace id for the item.

This is generally used to tie an item to a specific workspace.

Property Details

Panel.SessionItem.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Panel.SessionItem.props.module_name
Name:

module-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Panel.SessionItem.props.position
Name:

position

Type:

Panel.Position

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Panel.SessionItem.props.type_hint
Name:

type-hint

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Panel.SessionItem.props.workspace
Name:

workspace

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY