sivicncdriver.ui.interface module¶
The interface module¶
Provides the MainWindow class.
-
class
sivicncdriver.ui.interface.MainWindow[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow,sivicncdriver.ui.main_window.Ui_MainWindowThe main window of the application.
-
config_as_dict()[source]¶ Get the configuration as a dict.
Returns: The configuration as a dict. Return type: dict
-
draw_file(gcode=None)[source]¶ Draws a gcode file.
Parameters: gcode – gcode to use in place of the one form code_edit.
-
parse_error(line)[source]¶ Handles parsing errors.
Parameters: line – The line where the error occurred.
-
print(txt, msg_type='operator')[source]¶ Prints a message on the application console.
Parameters: - txt (str) – The message
- msg_type (str) – The type of the message. Can be “operator”, “machine”, “error” or “info”
-
run_thread(gcode, n=None, disable=True, allow_waiting=True)[source]¶ Run a thread to send the diven gcode. :param gcode: The gcode as a list of commands. :param n: a length for the sending_process. :param disable: Should the ui elements which trigger sending be
disabled ?Parameters: allow_waiting (bool) – If True and a thread is already running, wait for it to end before sending the command. Else stop the current thread.
-
save_config(filename=None)[source]¶ Saves a configuration. :param filename: The name of the file. :type filename: str
-
sending_end()[source]¶ Manages the end of upload. If some commands are waiting, run them at the end.
-
set_serial_mode(mode)[source]¶ Change serial mode.
Parameters: mode (str) – can be “manual” or “file”
-