Notifications Plugin
Plugin to handle error and status notifications.
Supports evaluating arbitrary python expressions placed in gcode DEBUG statements.
example.ngc #1 = 12.345 ; this will set my_label's text to the value of variable #1 (DEBUG, EVAL[vcp.getWidget{"my_label"}.setText{'%4.2f' % #1}]) ; this will change the text color of my_label to red (DEBUG, EVAL[vcp.getWidget{"my_label"}.setStyleSheet{"color: red"}])
- class qtpyvcp.plugins.notifications.Notifications(enabled=True, mode='native', max_messages=5, persistent=True, **kwargs)[source]
Notification data plugin
- Parameters:
enabled (bool, optional) – Enable or disable notification popups (Default = True)
mode (str, optional) – native or dbus (Default = ‘native’)
max_messages (int, optional) –
persistent (bool, optional) – Save notifications on shutdown (Default = True)
- debug_message
Debug messages from LinuxCNC.
- info_message
Gives messages from GCode. Syntax: (MSG, …) (DEBUG, …) See http://linuxcnc.org/docs/html/gcode/overview.html#gcode:messages for more information.
- warn_message
Warning messages from LinuxCNC.
- error_message
Error messages from LinuxCNC.
- initialise()[source]
Initialize the plugin.
This method is called after the main event loop has started. Any timers or threads used by the plugin should be started here.
This method should set
self._initialized
to true if successfully.