exopy.utils.widgets.qt_tree_menu module¶
Standard menu for the tree widget.
The action context will be set by the tree widget to a dictionary with the following keys:
‘copyable’: bool, can the node be copied
‘cutable’: bool, can the node be cut
‘pasteable’: bool, can node be pasted here
‘renamable’: bool, can the node be renamed
‘deletable’: bool, can the node be deleted
‘not_root’: bool, is the node the root node of the tree
‘data’: tuple, (tree, TreeNode instance, object, id of the node)
-
class
exopy.utils.widgets.qt_tree_menu.CopyAction(parent=None, **kwargs)¶ Bases:
enaml.widgets.action.ActionCopies the current tree node object to the paste buffer.
-
action_context¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
-
class
exopy.utils.widgets.qt_tree_menu.CutAction(parent=None, **kwargs)¶ Bases:
enaml.widgets.action.ActionCuts the current tree node object into the paste buffer.
-
action_context¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
-
class
exopy.utils.widgets.qt_tree_menu.DeleteAction(parent=None, **kwargs)¶ Bases:
enaml.widgets.action.ActionDeletes the current node from the tree.
-
action_context¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
-
class
exopy.utils.widgets.qt_tree_menu.NewAction(parent=None, **kwargs)¶ Bases:
enaml.widgets.action.ActionAdds a new object to the current node.
-
factory¶ Callable to use to generate a new object.
- Type
callable
-
mode¶ How to insert the new child into the hierarchy.
- Type
{'Append', 'Add before', 'Add after'}
-
action_context¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
args¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
factory¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
kwargs¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
mode¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
-
class
exopy.utils.widgets.qt_tree_menu.PasteAction(parent=None, **kwargs)¶ Bases:
enaml.widgets.action.ActionPastes the current contents of the paste buffer into the current node.
-
action_context¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-
-
class
exopy.utils.widgets.qt_tree_menu.RenameAction(parent=None, **kwargs)¶ Bases:
enaml.widgets.action.ActionRename the current node.
-
action_context¶ A value which allows objects of a given type or types.
Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.
The value of an Instance may be set to None.
-