coalispr.tk_gui.gui_widgets.opt

Classes

Options_frame

ttk.Frame with input widgets for command options.

Module Contents

class coalispr.tk_gui.gui_widgets.opt.Options_frame(master, command)

Bases: ttkbootstrap.Frame

ttk.Frame with input widgets for command options.

master
Type:

ttk.Frame

command
Type:

str

comm_description
Type:

dict

submittip

Tooltip text for submit button

Type:

str

restart_cmd

Command defining page to open restarted GUI with

Type:

str

restart_on_submit

Shell command to restart GUI at set page.

Type:

str

exclusive_arg_options

Command arguments defining mutually exclusive sub-commands; will form radio-buttons in Labelframe.

Type:

list

one_of_destinations

Collection listing each sub-command arg (key) and ‘dest’ (value) for Argument parser.

Type:

dict

subcoms

List of sub-command descriptions.

Type:

list

argvars

List of tk.StringVar variables, each linked to a particular subcommand.

Type:

list

args_dict

Collection to derive Namespace from used as args for each command by Argument parser.

Type:

dict

scroll_canvas
Type:

ttk.Canvas

scrollable_frame
Type:

ttk.Frame

scroll_height
Type:

int

choose_frame
Type:

Subcommand_frame

init_panel

Replaces Canvas in Option_frame for ‘init’ command.

Type:

ttk.Frame

command_frame
Type:

ttk.Frame

command_submit

Submit button

Type:

ttk.Button

command_var
Type:

tk.StringVar

command_field
Type:

ScrolledText

canvas_scrollbar
Type:

ttk.Scrollbar

hold_frame

Holds the Option_widgets for each command

Type:

ttk.Frame

master
command
comm_description
submittip
restart_cmd
restart_on_submit
exclusive_arg_options
one_of_destinations
subcoms
choose_frame = None
argvars
args_dict
scroll_canvas
scrollable_frame
scroll_height
command_frame
command_submit
command_var
command_field
canvas_scrollbar
hold_frame
submitbutton_clicked()

Pass Namespace to CLI command, and if needed - when the experiment has been changed via ‘setexp’ or data written to disc via ‘storedata’ - restart the program to make the new settings/data available.

validate_namespace()

Check whether created collection for generating the Namespace is complete.

add_widget(key, opt_widget)

Add a radio button for subcommand ‘key’ to labelframe with subcommands.

update_args_dict(key, value, is_one_of_list)

Add set/changed option values for chosen (sub)command in collection to derive Namespace from.

set_command_field()

Show the Namespace as will be sent to the CLI command.

canvas_scroll_command(event)

Y view scroll command for canvas to control scrollable frame

create_init_panel()

Returns a frame with widgets for the ‘init’ page that replaces ttk.Canvas of a normal Option_frame (because the canvas is empty by lack of options for ‘init’): a button to select and set the work environment and a text field to show information about the current experiment (loaded with the program via the configuration files).