Panel.SessionItem¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Panel.SessionItem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Return type:
- get_id()¶
-
Gets the id for the session item, if any.
- get_metadata_value(key, expected_type)¶
- Parameters:
key (
str
) – the metadata keyexpected_type (
GLib.VariantType
orNone
) – aGLib.VariantType
orNone
- Returns:
a non-floating
GLib.Variant
which should be released withGLib.Variant.unref
(); otherwiseNone
.- Return type:
GLib.Variant
orNone
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()¶
-
Gets the module-name that created an item.
- get_position()¶
- Returns:
a
Panel.Position
orNone
- Return type:
Gets the
Panel.Position
for the item.
- get_type_hint()¶
-
Gets the type hint for an item.
- get_workspace()¶
-
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’sGLib.VariantType
. OtherwiseFalse
and value_type is unchanged.- value_type:
a location for a
GLib.VariantType
orNone
- Return type:
(
bool
, value_type:GLib.VariantType
orNone
)
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:
key (
str
) – the metadata keyexpected_type (
GLib.VariantType
) – theGLib.VariantType
to check for key
- Returns:
True
if a value was found for key matching expected_typed; otherwiseFalse
is returned.- Return type:
Checks if the item contains metadata key with expected_type.
- set_id(id)¶
-
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:
key (
str
) – the metadata keyvalue (
GLib.Variant
orNone
) – the value for key orNone
Sets the value for metadata key.
If value is
None
, the metadata key is unset.
- set_module_name(module_name)¶
-
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
orNone
) – aPanel.Position
orNone
Sets the position for self, if any.
- set_type_hint(type_hint)¶
-
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.
Property Details¶
- Panel.SessionItem.props.id¶
- Name:
id
- Type:
- Default Value:
- Flags:
- Panel.SessionItem.props.module_name¶
- Name:
module-name
- Type:
- Default Value:
- Flags:
- Panel.SessionItem.props.position¶
- Name:
position
- Type:
- Default Value:
- Flags:
- Panel.SessionItem.props.type_hint¶
- Name:
type-hint
- Type:
- Default Value:
- Flags: