Gda.TreeManager

g GObject.Object GObject.Object Gda.TreeManager Gda.TreeManager GObject.Object->Gda.TreeManager

Subclasses:Gda.TreeMgrColumns, Gda.TreeMgrLabel, Gda.TreeMgrSchemas, Gda.TreeMgrSelect, Gda.TreeMgrTables

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class error_quark ()
  add_manager (sub)
  add_new_node_attribute (attribute, value)
  create_node (parent, name)
  get_managers ()

Virtual Methods

Inherited:GObject.Object (7)

Properties

Name Type Flags Short Description
func int r/w/c Function called when building/updating of children
recursive bool r/w/c Recursive building/updating of children

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
object GObject.Object r  

Class Details

class Gda.TreeManager(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:Gda.TreeManagerClass
classmethod error_quark()
Return type:int
add_manager(sub)
Parameters:sub (Gda.TreeManager) – a Gda.TreeManager object to add

Adds a sub manager to self. Use this method to create the skeleton structure of a Gda.Tree. Note that a single Gda.TreeManager can be used by several Gda.Tree objects or several times in the same Gda.Tree’s structure.

Please note that it’s possible for mgr and sub to be the same object, but beware of the possible infinite recursive behaviour in this case when creating children nodes (depending on the actual implementation of the Gda.TreeManager).

New in version 4.2.

add_new_node_attribute(attribute, value)
Parameters:

Requests that for any new node managed (eg. created) by self, a new attribute will be set. This allows one to customize the attributes of new nodes created by an existing Gda.TreeManager.

As a side effect, if value is None, then the corresponding attribute, if it was set, is unset.

New in version 4.2.

create_node(parent, name)
Parameters:
Returns:

a new Gda.TreeNode

Return type:

Gda.TreeNode

Requests that self creates a new Gda.TreeNode. The new node is not in any way linked to self yet, consider this method as a Gda.TreeNode factory.

This method is usually used when implementing a #GdaTreeManagerNodesFunc function (to create nodes), or when subclassing the Gda.TreeManager.

New in version 4.2.

get_managers()
Returns:a list of #GdaTreeMenager which should not be modified.
Return type:[Gda.TreeManager]

Get the list of sub managers which have already been added using Gda.TreeManager.add_manager()

New in version 4.2.

Property Details

Gda.TreeManager.props.func
Name:func
Type:int
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT

This property specifies the function which needs to be called when the list of Gda.TreeNode nodes managed has to be updated

Gda.TreeManager.props.recursive
Name:recursive
Type:bool
Default Value:True
Flags:READABLE, WRITABLE, CONSTRUCT

This property specifies if, when initially creating nodes or updating the list of nodes, the tree manager shoud also request that each node it has created or updated also initially create or update their children.

This property can typically set to False if the process of creating children nodes is lenghty and needs to be postponed while an event occurs.