RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
rtctkbasewidget.RtctkBaseWidget Class Reference

Provides controller for the widget declared in optcmdswidget_ui. More...

Inheritance diagram for rtctkbasewidget.RtctkBaseWidget:

Public Member Functions

 __init__ (self, parent=None, designMode=False)
 Initialises the Widget.
 
 init_gui (self)
 Finishes UI connections that require the Form to be loaded first.
 
 setModel (self, model)
 Sets the model, a URI that indicates which TaurusDevice this widget will connect to.
 
 handleEvent (self, TaurusDevice evt_src, TaurusEventType evt_type, TaurusModelValue evt_value)
 Updates the widgets enable/disabled property based on connection state.
 
 handle_taurusCommandButton_commandExecuted (self, object)
 Slot for commandExecuted signal.
 
 handle_command_button_clicked (self)
 The slot replaces onClicked from TaurusCommandButton to invoke TaurusProtectBox decorator (instead of LocalProtectTaurusMessageBox) in case of an exception, thereby producing more understandable error messages.
 

Public Attributes

 handle_command_button_clicked
 
 handle_taurusCommandButton_commandExecuted
 

Static Public Attributes

 commandReplied = Signal(str)
 Used to propagate a string with the result of an RR call.
 

Detailed Description

Provides controller for the widget declared in optcmdswidget_ui.

It is a TaurusWidget implementation, that uses a TaurusDevice model. The initializator sets all Taurus children models to the same one as this.

This means that all TaurusCommandButton have access to the methods from the TaurusDevice: aka: RTC Component.

Constructor & Destructor Documentation

◆ __init__()

rtctkbasewidget.RtctkBaseWidget.__init__ ( self,
parent = None,
designMode = False )

Initialises the Widget.

This widget takes its UI definition from a Qt UI file.

Parameters
[in]parentQWidget that will be the parent of this widget
[in]designModeUsed by the Qt Designer to avoid undesirable interactions.

Member Function Documentation

◆ handle_command_button_clicked()

rtctkbasewidget.RtctkBaseWidget.handle_command_button_clicked ( self)

The slot replaces onClicked from TaurusCommandButton to invoke TaurusProtectBox decorator (instead of LocalProtectTaurusMessageBox) in case of an exception, thereby producing more understandable error messages.

Returns
Any Invokes _onClicked() which executes the command assigned to the clicked
TaurusCommandButton.

◆ handle_taurusCommandButton_commandExecuted()

rtctkbasewidget.RtctkBaseWidget.handle_taurusCommandButton_commandExecuted ( self,
object )

Slot for commandExecuted signal.

It gets invoked when the command defined in initTaurusCommandButton finishes execution.

Parameters
[in]objectPython object (any) that is the return value of the command.

◆ handleEvent()

rtctkbasewidget.RtctkBaseWidget.handleEvent ( self,
TaurusDevice evt_src,
TaurusEventType evt_type,
TaurusModelValue evt_value )

Updates the widgets enable/disabled property based on connection state.

Override handleEvent to guard against Taurus events firing on destroyed C++ objects.

This prevents RuntimeError when a queued Taurus event reaches _setText on a C++ object that was already deleted by deleteLater or parent widget destruction.

◆ init_gui()

rtctkbasewidget.RtctkBaseWidget.init_gui ( self)

Finishes UI connections that require the Form to be loaded first.

IMPORTANT   Developer must invoke at the end of the initializator method.

◆ setModel()

rtctkbasewidget.RtctkBaseWidget.setModel ( self,
model )

Sets the model, a URI that indicates which TaurusDevice this widget will connect to.

Parameters
[in]modelstr with the URI of the TaurusDevice/RTC Component.

Member Data Documentation

◆ commandReplied

rtctkbasewidget.RtctkBaseWidget.commandReplied = Signal(str)
static

Used to propagate a string with the result of an RR call.

◆ handle_command_button_clicked

rtctkbasewidget.RtctkBaseWidget.handle_command_button_clicked

◆ handle_taurusCommandButton_commandExecuted

rtctkbasewidget.RtctkBaseWidget.handle_taurusCommandButton_commandExecuted

The documentation for this class was generated from the following file: