Gda.Tree¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Gets emitted when a node has changed in tree |
|
Gets emitted when a node has been removed from tree |
|
Gets emitted when a node has has a child when it did not have any or when it does not have a ny children anymore when it had some |
|
Gets emitted when a node has been inserted in tree |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gda.Tree(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- add_manager(manager)¶
- Parameters:
manager (
Gda.TreeManager
) – aGda.TreeManager
object
Sets manager as a top
Gda.TreeManager
object, which will be responsible for creating top level nodes in self.New in version 4.2.
- clean()¶
Removes any node in self
New in version 4.2.
- dump(node, stream)¶
- Parameters:
node (
Gda.TreeNode
orNone
) – aGda.TreeNode
to start the dump from, orNone
for a full dumpstream (
object
orNone
) – a stream to send the dump to, orNone
for STDOUT
Dumps the contents of self to stream, using a hierarchical view.
New in version 4.2.
- get_node(tree_path, use_names)¶
- Parameters:
- Returns:
the requested
Gda.TreeNode
pointer, orNone
if not found- Return type:
Gda.TreeNode
orNone
Locates a
Gda.TreeNode
using the tree_path path.New in version 4.2.
- get_node_manager(node)¶
- Parameters:
node (
Gda.TreeNode
) – aGda.TreeNode
present in self- Returns:
the
Gda.TreeManager
, orNone
if node is not present in self- Return type:
Get the
Gda.TreeManager
which created node in selfNew in version 4.2.
- get_node_path(node)¶
- Parameters:
node (
Gda.TreeNode
) – aGda.TreeNode
node in self- Returns:
a new string, or
None
if node is not in self- Return type:
Get the path associated to node in self.
New in version 4.2.
- get_nodes_in_path(tree_path, use_names)¶
- Parameters:
tree_path (
str
orNone
) – full path to the required nodes (if use_names isTrue
, then it must start with ‘/’), orNone
use_names (
bool
) – ifTrue
, then tree_path will be interpreted as a unix style path, and ifFalse
, then tree_path will be interpreted similarly to the #GtkTreePath’s string representation.
- Returns:
a new list of
Gda.TreeNode
pointers, free it with g_slist_free()- Return type:
The returned list is a list of all the
Gda.TreeNode
nodes below the node at the specified path.As a corner case if tree_path is
None
, then the returned list contains all the top level nodes.New in version 4.2.
- set_attribute(attribute, value, destroy)¶
- Parameters:
attribute (
str
) – attribute namevalue (
GObject.Value
) – aGObject.Value
, orNone
destroy (
GLib.DestroyNotify
) – a function to be called when attribute is not needed anymore, orNone
Sets an attribute to self, which will be accessible to any node in it.
New in version 4.2.
- update_all()¶
- Raises:
- Returns:
True
if no error occurred.- Return type:
Requests that self be populated with nodes. If an error occurs, then self's contents is left unchanged, and otherwise self's previous contents is completely replaced by the new one.
New in version 4.2.
- update_children(node)¶
- Parameters:
node (
Gda.TreeNode
orNone
) – aGda.TreeNode
node in self, orNone
- Raises:
- Returns:
True
if no error occurred.- Return type:
Update the children of node in self (not recursively, to update recursively, use
Gda.Tree.update_part
()). If node isNone
then the top level nodes are updated.New in version 4.2.8.
- update_part(node)¶
- Parameters:
node (
Gda.TreeNode
) – aGda.TreeNode
node in self- Raises:
- Returns:
True
if no error occurred.- Return type:
Requests that self be populated with nodes, starting from node
New in version 4.2.
- do_node_changed(node) virtual¶
- Parameters:
node (
Gda.TreeNode
) –
- do_node_has_child_toggled(node) virtual¶
- Parameters:
node (
Gda.TreeNode
) –
- do_node_inserted(node) virtual¶
- Parameters:
node (
Gda.TreeNode
) –
Signal Details¶
- Gda.Tree.signals.node_changed(tree, node)¶
- Signal Name:
node-changed
- Flags:
- Parameters:
tree (
Gda.Tree
) – The object which received the signalnode (
Gda.TreeNode
) – theGda.TreeNode
which has changed
Gets emitted when a node has changed in tree
New in version 4.2.
- Gda.Tree.signals.node_deleted(tree, node_path)¶
- Signal Name:
node-deleted
- Flags:
- Parameters:
Gets emitted when a node has been removed from tree
New in version 4.2.
- Gda.Tree.signals.node_has_child_toggled(tree, node)¶
- Signal Name:
node-has-child-toggled
- Flags:
- Parameters:
tree (
Gda.Tree
) – The object which received the signalnode (
Gda.TreeNode
) – theGda.TreeNode
which changed from having children to being a leaf or the other way around
Gets emitted when a node has has a child when it did not have any or when it does not have a ny children anymore when it had some
New in version 4.2.
- Gda.Tree.signals.node_inserted(tree, node)¶
- Signal Name:
node-inserted
- Flags:
- Parameters:
tree (
Gda.Tree
) – The object which received the signalnode (
Gda.TreeNode
) – theGda.TreeNode
which has inserted
Gets emitted when a node has been inserted in tree
New in version 4.2.