QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlStdoutLogger Class Reference

An implementation of QtlLogger which prints messages on standard output or other standard files. More...

Inheritance diagram for QtlStdoutLogger:
QtlLogger

Public Member Functions

 QtlStdoutLogger (FILE *file=0, bool debug=false)
 Constructor. More...
 
virtual void debug (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE
 Log a line of debug text. More...
 
virtual void line (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE
 Log a line of text. More...
 
void setDebugMode (bool on)
 Set / reset the debug mode. More...
 
virtual void text (const QString &text) Q_DECL_OVERRIDE
 Log text. More...
 

Private Attributes

bool _debug
 Debug mode. More...
 
QTextStream _out
 Output text stream. More...
 

Detailed Description

An implementation of QtlLogger which prints messages on standard output or other standard files.

Constructor & Destructor Documentation

◆ QtlStdoutLogger()

QtlStdoutLogger::QtlStdoutLogger ( FILE *  file = 0,
bool  debug = false 
)
inline

Constructor.

Parameters
[in]fileStandard file to use, stdout by default.
[in]debugActivate debug if true.

Member Function Documentation

◆ text()

virtual void QtlStdoutLogger::text ( const QString &  text)
inlinevirtual

Log text.

Parameters
[in]textText to log.

Implements QtlLogger.

◆ line()

virtual void QtlStdoutLogger::line ( const QString &  line,
const QColor &  color = QColor() 
)
inlinevirtual

Log a line of text.

Parameters
[in]lineLine to log. No need to contain a trailing new-line character.
[in]colorWhen a valid color is passed, try to display the text in this color. Present by contract from QtlLogger but ignored.

Implements QtlLogger.

◆ debug()

virtual void QtlStdoutLogger::debug ( const QString &  line,
const QColor &  color = QColor() 
)
inlinevirtual

Log a line of debug text.

Parameters
[in]lineLine to log. No need to contain a trailing new-line character.
[in]colorWhen a valid color is passed, try to display the text in this color. Present by contract from QtlLogger but ignored.

Implements QtlLogger.

◆ setDebugMode()

void QtlStdoutLogger::setDebugMode ( bool  on)
inline

Set / reset the debug mode.

Parameters
[in]onWhen true, the debug() lines are displayed. When false, they are discarded.

Member Data Documentation

◆ _out

QTextStream QtlStdoutLogger::_out
private

Output text stream.

◆ _debug

bool QtlStdoutLogger::_debug
private

Debug mode.


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