6.3. Common GUI widgets¶
General purpose widgets that have not been specially design for displaying or processing tomography results.
Library of custom tkinter widgets that have not been specially designed for displaying or processing tomography results.
-
class
tomotok.gui.widgets.
GraphWindow
(parent=None, **kw) Basic window prepared for displaing data sequence with use of matplotlib. Contains Figure and Axes for plotting, but no method for plotting or atribute with data. By default it consists of listbox with data sequence, frame for buttons, canvas for plot and slider for navigation.
Parameters: parent : TKInter widget
Default is None. Used in GUI interface to specify hierarchy.
vals : array-like, optional
Contains data from time vector to be shown in listbox and under slider.
slices : int, optional
Number of time steps. Use ether vals or slices. Use if no time vector data are available. Creates vals as range(slices).
slavechbutton : bool, optional
Switches whether slave check button will be created. If True a button is created, that if unchecked will switch off control from master.
Methods
-
bb_row_raise
() Increases bb_row, atribute that describes number of placed buttons in button box frame widget positioned under listbox. Used for automated row placement. Should be called after placing new button to bbox.
-
go_to
(val, *args) Puts slider into position given by ‘val’.
Parameters: val : int
Nunber of slider position.
-
init_datarange
(**kw) Prepares vals or slices for widget construction.
-
lbox_selection
(*args) Executed when selection in listbox was executed.
-
plot
(num) Parameters: num
-
set_slices
(**kw) Checks keywords for slices infromation. Sets slices to specified number or 1 if number of slices was not specified.
-
set_vals
(**kw) Rutine to set values for listbox menu and displayed numbers and range of scale widget.
-
slider_move
(*args) Executed when position of slider is changed. Changes label of slider, plots apropirate data and moves in listbox widget.
-
update_data
(ndata, **kw) Loads new data.
Parameters: ndata : data structure
New data to be loaded to Graph window.
-
update_graph
() Plots data slice apropirate to slider position.
-