A subclass of QPlainTextEdit which implements QtlLogger interface.
More...
A subclass of QPlainTextEdit which implements QtlLogger interface.
◆ QtlPlainTextLogger() [1/2]
QtlPlainTextLogger::QtlPlainTextLogger |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Constructor.
- Parameters
-
[in] | parent | Optional parent widget. |
◆ QtlPlainTextLogger() [2/2]
QtlPlainTextLogger::QtlPlainTextLogger |
( |
const QString & |
text, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
[in] | text | Initial content. |
[in] | parent | Optional parent widget. |
◆ text()
void QtlPlainTextLogger::text |
( |
const QString & |
text | ) |
|
|
virtual |
◆ line()
void QtlPlainTextLogger::line |
( |
const QString & |
line, |
|
|
const QColor & |
color = QColor() |
|
) |
| |
|
virtual |
Log a line of text.
Reimplemented from QtlLogger.
- Parameters
-
[in] | line | Line to log. No need to contain a trailing new-line character. |
[in] | color | When a valid color is passed, try to display the text in this color. |
Implements QtlLogger.
◆ debug()
void QtlPlainTextLogger::debug |
( |
const QString & |
line, |
|
|
const QColor & |
color = QColor() |
|
) |
| |
|
virtual |
Log a line of debug text.
Reimplemented from QtlLogger.
- Parameters
-
[in] | line | Line to log. No need to contain a trailing new-line character. |
[in] | color | When a valid color is passed, try to display the text in this color. |
Implements QtlLogger.
◆ debugMode()
bool QtlPlainTextLogger::debugMode |
( |
| ) |
const |
|
inline |
Check if debug mode is active.
- Returns
- True if debug mode is set, false otherwise.
◆ save
void QtlPlainTextLogger::save |
( |
| ) |
|
|
slot |
Save the content of the log window in a file.
Ask the user to select a file.
◆ saveToFile
void QtlPlainTextLogger::saveToFile |
( |
const QString & |
fileName | ) |
|
|
slot |
Save the content of the log window in a file.
- Parameters
-
[in] | fileName | Name of the file to write the log window content into. If empty, ask the user to select a file. |
◆ setDebugMode
void QtlPlainTextLogger::setDebugMode |
( |
bool |
on | ) |
|
|
slot |
Set / reset the debug mode.
- Parameters
-
[in] | on | When true, the debug() lines are displayed. When false, they are discarded. |
◆ _debug
bool QtlPlainTextLogger::_debug |
|
private |
◆ _lastSavedLog
QString QtlPlainTextLogger::_lastSavedLog |
|
private |
Last saved log file name.
The documentation for this class was generated from the following files: