MAK RTIspy API Documentation for HLA Evolved
List of all members | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

Provides the GUI for a console which displays the contents of a log file. More...

+ Inheritance diagram for DtFileConsoleWidget:
+ Collaboration diagram for DtFileConsoleWidget:

Public Slots

virtual void updateConsole ()
 Reads the latest data from the log file and outputs to the console.
virtual void updateNotifyLevel (MAKRti::DtNotifyLevelType level)
 Emits a signal when the notify level is updated with the new level and the name of this console widget.
- Public Slots inherited from DtConsoleWidget
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 (int id, MAKRti::DtNotifyLevelType level)
 Signal emitted when the notify level is updated.
- Signals inherited from DtConsoleWidget
void notifyLevelUpdated (MAKRti::DtNotifyLevelType notifyLevel)
 Signals that the notify level has been updated by the user.

Public Member Functions

 DtFileConsoleWidget (int updateInterval=400, QWidget *parent=0, Qt::WindowFlags f=0)
 Constructor.
virtual ~DtFileConsoleWidget ()
 Destructor.
virtual void setLogFile (const QString &logFileName)
 Closes the current log file and opens the new one.
virtual QString logFileName ()
 Returns the name and path of the log file.
virtual void setName (const QString &name)
 Sets the name of this console widget, which will be used to create the window title.
virtual QString name ()
 Gets the name of this console widget.
virtual void setId (int id)
 Sets the ID of this console widget, which is used in the console's emitted signals to uniquely identify it.
virtual int id ()
 Gets the ID of this console widget.
virtual void setUpdateInterval (int interval)
 Changes the update interval to the new value (in msecs).
- Public Member Functions inherited from DtConsoleWidget
 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 Member Functions

virtual void hideEvent (QHideEvent *event)
 Handles hide events.
virtual void showEvent (QShowEvent *event)
 Handles show events.
virtual void saveToFile ()
 Copies the log file to the user designated file.

Protected Attributes

QFile * myLogFile
 The log file used as input to the console display.
QString myName
 Name given to this console.
int myId
 ID used to identify this console in its emitted signals.
QTimer * myUpdateTimer
 Console display refresh timer.
int myUpdateInterval
 The interval, in msecs, at which the console will be refreshed.
- Protected Attributes inherited from DtConsoleWidget
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.

Private Member Functions

 DtFileConsoleWidget (DtFileConsoleWidget const &)
 Copy constructor not implemented.
DtFileConsoleWidgetoperator= (DtFileConsoleWidget const &)
 Assignment operator not implemented.

Additional Inherited Members

- Protected Types inherited from DtConsoleWidget
typedef std::list< DtTextAndColorDtTextAndColorList

Detailed Description

Provides the GUI for a console which displays the contents of a log file.

DtFileConsoleWidget is derived from DtConsoleWidget. It updates the console display from a log file which is continuously updated.

Constructor & Destructor Documentation

DtFileConsoleWidget::DtFileConsoleWidget ( int  updateInterval = 400,
QWidget parent = 0,
Qt::WindowFlags  f = 0 
)

Constructor.

The log file will be opened and used as input for the console display.

References connect(), myLogFile, myUpdateTimer, notifyLevelUpdated(), DtConsoleWidget::setMaximumLines(), updateConsole(), and updateNotifyLevel().

DtFileConsoleWidget::~DtFileConsoleWidget ( )
virtual

Destructor.

References myLogFile.

DtFileConsoleWidget::DtFileConsoleWidget ( DtFileConsoleWidget const &  )
private

Copy constructor not implemented.

Member Function Documentation

void DtFileConsoleWidget::hideEvent ( QHideEvent *  event)
protectedvirtual

Handles hide events.

References myUpdateTimer.

int DtFileConsoleWidget::id ( )
virtual

Gets the ID of this console widget.

References myId.

Referenced by setId().

QString DtFileConsoleWidget::logFileName ( )
virtual

Returns the name and path of the log file.

References myLogFile.

Referenced by DtAssistantLogFileMgr::enableComponentLog().

QString DtFileConsoleWidget::name ( )
virtual

Gets the name of this console widget.

References myName.

Referenced by setName().

void DtFileConsoleWidget::notifyLevelUpdated ( int  id,
MAKRti::DtNotifyLevelType  level 
)
signal

Signal emitted when the notify level is updated.

Referenced by DtFileConsoleWidget(), and updateNotifyLevel().

DtFileConsoleWidget& DtFileConsoleWidget::operator= ( DtFileConsoleWidget const &  )
private

Assignment operator not implemented.

void DtFileConsoleWidget::saveToFile ( )
protectedvirtual

Copies the log file to the user designated file.

Reimplemented from DtConsoleWidget.

References myLogFile, myName, and DtConsoleWidget::mySavedFile.

void DtFileConsoleWidget::setId ( int  id)
virtual

Sets the ID of this console widget, which is used in the console's emitted signals to uniquely identify it.

References id(), and myId.

Referenced by DtAssistantLogFileMgr::enableComponentLog().

void DtFileConsoleWidget::setLogFile ( const QString &  logFileName)
virtual

Closes the current log file and opens the new one.

References myLogFile, and updateConsole().

Referenced by DtAssistantLogFileMgr::enableComponentLog(), and DtAssistantPreferencesViewMgr::showAssistantLog().

void DtFileConsoleWidget::setName ( const QString &  name)
virtual

Sets the name of this console widget, which will be used to create the window title.

References myName, and name().

Referenced by DtAssistantLogFileMgr::enableComponentLog(), DtAssistantLogFileMgr::renameComponent(), and DtAssistantPreferencesViewMgr::showAssistantLog().

void DtFileConsoleWidget::setUpdateInterval ( int  interval)
virtual

Changes the update interval to the new value (in msecs).

References interval, myUpdateInterval, and myUpdateTimer.

Referenced by DtAssistantLogFileMgr::setLogUpdateInterval().

void DtFileConsoleWidget::showEvent ( QShowEvent *  event)
protectedvirtual

Handles show events.

References myUpdateInterval, myUpdateTimer, and updateConsole().

void DtFileConsoleWidget::updateConsole ( )
virtualslot

Reads the latest data from the log file and outputs to the console.

References DtConsoleWidget::myIsPaused, myLogFile, and DtConsoleWidget::writeText().

Referenced by DtFileConsoleWidget(), setLogFile(), showEvent(), and DtAssistantPreferencesViewMgr::tick().

void DtFileConsoleWidget::updateNotifyLevel ( MAKRti::DtNotifyLevelType  level)
virtualslot

Emits a signal when the notify level is updated with the new level and the name of this console widget.

References myId, and notifyLevelUpdated().

Referenced by DtFileConsoleWidget().

Member Data Documentation

int DtFileConsoleWidget::myId
protected

ID used to identify this console in its emitted signals.

Referenced by id(), setId(), and updateNotifyLevel().

QFile* DtFileConsoleWidget::myLogFile
protected

The log file used as input to the console display.

Referenced by DtFileConsoleWidget(), logFileName(), saveToFile(), setLogFile(), updateConsole(), and ~DtFileConsoleWidget().

QString DtFileConsoleWidget::myName
protected

Name given to this console.

Referenced by name(), saveToFile(), and setName().

int DtFileConsoleWidget::myUpdateInterval
protected

The interval, in msecs, at which the console will be refreshed.

Referenced by setUpdateInterval(), and showEvent().

QTimer* DtFileConsoleWidget::myUpdateTimer
protected

Console display refresh timer.

Referenced by DtFileConsoleWidget(), hideEvent(), setUpdateInterval(), and showEvent().


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

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)