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.
 
void checkMessage (void)
 Verify that the right message is displayed in the status bar.
 

Public Member Functions

 WarningWidget (QStatusBar *pParent)
 Warning widget constructor, initializes and creates the Nowarning, Warning objects and objects associated with them.
 
 ~WarningWidget ()
 Destructor for the Warning widget.
 
void viewWarningWidgetIcon (std::string &pStr, const std::string &pExStr)
 View Warning icon when there is an exception.
 
void setWarningText (std::string pStr)
 Set the message for the status bar and the dialog window.
 
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 38 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().

Member Data Documentation

◆ mbWarningFlag

bool Isis::WarningWidget::mbWarningFlag
private

Definition at line 55 of file WarningWidget.h.

◆ mDialog

QDialog* Isis::WarningWidget::mDialog
private

Definition at line 52 of file WarningWidget.h.

◆ mMsgStr

QString Isis::WarningWidget::mMsgStr
private

Definition at line 57 of file WarningWidget.h.

◆ mNoWarning

QPushButton* Isis::WarningWidget::mNoWarning
private

Definition at line 54 of file WarningWidget.h.

◆ mSBar

QStatusBar* Isis::WarningWidget::mSBar
private

Definition at line 56 of file WarningWidget.h.

◆ mTextEdit

QTextEdit* Isis::WarningWidget::mTextEdit
private

Definition at line 58 of file WarningWidget.h.

◆ mWarning

QPushButton * Isis::WarningWidget::mWarning
private

Definition at line 54 of file WarningWidget.h.

◆ mWindow

QWidget* Isis::WarningWidget::mWindow
private

Definition at line 53 of file WarningWidget.h.


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