pyworkflow.gui.dialog module¶
Module to handling Dialogs some code was taken from tkSimpleDialog
-
class
pyworkflow.gui.dialog.
Dialog
(parent, title, **kwargs)[source]¶ Bases:
tkinter.Toplevel
-
apply
()[source]¶ process the data This method is called automatically to process the data, after the dialog is destroyed. By default, it does nothing.
-
body
(master)[source]¶ create dialog body. return widget that should have initial focus. This method should be overridden, and is called by the __init__ method.
-
-
class
pyworkflow.gui.dialog.
EditObjectDialog
(parent, title, obj, mapper, **kwargs)[source]¶ Bases:
pyworkflow.gui.dialog.Dialog
Dialog to edit some text
-
apply
()[source]¶ process the data This method is called automatically to process the data, after the dialog is destroyed. By default, it does nothing.
-
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.
-
-
class
pyworkflow.gui.dialog.
EntryDialog
(parent, title, entryLabel, entryWidth=20, defaultValue='', headerLabel=None)[source]¶ Bases:
pyworkflow.gui.dialog.Dialog
Dialog to ask some entry
-
apply
()[source]¶ process the data This method is called automatically to process the data, after the dialog is destroyed. By default, it does nothing.
-
-
class
pyworkflow.gui.dialog.
FileBrowseDialog
(parent, title, provider, message=None, **args)[source]¶ Bases:
pyworkflow.gui.dialog.Dialog
Dialog to select files from the filesystem.
-
apply
()[source]¶ process the data This method is called automatically to process the data, after the dialog is destroyed. By default, it does nothing.
-
-
class
pyworkflow.gui.dialog.
FlashMessage
(master, msg, delay=5, relief='solid', func=None)[source]¶ Bases:
object
-
class
pyworkflow.gui.dialog.
FloatingMessage
(master, msg, xPos=750, yPos=80, textWidth=280, font='Helvetica', size=12, bd=1, bg='#6E6E6E', fg='white')[source]¶ Bases:
object
-
class
pyworkflow.gui.dialog.
GenericDialog
(master, title, msg, iconPath, **kwargs)[source]¶ Bases:
pyworkflow.gui.dialog.Dialog
Create a dialog with many buttons Arguments:
parent – a parent window (the application window) title – the dialog title msg – message to display into the dialog iconPath – path of the image to show into the dialog- **args accepts:
buttons – list of buttons tuples containing which buttons to display and theirs values icons – list of icons for all buttons default – button default
- Example:
- buttons=[(‘Single’, RESULT_RUN_SINGLE),
- (‘All’, RESULT_RUN_ALL), (‘Cancel’, RESULT_CANCEL)],
default=’Cancel’, icons={RESULT_CANCEL: Icon.BUTTON_CANCEL,
RESULT_RUN_SINGLE: Icon.BUTTON_SELECT, RESULT_RUN_ALL: Icon.ACTION_EXECUTE})
-
class
pyworkflow.gui.dialog.
ListDialog
(parent, title, provider, message=None, **kwargs)[source]¶ Bases:
pyworkflow.gui.dialog.Dialog
Dialog to select an element from a list. It is implemented using the Tree widget.
-
apply
()[source]¶ process the data This method is called automatically to process the data, after the dialog is destroyed. By default, it does nothing.
-
-
class
pyworkflow.gui.dialog.
MessageDialog
(parent, title, msg, iconPath, **args)[source]¶ Bases:
pyworkflow.gui.dialog.Dialog
Dialog subclasses to show message info, questions or errors. It can display an icon with the message
-
class
pyworkflow.gui.dialog.
ToolbarButton
(text, command, icon=None, tooltip=None)[source]¶ Bases:
object
Store information about the buttons that will be added to the toolbar.
-
class
pyworkflow.gui.dialog.
ToolbarListDialog
(parent, title, provider, message=None, toolbarButtons=None, **kwargs)[source]¶ Bases:
pyworkflow.gui.dialog.ListDialog
This class extend from ListDialog to allow an extra toolbar to handle operations over the elements in the list (e.g. Edit, New, Delete).
-
class
pyworkflow.gui.dialog.
YesNoDialog
(master, title, msg, **kwargs)[source]¶ Bases:
pyworkflow.gui.dialog.MessageDialog
Ask a question with YES/NO answer
-
pyworkflow.gui.dialog.
askString
(title, label, parent, entryWidth=20, defaultValue='', headerLabel=None)[source]¶