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)
initialise()[source]

Initialize the data plugin.

This method is called after the main event loop has started. Any timers or threads used by the plugin should be started here.

terminate()[source]

Terminate the data plugin.

This is called right before the main event loop exits. Any cleanup of the plugin should be done here, such as saving persistent data.

timerEvent(event)[source]

Called every 200ms to poll error channel