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

Custom version of decorator ProtectTaurusMessageBox that generates TaurusMessageBox for each error separately and thus avoids error messages overlapping. More...

Public Member Functions

 __init__ (self, title=None, msg=None)
 
 __call__ (self, fn)
 

Protected Member Functions

 _single_message_box (self, err_type=None, err_value=None, err_traceback=None, parent=None)
 

Protected Attributes

 _title = title
 
 _msg = msg
 

Detailed Description

Custom version of decorator ProtectTaurusMessageBox that generates TaurusMessageBox for each error separately and thus avoids error messages overlapping.

The idea of this class is to be used as a decorator on any method you wish to protect against exceptions. The handle of the exception is to display a :class:TaurusMessageBox with the exception information. The optional parameter title gives the window bar a customised title. The optional parameter msg allows you to give a customised message in the dialog.

Unlike ProtectTaurusMessageBox, no single, global _PROTECT_MESSAGE_BOX is used, but new TaurusMessageBox is created every time an error occurs (_PROTECT_MESSAGE_BOX's CheckBoxState is used though to control message box appearance)

IMPORTANT   This class was copied from ctrlMonTool to avoid circular dependency.
TODO    Once AsyncButton is used, remove.

Constructor & Destructor Documentation

◆ __init__()

rtctkbasewidget.LocalProtectTaurusMessageBox.__init__ ( self,
title = None,
msg = None )

Member Function Documentation

◆ __call__()

rtctkbasewidget.LocalProtectTaurusMessageBox.__call__ ( self,
fn )

◆ _single_message_box()

rtctkbasewidget.LocalProtectTaurusMessageBox._single_message_box ( self,
err_type = None,
err_value = None,
err_traceback = None,
parent = None )
protected

Member Data Documentation

◆ _msg

rtctkbasewidget.LocalProtectTaurusMessageBox._msg = msg
protected

◆ _title

rtctkbasewidget.LocalProtectTaurusMessageBox._title = title
protected

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