aquaduct.apps.valveconfig.utils module¶
-
get_widget_bg
(widget)[source]¶ Return background color of specified widget.
- Parameters
widget – Ttk widget.
- Returns
Background color.
- Return type
-
widget_factory
(parent, default, state='normal')[source]¶ Creates widget depending on default argument.
- Parameters
parent – Parent of new widget.
default – Default widget value.
state – State of widget.
- Returns
Widget and variable attached to it.
- Return type
tuple
-
entry_factory
(parent, row, entry_name, default, help, state='normal', info_text=None, warning_text=None)[source]¶ Determines which class is used to handle specified default value.
- Parameters
parent – Parent of widget.
row – Row number where first Entry will be grided.
entry_name – Readable entry name.
default – Default values of entry.
help – Text which will be displayed in tooltip.
state – State of widget.
- Returns
Entry based on default value.
-
class
Entry
(parent, row)[source]¶ Bases:
object
Abstract class for various Entries that manage different type of default values.
Represents single row of configuration option with Label and all input widgets.
-
class
StandardEntry
(parent, row, entry_name_long, default, help, state, info_text=None, warning_text=None)[source]¶
-
class
BoolEntry
(parent, row, entry_name_long, input_default, control_default, help, info_text=None, warning_text=None)[source]¶
-
class
FileEntry
(parent, row, entry_name_long, default, help, info_text=None, warning_text=None)[source]¶
-
class
ManyFileEntry
(parent, row, entry_name_long, default, help, info_text=None, warning_text=None)[source]¶ Bases:
aquaduct.apps.valveconfig.utils.Entry
-
callback_load_file
(index)[source]¶ Callback for selecting file.
Appends loaded file name at the end of Text widget.
- Parameters
index – Index of variable in self.input_vars
-
set
(value)[source]¶ Sets Entry value.
If value is set to “” it deletes all input widgets, except first and sets it to “”
- Parameters
value – New value. It can be single path or paths separated by os.pathsep.
-
-
class
DirEntry
(parent, row, entry_name_long, default, help, info_text=None, warning_text=None)[source]¶
-
class
ParenthesedEntry
(parent, row, entry_name_long, input_default, control_default, help, info_text=None, warning_text=None)[source]¶
-
class
ToolTip
(widget)[source]¶ Bases:
object
Code found: http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_01.shtml