Isis 3 Programmer Reference
Isis::WarningWidget Class Reference

Displays the NoWarning icon as default and the Warning icon in case of exception and also pops up a a menu when an exception occurs. More...

#include <WarningWidget.h>

Inheritance diagram for Isis::WarningWidget:
Inheritance graph
Collaboration diagram for Isis::WarningWidget:
Collaboration graph

Public Slots

void resetWarning (void)
 When the dialog "OK" button is clicked or when the mouse is released on some other area or tool the Warning is reset and Nowarning object is displayed. More...
 
void checkMessage (void)
 Verify that the right message is displayed in the status bar. More...
 

Public Member Functions

 WarningWidget (QStatusBar *pParent)
 Warning widget constructor, initializes and creates the Nowarning, Warning objects and objects associated with them. More...
 
 ~WarningWidget ()
 Destructor for the Warning widget. More...
 
void viewWarningWidgetIcon (std::string &pStr, const std::string &pExStr)
 View Warning icon when there is an exception. More...
 
void setWarningText (std::string pStr)
 Set the message for the status bar and the dialog window. More...
 
QString setValuesToRed (std::string psMessage)
 

Private Attributes

QDialogmDialog
 
QWidgetmWindow
 
QPushButton * mNoWarning
 
QPushButton * mWarning
 
bool mbWarningFlag
 
QStatusBar * mSBar
 
QString mMsgStr
 
QTextEdit * mTextEdit
 

Detailed Description

Displays the NoWarning icon as default and the Warning icon in case of exception and also pops up a a menu when an exception occurs.

Clicking on the Warning icon will display a dialog with the Exception details. With the next mouse press event, the Warning icon disappears and the default NoWarning icon appears.


Author
2009-12-11 Sharmila Prasad
History:

2009-12-11 Sharmila Prasad - Initial Version

2010-03-22 Sharmila Prasad - Point the warning icons to right path

Definition at line 51 of file WarningWidget.h.

Constructor & Destructor Documentation

◆ WarningWidget()

Isis::WarningWidget::WarningWidget ( QStatusBar *  pParent)

Warning widget constructor, initializes and creates the Nowarning, Warning objects and objects associated with them.

Author
sprasad (12/11/2009)
Parameters
parent- parent of this object

Definition at line 20 of file WarningWidget.cpp.

References Isis::FileName::expanded(), and resetWarning().

◆ ~WarningWidget()

Isis::WarningWidget::~WarningWidget ( )

Destructor for the Warning widget.

Delete all the dynamically created class members

Author
sprasad (12/11/2009)

Definition at line 87 of file WarningWidget.cpp.

Member Function Documentation

◆ checkMessage

void Isis::WarningWidget::checkMessage ( void  )
slot

Verify that the right message is displayed in the status bar.

Author
sprasad (3/18/2010)

Definition at line 134 of file WarningWidget.cpp.

◆ resetWarning

void Isis::WarningWidget::resetWarning ( void  )
slot

When the dialog "OK" button is clicked or when the mouse is released on some other area or tool the Warning is reset and Nowarning object is displayed.

Author
sprasad (12/11/2009)

Definition at line 118 of file WarningWidget.cpp.

Referenced by Isis::TrackTool::resetStatusWarning(), and WarningWidget().

◆ setWarningText()

void Isis::WarningWidget::setWarningText ( std::string  pStr)

Set the message for the status bar and the dialog window.

Highlight the text within "[..]" in red

Author
sprasad (12/11/2009)
Parameters
pStr- error message

Definition at line 99 of file WarningWidget.cpp.

Referenced by viewWarningWidgetIcon().

◆ viewWarningWidgetIcon()

void Isis::WarningWidget::viewWarningWidgetIcon ( std::string &  pStr,
const std::string &  pExStr 
)

View Warning icon when there is an exception.

Usually called when an exception occurs.

Author
sprasad (12/11/2009)
Parameters
pStr- Warning message sent from the exception handler
pExStr- Propagated Exception message

Definition at line 149 of file WarningWidget.cpp.

References setWarningText().

Referenced by Isis::TrackTool::displayWarning().


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