MAK RTIspy API Documentation for HLA Evolved
List of all members | Classes | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtConsoleWidget Class Reference

Qt widget that provides the GUI for a console display. More...

+ Inheritance diagram for DtConsoleWidget:
+ Collaboration diagram for DtConsoleWidget:

Classes

struct  DtTextAndColor

Public Slots

virtual void processNotifyComboxBoxUpdate (int level)
 Catches the notify level combo box update and emits the notifyLevelUpdated signal with the new notifyLevel.
virtual void processSave ()
 Processes the pressing of the save button.
virtual void processPause ()
 Processes the pressing of the pause button.
virtual void processResume ()
 Processes the pressing of the resume button.
virtual void processSearch ()
 Processes the pressing of the search button.
virtual void focusSearchEdit ()
 Focus on the search.

Signals

void notifyLevelUpdated (MAKRti::DtNotifyLevelType notifyLevel)
 Signals that the notify level has been updated by the user.

Public Member Functions

 DtConsoleWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructor.
virtual ~DtConsoleWidget ()
 Destructor.
virtual void writeText (const QString &st, QColor color=Qt::black)
 Writes the text to the display in the specified color.
virtual void clear ()
 Clears all of the text from the display.
virtual void setNotifyLevel (MAKRti::DtNotifyLevelType notifyLevel)
 Sets the notify level in the combo box.
virtual void setMaximumLines (int max)
 Sets the maximum number of lines which can be in the buffer.
virtual void setDocument (QTextDocument *document)
 Sets the given document to be the document of the text edit.
virtual void removeNotifyComboBox ()
 removes the notify level combo box
virtual void showToolBar (bool showBar=true)
 Shows or hides the tool bar items.
virtual void showClearButton (bool showButton=true)
 Shows or hides the tool bar items.
virtual void showSaveButton (bool showButton=true)
 Shows or hides the tool bar items.
virtual void showPauseResumeButton (bool showButton=true)
 Shows or hides the tool bar items.
virtual void showNotifyLevelBox (bool showBox=true)
 Shows or hides the tool bar items.

Protected Types

typedef std::list< DtTextAndColorDtTextAndColorList

Protected Member Functions

virtual void saveToFile ()
 Saves the console output to a file.

Protected Attributes

QToolBar * myToolBar
 The tool bar for a console widget.
QAction * myClearAction
 The tool bar action which clears the console.
QAction * mySaveAction
 The tool bar action which saves the full log to a file.
QAction * myPauseAction
 The tool bar action which pauses the console, preventing it from updating and scrolling.
QAction * myResumeAction
 The tool bar action which resumes the console after it has been paused.
QComboBox * myNotifyComboBox
 The tool bar combo box which will update the notify level.
QTextEdit * myTextEdit
 The text edit box which displays the log.
QFrame * myFrame
 The frame of the widget.
QGridLayout * myLayout
 The layout of the widget.
QGridLayout * myFrameLayout
 The layout of the frame.
QString mySavedFile
 The previously saved file.
QLineEdit * mySearchEdit
 The search edit box.
QPushButton * mySearchPushButton
 The search button.
QSpacerItem * mySpacer
 Spacer item for the grid layout.
QShortcut * mySearchShortcut
 Search edit shortcut.
bool myIsPaused
 Indicates if the console is currently paused.
DtTextAndColorList myPauseText
 Used to store text while pause is on.

Detailed Description

Qt widget that provides the GUI for a console display.

Member Typedef Documentation

typedef std::list< DtTextAndColor > DtConsoleWidget::DtTextAndColorList
protected

Constructor & Destructor Documentation

DtConsoleWidget::DtConsoleWidget ( QWidget parent = 0,
Qt::WindowFlags  f = 0 
)
DtConsoleWidget::~DtConsoleWidget ( )
virtual

Destructor.

Member Function Documentation

void DtConsoleWidget::clear ( )
virtual

Clears all of the text from the display.

Reimplemented in DtExecConsoleWidget.

References myTextEdit.

Referenced by DtConsoleWidget().

void DtConsoleWidget::focusSearchEdit ( )
virtualslot

Focus on the search.

References mySearchEdit.

Referenced by DtConsoleWidget().

void DtConsoleWidget::notifyLevelUpdated ( MAKRti::DtNotifyLevelType  notifyLevel)
signal

Signals that the notify level has been updated by the user.

DtConsoleWidget does not update the notify level. This signal should be attached to a slot which actually changes the notify level.

Referenced by processNotifyComboxBoxUpdate().

void DtConsoleWidget::processNotifyComboxBoxUpdate ( int  level)
virtualslot

Catches the notify level combo box update and emits the notifyLevelUpdated signal with the new notifyLevel.

References notifyLevelUpdated().

Referenced by DtConsoleWidget().

void DtConsoleWidget::processPause ( )
virtualslot

Processes the pressing of the pause button.

References myIsPaused, myPauseAction, and myResumeAction.

Referenced by DtConsoleWidget().

void DtConsoleWidget::processResume ( )
virtualslot

Processes the pressing of the resume button.

References myIsPaused, myPauseAction, myPauseText, myResumeAction, and writeText().

Referenced by DtConsoleWidget().

void DtConsoleWidget::processSave ( )
virtualslot

Processes the pressing of the save button.

References saveToFile().

Referenced by DtConsoleWidget().

void DtConsoleWidget::processSearch ( )
virtualslot

Processes the pressing of the search button.

References false, mySearchEdit, and myTextEdit.

Referenced by DtConsoleWidget().

