2. i-SAS_BasicGUIController

2.1. interface

class basic_gui_controller.interface.Interface(fig_name, size_ratio, output_data_names, arg, **kwargs)

Bases: object

interface class

GRID_NUM = 12
DPI = 100
package_name = 'basic_gui_controller'
content_type = 'controller'
__init__(fig_name, size_ratio, output_data_names, arg, **kwargs)

initialization.

Parameters
  • fig_name (str) – figure name.

  • size_ratio (tuple(int, int)) – figure size ratio. (1 <= int <= 12)

  • output_data_names (list) – unique name corresponding to variables

  • arg (dict) – arguments which are used for create designated controller.

  • **kwargs – Arbitrary keyword arguments

Examples

>>> # Create drop down box to choose the quntity name of contour plot color.
>>> fig_name = 'dropdown'
>>> size_ratio = (1, 1)
>>> output_data_names = ['contour_direction']
>>> Interface(fig_name, size_ratio, output_data_names, {'key': ['x', 'y', 'z']})
set_project(project_name)

set project

Parameters

project_name (str) – project name.

setup(window_width)

create figure canvas in gui mode

Parameters

window_width (int) – window width (px)

Returns

controller widget

Return type

PySide2.QtWidget

update(data, variables, count)

update figure in gui

Parameters
  • data (dict) – calculated data

  • variables (dict) – variables for interactive gui.

  • count (int) – iteration count

Returns

the key is output_data_names and value is updated variable

Return type

dict

__call__()

call

2.2. model

class basic_gui_controller.model.Model(fig_name, output_data_names, arg, cfg)

Bases: object

model class

__init__(fig_name, output_data_names, arg, cfg)

constructor

Parameters
  • fig_name (str) – figure name.

  • output_data_names (list) – unique name corresponding to variables

  • arg (dict) – arguments which are used for create designated controller.

  • cfg (dict) – config.

set_model()

set model

setup(window_size)

create widget

__call__()

update status of controller

class basic_gui_controller.model.Dropdown(output_data_names, arg, cfg)

Bases: object

class of dropdown

__init__(output_data_names, arg, cfg)

initialization of controller class

Parameters
  • output_data_names (list) – unique name corresponding to variables

  • arg (dict) – keys of dropdown box.

  • cfg (dict) – config.

setup()

create widget

__call__()

read selected key

class basic_gui_controller.model.Form(output_data_names, arg, cfg)

Bases: object

class of input form

__init__(output_data_names, arg, cfg)

initialization of controller class

Parameters
  • output_data_names (list) – unique name corresponding to variables

  • arg (dict) – The default, None.

  • cfg (dict) – config.

setup()

create widget

__call__()

read inputed value

class basic_gui_controller.model.CheckBox(output_data_names, arg, cfg)

Bases: object

class of check box

__init__(output_data_names, arg, cfg)

initialization of controller class

Parameters
  • output_data_names (list) – unique name corresponding to variables

  • arg (dict) – The default, None.

  • cfg (dict) – config.

setup()

create widget

__call__()

read inputed value