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.VariantTypeorNone) – aGLib.VariantTypeorNone
- Returns:
 a non-floating
GLib.Variantwhich should be released withGLib.Variant.unref(); otherwiseNone.- Return type:
 GLib.VariantorNone
Retrieves the metadata value for key.
If expected_type is non-
None, any non-Nonevalue returned from this function will match expected_type.
- get_module_name()¶
 - 
Gets the module-name that created an item.
 
- get_position()¶
 - Returns:
 a
Panel.PositionorNone- Return type:
 
Gets the
Panel.Positionfor 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:
 Trueif self contains metadata named key and value_type is set to the value’sGLib.VariantType. OtherwiseFalseand value_type is unchanged.- value_type:
 a location for a
GLib.VariantTypeorNone
- Return type:
 (
bool, value_type:GLib.VariantTypeorNone)
If the item contains a metadata value for key.
Checks if a value exists for a metadata key and retrieves the
GLib.VariantTypefor that key.
- has_metadata_with_type(key, expected_type)¶
 - Parameters:
 key (
str) – the metadata keyexpected_type (
GLib.VariantType) – theGLib.VariantTypeto check for key
- Returns:
 Trueif a value was found for key matching expected_typed; otherwiseFalseis 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.VariantorNone) – 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.PositionorNone) – aPanel.PositionorNone
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: