nomad_camels.ui_widgets package

Submodules

nomad_camels.ui_widgets.add_remove_table module

class nomad_camels.ui_widgets.add_remove_table.AddRemoveDialoge(addLabel='+', removeLabel='-', horizontal=True, editables=None, checkables=(), headerLabels=None, orderBy=None, parent=None, tableData=None, title='', comboBoxes=None, subtables=None, checkstrings=None, askdelete=False, default_values=None)

Bases: QDialog

A QDialog providing an AddRemoveTable.

get_data()
keyPressEvent(a0: QKeyEvent) None

Overwrites the keyPressEvent of the QDialog so that it does not close when pressing Enter/Return.

Parameters:

a0 (QKeyEvent :)

staticMetaObject = PySide6.QtCore.QMetaObject("AddRemoveDialoge" inherits "QDialog": )
class nomad_camels.ui_widgets.add_remove_table.AddRemoveTable(addLabel='+', removeLabel='-', horizontal=True, editables=None, checkables=(), headerLabels=None, orderBy=None, parent=None, tableData=None, title='', comboBoxes=None, subtables=None, growsize=False, checkstrings=None, askdelete=False, fixedsize=False, enableds=None, default_values=None)

Bases: QWidget

This widget provides a QTableView and two buttons for adding / removing rows / columns.

add(vals=None, change_focus=False)

Add the vals to the table as a new line. Checks are done for each part, whether there should be a comboBox etc.

Parameters:

vals – (Default value = None)

added
append_variable(val)

Used for the single actions of the context menu.

Parameters:

val

change_table_data(tableData, change_focus=False)
Parameters:

tableData

check_selection()
check_string(item)

If an element is part of the checkstrings, the item becomes green if valid, red otherwise and white if empty.

Parameters:

item

context_menu(pos)

Generates the right-click-menu. There are entries for inserting (replace) and appending the variables, channels, functions and operators.

Parameters:

pos

filter_actions(query)
insert_variable(val)

Used for the single actions of the context menu.

Parameters:

val

load_table_data(change_focus=False)

Putting the tableData into the table.

remove()
removed
sizechange
staticMetaObject = PySide6.QtCore.QMetaObject("AddRemoveTable" inherits "QWidget": Methods:   #33 type=Signal, signature=sizechange()   #34 type=Signal, signature=added(int), parameters=int   #35 type=Signal, signature=removed(int), parameters=int )
update_max_hight()
update_table_data()

Reading all the data of the table, putting it as dict into self.tableData and returning it.

class nomad_camels.ui_widgets.add_remove_table.MultiTableDialog(table_args=[], parent=None, title='')

Bases: QDialog

A QDialog providing an AddRemoveTable.

get_data()
hide_add_remove_buttons()
keyPressEvent(a0: QKeyEvent) None

Overwrites the keyPressEvent of the QDialog so that it does not close when pressing Enter/Return.

Parameters:

a0 (QKeyEvent :)

staticMetaObject = PySide6.QtCore.QMetaObject("MultiTableDialog" inherits "QDialog": )

nomad_camels.ui_widgets.channels_check_table module

class nomad_camels.ui_widgets.channels_check_table.Call_Functions_Table(parent=None, headerLabels=None, info_dict=None, title='', functions=None)

Bases: QWidget

build_table()
check_change(pos)
get_info()
staticMetaObject = PySide6.QtCore.QMetaObject("Call_Functions_Table" inherits "QWidget": )
update_info()
class nomad_camels.ui_widgets.channels_check_table.Channels_Check_Table(parent, headerLabels=None, only_output=False, info_dict=None, checkstrings=None, title='', channels=None, use_configs=False)

Bases: QWidget

append_variable(val)

Used for the single actions of the context menu.

Parameters:

val

build_channels_table()
check_change(pos)
Parameters:

pos

check_string(item)

If an element is part of the checkstrings, the item becomes green if valid, red otherwise and white if empty.

Parameters:

item

context_menu(pos)

Generates the right-click-menu. There are entries for inserting (replace) and appending the variables, channels, functions and operators.

Parameters:

pos

filter_actions(query)
get_info()
insert_variable(val)

Used for the single actions of the context menu.

Parameters:

val

staticMetaObject = PySide6.QtCore.QMetaObject("Channels_Check_Table" inherits "QWidget": )
update_info()

nomad_camels.ui_widgets.console_redirect module

class nomad_camels.ui_widgets.console_redirect.Console_TextEdit(parent, max_lines=10000)

Bases: QTextEdit

append(text)

Ensure the number of lines does not exceed self.max_lines.

staticMetaObject = PySide6.QtCore.QMetaObject("Console_TextEdit" inherits "QTextEdit": )
write_error(text)
write_output(text)
class nomad_camels.ui_widgets.console_redirect.Error_Writer(text_signal_handler, use_old_stderr=False)

Bases: StringIO

write(*args, **kwargs)
Parameters:
  • *args

  • **kwargs

class nomad_camels.ui_widgets.console_redirect.TextSignalHanlder

Bases: QWidget

staticMetaObject = PySide6.QtCore.QMetaObject("TextSignalHanlder" inherits "QWidget": Methods:   #33 type=Signal, signature=write_error_signal(QString), parameters=QString   #34 type=Signal, signature=write_output_signal(QString), parameters=QString )
write_error_signal
write_output_signal
class nomad_camels.ui_widgets.console_redirect.Text_Writer(text_signal_handler, use_old_stdout=False)

Bases: StringIO

write(*args, **kwargs)
Parameters:
  • *args

  • **kwargs

nomad_camels.ui_widgets.drag_drop_tree_view module

class nomad_camels.ui_widgets.drag_drop_tree_view.Drag_Drop_TreeView

Bases: QTreeView

This Class is used for the protocol sequence. Most importantly it emits the dragdrop signal when something is dragged / dropped.

del_clicked
dragdrop
dropEvent(e: QDropEvent) None
Parameters:

e (QDropEvent :)

keyPressEvent(event: QKeyEvent) None
Parameters:

event (QKeyEvent :)

paintEvent(self, event: PySide6.QtGui.QPaintEvent) None
staticMetaObject = PySide6.QtCore.QMetaObject("Drag_Drop_TreeView" inherits "QTreeView": Methods:   #88 type=Signal, signature=dragdrop()   #89 type=Signal, signature=del_clicked() )

nomad_camels.ui_widgets.options_run_button module

class nomad_camels.ui_widgets.options_run_button.Dots_Button(parent=None, size=100)

Bases: QPushButton

paintEvent(event)
Parameters:

event

sizeHint()
staticMetaObject = PySide6.QtCore.QMetaObject("Dots_Button" inherits "QPushButton": )
class nomad_camels.ui_widgets.options_run_button.Options_Run_Button(text='', size=120, small_text='run', protocol_options=True)

Bases: QFrame

build_asked
data_path_asked
del_asked
delete_button()
external_asked
mouseMoveEvent(event)
Parameters:

event

move_asked
move_button()
options_menu(pos)
Parameters:

pos

rename(new_name)
Parameters:

new_name

staticMetaObject = PySide6.QtCore.QMetaObject("Options_Run_Button" inherits "QFrame": Methods:   #33 type=Signal, signature=build_asked()   #34 type=Signal, signature=external_asked()   #35 type=Signal, signature=data_path_asked()   #36 type=Signal, signature=del_asked()   #37 type=Signal, signature=move_asked() )
update_functions()
class nomad_camels.ui_widgets.options_run_button.SimpleWrapLabel(text='', parent=None)

Bases: QLabel

setText(a0: str) None
Parameters:

a0 (str :)

staticMetaObject = PySide6.QtCore.QMetaObject("SimpleWrapLabel" inherits "QLabel": )

nomad_camels.ui_widgets.path_button_edit module

class nomad_camels.ui_widgets.path_button_edit.Path_Button_Dialog(parent=None, path='', default_dir='', file_extension='', select_directory=False, save_file=False, title='', text='')

Bases: QDialog

accept(self) None
staticMetaObject = PySide6.QtCore.QMetaObject("Path_Button_Dialog" inherits "QDialog": )
class nomad_camels.ui_widgets.path_button_edit.Path_Button_Edit(parent=None, path='', default_dir='', file_extension='', select_directory=False, save_file=False)

Bases: QWidget

This class provides QLineEdit with a QPushButton, used to select a file-path, that is then displayed in the LineEdit.

changed()
choose_path()
get_path()
path_changed
set_path(path)
Parameters:

path

staticMetaObject = PySide6.QtCore.QMetaObject("Path_Button_Edit" inherits "QWidget": Methods:   #33 type=Signal, signature=path_changed(QString), parameters=QString )

nomad_camels.ui_widgets.run_queue module

class nomad_camels.ui_widgets.run_queue.RunQueue(parent=None, protocols_dict=None, variable_table=None)

Bases: QListWidget

A QListWidget that represents the run queue. It contains a list of RunWidgets, each representing a single run in the queue. When a run is removed from the queue, the corresponding RunWidget is removed from the QListWidget. The order of the runs in the queue is determined by the order of the RunWidgets in the QListWidget. The RunQueue emits a signal when a the ready status of a run is changed, so that the next run can be started automatically.

Each run can have its own variables, the values do not change the default settings for the protocol.

add_item(text, api_uuid=None)

Add a new item to the run queue. The item is represented by a RunWidget, which is added to a QListWidgetItem, which is then added to the QListWidget. The item is also added to the order list, which determines the order of the runs in the queue. The name of the protocol and its variables are stored in the protocol_name_variables dictionary.

change_variable_table()

Change the variables displayed in the variable table to match the selected run.

check_checkbox(name)

Check the checkbox of the specified item.

Parameters:
  • name (str)

  • check. (string of the QListWidgetItem. The item to)

check_next_protocol()

Check if the first protocol in the queue is ready to run. If it is, emit the protocol_signal with the name of the protocol and its variables. If the protocol is not ready to run, do nothing.

Returns:

True if the next protocol is ready to run, False otherwise.

Return type:

bool

paintEvent(self, e: PySide6.QtGui.QPaintEvent) None
protocol_signal
remove_first()

Remove the first item in the queue.

remove_item(item, ask=True)

Remove an item from the run queue. The item is removed from the order list and the QListWidget. If ask is True, a QMessageBox is shown to ask the user if they are sure they want to remove the item.

Parameters:
  • item (QListWidgetItem) – The item to remove.

  • ask (bool, optional) – Whether to ask the user if they are sure they want to remove the item. The default is True.

remove_item_by_name(name)

Remove an item from the run queue by name.

Parameters:

name (str) – The name of the item to remove.

staticMetaObject = PySide6.QtCore.QMetaObject("RunQueue" inherits "QListWidget": Methods:   #83 type=Signal, signature=protocol_signal(QString,QVariantMap,QString), parameters=QString, QVariantMap, QString )
update_order_list()

Update the order list to match the current order of items in the QListWidget

update_variables_queue(name, variables, index)

Update the variables for a protocol in the queue.

Parameters:
  • name (str) – The name of the protocol.

  • variables (dict) – The new variables for the protocol.

class nomad_camels.ui_widgets.run_queue.RunWidget(text)

Bases: QWidget

A widget that represents a single run in the run queue. It contains a label with the name of the protocol, a checkbox whether the protocol is ready to run, and a button to remove the protocol from the queue.

Parameters:

text (str) – The name of the protocol / the text to display on the label.

staticMetaObject = PySide6.QtCore.QMetaObject("RunWidget" inherits "QWidget": )

nomad_camels.ui_widgets.variable_table module

class nomad_camels.ui_widgets.variable_table.VariableBox(parent=None, protocol=None, editable_names=True, variables=None, name='')

Bases: QWidget

closeEvent(self, event: PySide6.QtGui.QCloseEvent) None
closing
new_values_signal
staticMetaObject = PySide6.QtCore.QMetaObject("VariableBox" inherits "QWidget": Methods:   #33 type=Signal, signature=new_values_signal(QVariantMap), parameters=QVariantMap   #34 type=Signal, signature=closing() )
update_values()
class nomad_camels.ui_widgets.variable_table.VariableTable(parent=None, protocol=None, editable_names=True, variables=None)

Bases: QTableView

append_variable(name='name', value='value', unique=True)
check_variable()
clear()
get_unique_name(name='name')
paintEvent(self, e: PySide6.QtGui.QPaintEvent) None
set_protocol(protocol)
staticMetaObject = PySide6.QtCore.QMetaObject("VariableTable" inherits "QTableView": )
update_variables()

nomad_camels.ui_widgets.variable_tool_tip_box module

class nomad_camels.ui_widgets.variable_tool_tip_box.Variable_Box(parent=None)

Bases: QLineEdit

QLineEdit that checks its contents for validity and then color- codes the background.

append_variable(variable)

Used for the single actions of the context menu.

Parameters:

variable

check_string()

Check the string and then set the corresponding background-color.

context_menu(pos)

Generates the right-click-menu. There are entries for inserting (replace) and appending the variables, channels, functions and operators.

Parameters:

pos

filter_actions(query)
get_value()
insert_variable(variable)

Used for the single actions of the context menu.

Parameters:

variable

setEnabled(a0: bool) None
Parameters:

a0 (bool :)

staticMetaObject = PySide6.QtCore.QMetaObject("Variable_Box" inherits "QLineEdit": )

nomad_camels.ui_widgets.warn_popup module

class nomad_camels.ui_widgets.warn_popup.WarnPopup(parent=None, text='', title='', info_icon=False, do_not_pause=False)

Bases: QMessageBox

ok_clicked()
staticMetaObject = PySide6.QtCore.QMetaObject("WarnPopup" inherits "QMessageBox": )

Module contents