![]() |
MAK RTIspy API Documentation for HLA 1.3
|
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. | |
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. | |
| DtFileConsoleWidget & | operator= (DtFileConsoleWidget const &) |
| Assignment operator not implemented. | |
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.
| 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.
| void DtFileConsoleWidget::hideEvent | ( | QHideEvent * | event | ) | [protected, virtual] |
Handles hide events.
References myUpdateTimer.
| int DtFileConsoleWidget::id | ( | ) | [virtual] |
| QString DtFileConsoleWidget::logFileName | ( | ) | [virtual] |
Returns the name and path of the log file.
References myLogFile.
Referenced by DtAssistantTrayIconMgr::enableComponentLog().
| QString DtFileConsoleWidget::name | ( | ) | [virtual] |
| 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.
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().
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().