MAK RTIspy API Documentation for HLA 1516
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:

List of all members.

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.

Signals

void notifyLevelUpdated (int id, MAKRti::DtNotifyLevelType level)
 Signal emitted when the notify level is updated.

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).

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.

Private Member Functions

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

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().

Destructor.

References myLogFile.

Copy constructor not implemented.


Member Function Documentation

void DtFileConsoleWidget::hideEvent ( QHideEvent *  event) [protected, virtual]

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 DtAssistantTrayIconMgr::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 ( ) [protected, virtual]

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 DtAssistantTrayIconMgr::enableComponentLog().

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

Closes the current log file and opens the new one.

References myLogFile, and updateConsole().

Referenced by DtAssistantTrayIconMgr::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 DtAssistantTrayIconMgr::enableComponentLog(), DtAssistantTrayIconMgr::renameComponent(), and DtAssistantPreferencesViewMgr::showAssistantLog().

void DtFileConsoleWidget::setUpdateInterval ( int  interval) [virtual]

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

References myUpdateInterval, and myUpdateTimer.

Referenced by DtAssistantTrayIconMgr::setLogUpdateInterval().

void DtFileConsoleWidget::showEvent ( QShowEvent *  event) [protected, virtual]

Handles show events.

References myUpdateInterval, myUpdateTimer, and updateConsole().

void DtFileConsoleWidget::updateConsole ( ) [virtual, slot]

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) [virtual, slot]

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().

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

Referenced by setUpdateInterval(), and showEvent().

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 Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)