pyworkflow.gui.project.viewprotocols_extra module
This modules hosts most of the accessory code that is used in view protocols
- class pyworkflow.gui.project.viewprotocols_extra.ProtocolConfig(text=None, value=None, **args)[source]
Bases:
MenuConfig
Store protocols configuration
Constructor for the Menu config item. Arguments:
text: text to be displayed value: internal value associated with the item. icon: display an icon with the item tag: put some tags to items
**args: pass other options to base class.
- class pyworkflow.gui.project.viewprotocols_extra.ProtocolTreeConfig[source]
Bases:
object
Handler class that groups functions and constants related to the protocols tree configuration.
- ALL_PROTOCOLS = 'All'
- PLUGIN_CONFIG_PROTOCOLS = 'protocols.conf'
- TAG_PROTOCOL = 'protocol'
- TAG_PROTOCOL_BETA = 'protocol_beta'
- TAG_PROTOCOL_DISABLED = 'protocol-disabled'
- TAG_PROTOCOL_GROUP = 'protocol_group'
- TAG_PROTOCOL_NEW = 'protocol_new'
- TAG_PROTOCOL_UPDATED = 'protocol_updated'
- TAG_SECTION = 'section'
- class pyworkflow.gui.project.viewprotocols_extra.RunIOTreeProvider(parent, protocol, mapper, loggerCallback)[source]
Bases:
TreeProvider
Create the tree elements from a Protocol Run input/output children
- Parameters
parent –
protocol –
mapper –
loggerCallback – method to call to log events in the gui.
- static getColumns()[source]
Return a list of tuples (c, w) where: c: is the column name and index w: is the column width
- getObjectActions(obj)[source]
Return a list of tuples (key, action) were keys are the string options that will be display in the context menu and the actions are the functions to call when the specific action is selected. The first action in the list will be taken as the default one when the element is double-clicked.
- getObjectInfo(obj)[source]
This function will be called by the Tree with each object that will be inserted. A dictionary should be returned with the possible following entries: ‘key’: the key value to insert in the Tree ‘text’: text of the object to be displayed
(if not passed the ‘key’ will be used)
‘image’: image path to be displayed as icon (optional) ‘parent’: the object’s parent in which insert this object (optional) ‘tags’: list of tags names (optional)
- static getObjectLabel(obj, parent)[source]
We will try to show in the list the string representation that is more readable for the user to pick the desired object.