void DtConsoleWidget::removeNotifyComboBox ( )
virtual

removes the notify level combo box

References myFrameLayout, and myNotifyComboBox.

Referenced by DtAssistantPreferencesViewMgr::showAssistantLog().

void DtConsoleWidget::saveToFile ( )
protectedvirtual

Saves the console output to a file.

Prompts the user with a dialog to select or enter a file.

Reimplemented in DtFileConsoleWidget.

References mySavedFile, and myTextEdit.

Referenced by processSave().

void DtConsoleWidget::setDocument ( QTextDocument *  document)
virtual

Sets the given document to be the document of the text edit.

The document's parent will be reset to be the text edit.

References myTextEdit.

void DtConsoleWidget::setMaximumLines ( int  max)
virtual

Sets the maximum number of lines which can be in the buffer.

When the limit is reached, the oldest lines will be discarded.

References myTextEdit.

Referenced by DtFileConsoleWidget::DtFileConsoleWidget().

void DtConsoleWidget::setNotifyLevel ( MAKRti::DtNotifyLevelType  notifyLevel)
virtual

Sets the notify level in the combo box.

Reimplemented in DtExecConsoleWidget.

References myNotifyComboBox.

Referenced by DtAssistantLogFileMgr::enableComponentLog().

void DtConsoleWidget::showClearButton ( bool  showButton = true)
virtual

Shows or hides the tool bar items.

References myClearAction.

void DtConsoleWidget::showNotifyLevelBox ( bool  showBox = true)
virtual

Shows or hides the tool bar items.

References myNotifyComboBox.

Referenced by DtAssistantTrayIconMgr::DtAssistantTrayIconMgr().

void DtConsoleWidget::showPauseResumeButton ( bool  showButton = true)
virtual

Shows or hides the tool bar items.

References myIsPaused, myPauseAction, and myResumeAction.

void DtConsoleWidget::showSaveButton ( bool  showButton = true)
virtual

Shows or hides the tool bar items.

References mySaveAction.

void DtConsoleWidget::showToolBar ( bool  showBar = true)
virtual

Shows or hides the tool bar items.

References myToolBar.

void DtConsoleWidget::writeText ( const QString &  st,
QColor  color = Qt::black 
)
virtual

Writes the text to the display in the specified color.

The default is black if no color is specified.

Reimplemented in DtExecConsoleWidget.

References DtConsoleWidget::DtTextAndColor::color, myIsPaused, myPauseText, and myTextEdit.

Referenced by processResume(), and DtFileConsoleWidget::updateConsole().

Member Data Documentation

QAction* DtConsoleWidget::myClearAction
protected

The tool bar action which clears the console.

Referenced by DtConsoleWidget(), and showClearButton().

QFrame* DtConsoleWidget::myFrame
protected

The frame of the widget.

Referenced by DtConsoleWidget().

QGridLayout* DtConsoleWidget::myFrameLayout
protected
bool DtConsoleWidget::myIsPaused
protected

Indicates if the console is currently paused.

Referenced by processPause(), processResume(), showPauseResumeButton(), DtFileConsoleWidget::updateConsole(), and writeText().

QGridLayout* DtConsoleWidget::myLayout
protected

The layout of the widget.

Referenced by DtConsoleWidget().

QComboBox* DtConsoleWidget::myNotifyComboBox
protected

The tool bar combo box which will update the notify level.

Referenced by DtConsoleWidget(), DtExecConsoleWidget::DtExecConsoleWidget(), removeNotifyComboBox(), setNotifyLevel(), and showNotifyLevelBox().

QAction* DtConsoleWidget::myPauseAction
protected

The tool bar action which pauses the console, preventing it from updating and scrolling.

Referenced by DtConsoleWidget(), processPause(), processResume(), and showPauseResumeButton().

DtTextAndColorList DtConsoleWidget::myPauseText
protected

Used to store text while pause is on.

Will be written to the console when it resumes.

Referenced by processResume(), and writeText().

QAction* DtConsoleWidget::myResumeAction
protected

The tool bar action which resumes the console after it has been paused.

Referenced by DtConsoleWidget(), processPause(), processResume(), and showPauseResumeButton().

QAction* DtConsoleWidget::mySaveAction
protected

The tool bar action which saves the full log to a file.

Referenced by DtConsoleWidget(), and showSaveButton().

QString DtConsoleWidget::mySavedFile
protected

The previously saved file.

Referenced by DtFileConsoleWidget::saveToFile(), and saveToFile().

QLineEdit* DtConsoleWidget::mySearchEdit
protected

The search edit box.

Referenced by DtConsoleWidget(), focusSearchEdit(), and processSearch().

QPushButton* DtConsoleWidget::mySearchPushButton
protected

The search button.

Referenced by DtConsoleWidget().

QShortcut* DtConsoleWidget::mySearchShortcut
protected

Search edit shortcut.

Referenced by DtConsoleWidget().

QSpacerItem* DtConsoleWidget::mySpacer
protected

Spacer item for the grid layout.

Referenced by DtConsoleWidget().

QTextEdit* DtConsoleWidget::myTextEdit
protected

The text edit box which displays the log.

Referenced by clear(), DtConsoleWidget(), processSearch(), saveToFile(), setDocument(), setMaximumLines(), and writeText().

QToolBar* DtConsoleWidget::myToolBar
protected

The tool bar for a console widget.

Referenced by DtConsoleWidget(), DtExecConsoleWidget::DtExecConsoleWidget(), and showToolBar().


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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)