Provides a simple interface for the display of some basic dialogs to
collect information from the user.
This version uses KDialog to integrate well with KDE. To pass
additional arguments to KDialog that are not specifically handled, use
keyword arguments. For example, to pass the --geometry argument to
KDialog to specify the desired size of the dialog, pass
geometry="700x400"
as one of the parameters. All
keyword arguments must be given as strings.
A note on exit codes: an exit code of 0 indicates that the user
clicked OK.
|
|
tuple(int, str)
|
|
tuple(int, str)
|
input_dialog(self,
title=' Enter a value ' ,
message=' Enter a value ' ,
default='
' ,
**kwargs)
Show an input dialog |
source code
|
|
tuple(int, str)
|
|
tuple(int, str)
|
combo_menu(self,
options,
title=' Choose an option ' ,
message=' Choose an option ' ,
**kwargs)
Show a combobox menu |
source code
|
|
tuple(int, str)
|
list_menu(self,
options,
title=' Choose a value ' ,
message=' Choose a value ' ,
default=None,
**kwargs)
Show a single-selection list menu |
source code
|
|
tuple(int, str)
|
list_menu_multi(self,
options,
title=' Choose one or more values ' ,
message=' Choose one or more values ' ,
defaults=[ ] ,
**kwargs)
Show a multiple-selection list menu |
source code
|
|
tuple(int, str)
|
open_file(self,
title=' Open File ' ,
initialDir=' ~ ' ,
fileTypes=' *|All Files ' ,
rememberAs=None,
**kwargs)
Show an Open File dialog |
source code
|
|
tuple(int, str)
|
save_file(self,
title=' Save As ' ,
initialDir=' ~ ' ,
fileTypes=' *|All Files ' ,
rememberAs=None,
**kwargs)
Show a Save As dialog |
source code
|
|
tuple(int, str)
|
choose_directory(self,
title=' Select Directory ' ,
initialDir=' ~ ' ,
rememberAs=None,
**kwargs)
Show a Directory Chooser dialog |
source code
|
|
tuple(int, str)
|
|
tuple(int, str)
|
calendar(self,
title=' Choose a date ' ,
format=' %Y-%m-%d ' ,
date=' today ' ,
**kwargs)
Show a calendar dialog |
source code
|
|