Buttons

class qtpyvcp.widgets.button_widgets.action_button.ActionButton(parent=None, action=None)[source]

General purpose button for triggering QtPyVCP actions.

Parameters:
  • parent (QWidget, optional) – The parent widget of the button, or None.

  • action (str, optional) – The name of the action the button should trigger.

class qtpyvcp.widgets.button_widgets.action_checkbox.ActionCheckBox(parent=None, action=None)[source]

General purpose checkbox for triggering QtPyVCP actions.

Parameters:
  • parent (QWidget, optional) – The parent widget of the checkbox, or None.

  • action (str, optional) – The name of the action the checkbox should trigger.

class qtpyvcp.widgets.button_widgets.action_spinbox.ActionSpinBox(parent=None, action=None)[source]

Action spinbox for triggering QtPyVCP actions that take a numeric argument.

On spinbox valueChange the action will be triggered with the spinbox value passed as the action argument.

Parameters:
  • parent (QWidget, optional) – The parent widget of the spindbox, or None.

  • action (str, optional) – The name of the action the spindbox should trigger.

class qtpyvcp.widgets.button_widgets.dialog_button.DialogButton(parent=None, dialog_name='')[source]

Dialog Button.

Button for launching dialogs.

Parameters:
  • parent (QObject) – The dialog’s parent or None.

  • dialog_name (str) – The name of the dialog to show then the button is clicked.

class qtpyvcp.widgets.button_widgets.mdi_button.MDIButton(parent=None, command='')[source]

MDI Button

This widget is intended for calling individual MDI commands. Useful for Go To Home, Tool Change and similar actions.

The MDI command can include variables to be expanded from widgets present in the active window. For example, to make a Change Tool button you could add an MDIButton and a QLineEdit named tool_number_entry. Then set the the MDICommand property of the button to:

T#<tool_number_entry> M6 G43

When the button is pressed #<tool_number_entry> will be substituted with the current text in the QLineEdit.

Button for issuing MDI commands.

Parameters:
  • parent (QWidget, optional) – The parent widget of the button, or None.

  • command (str, optional) – A gcode command string for the button to trigger.

class qtpyvcp.widgets.button_widgets.subcall_button.SubCallButton(parent=None, filename='')[source]

Button for calling ngc subroutines.

Parameters:
  • parent (QWidget, optional) – The parent widget of the button, or None.

  • filename (str, optional) – The filename of the NGCGUI style subroutine the button should call, including any extension. The subroutine must be on the subroutine path specified in the INI. The name of the subroutine must match exactly the sub/endsub name. The parameter #<parameter1> if found in the VCP the value from that widget will be used instead of the default value. If you don’t have a default value you must have a widget by the same name. The widget can be a line edit, a spin box or a double spin box.

example.ngc
o<example> sub
#<parameter1> = #1
#<parameter2> = #2 (=default_value)

;Body of the subroutine

o<example> endsub