dip.shell.tools.quit

This module contains the default implementation of a tool that handles a user’s ability to quit the application.

QuitTool

class dip.shell.tools.quit.QuitTool

Base class: Model

The QuitTool is the default implementation of a tool that handles the user’s ability to quit the application.

id = 'dip.shell.tools.quit'
The tool’s identifier.
quit_action = QuitAction()
The action.
user_quit_preamble = Str('You may not want to quit because of the following reasons.')
The text used as the preamble to the multiple list of reasons.
user_quit_question = Str('Do you still want to quit?')
The text used as the question asking if the user really wants to quit.
user_quit_title = Str()
The text used as the title of any user dialogs.
user_quit_view = Instance(Dialog)
The factory used to create the dialog when presenting multiple reasons to the user. The corresponding model will contain a ‘preamble’ string, a ‘reason’ and a ‘question’ string. The view must create an implementation of IOptionList bound to the ‘reason’.
query_multiple_reasons(reasons)

Ask the user about a number of reasons not quit.

Parameter:reasons – is the list of reasons not to quit.
Returns:True if the user wants to quit.
query_single_reason(reason)

Ask the user about a single reason to not quit.

Parameter:reason – is the reason not to quit.
Returns:True if the user wants to quit.

Table Of Contents

Previous topic

dip.shell.tools.model_manager

Next topic

dip.shell.tools.whats_this

This Page