xmipptomo.viewers.monotomo_tree_provider module

class xmipptomo.viewers.monotomo_tree_provider.MonoTomoListDialog(parent, title, provider, itemDoubleClick=False, **kwargs)[source]

Bases: pyworkflow.gui.dialog.ListDialog

body(bodyFrame)[source]

create dialog body. return widget that should have initial focus. This method should be overridden, and is called by the __init__ method.

doubleClickOnItem(e=None)[source]
class xmipptomo.viewers.monotomo_tree_provider.MonoTomoTreeProvider(parent, protocol, objs)[source]

Bases: pyworkflow.gui.tree.TreeProvider

Model class that will retrieve the information from Tomogram and prepare the columns/rows models required by the TreeDialog GUI.

COL_INFO = 'Info'
COL_TS = 'Tomogram'
ORDER_DICT = {'Tomogram': 'id'}
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)

getObjects()[source]

Return the objects that will be inserted in the Tree

class xmipptomo.viewers.monotomo_tree_provider.MonotomoViewer(parent, protocol, objs, **kwargs)[source]

Bases: pyworkflow.viewer.View

This class implements a view using Tkinter ListDialog and the ImodTreeProvider.

show()[source]

This method should be overwritten to implement how this particular view will be displayed in desktop.