Tool¶
-
class
glue.viewers.common.tool.
Tool
(viewer=None)[source]¶ Bases:
object
The base class for all toolbar tools.
All tools have the following attributes:
icon : QIcon object
tool_id : a short name for the tool
action_text : the action title (used if the tool is made available in a menu)
tool_tip : a tip that is shown when the user hovers over the icon
status_tip : a tip that is shown in the status bar when the tool is active
shortcut : keyboard shortcut to toggle the tool
Attributes Summary
A property that callback functions can be added to.
Methods Summary
activate
(self)Fired when the toolbar button is activated
close
(self)menu_actions
(self)List of QtWidgets.QActions to be attached to this tool as a context menu.
Attributes Documentation
-
action_text
= None¶
-
enabled
¶ A property that callback functions can be added to.
When a callback property changes value, each callback function is called with information about the state change. Otherwise, callback properties behave just like normal instance variables.
CallbackProperties must be defined at the class level. Use the helper function
add_callback()
to attach a callback to a specific instance of a class with CallbackProperties- Parameters
- default
The initial value for the property
- docstringstr
The docstring for the property
- getter, setterfunc
Custom getter and setter functions (advanced)
-
icon
= None¶
-
shortcut
= None¶
-
status_tip
= None¶
-
tool_id
= None¶
-
tool_tip
= None¶
Methods Documentation
List of QtWidgets.QActions to be attached to this tool as a context menu.