direcs  2012-09-30
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Logfile Class Reference

Handles the access to the global log-file. More...

#include <logfile.h>

List of all members.

Public Slots

void appendLog (QString text, bool CR=true)
void writeHeartbeat (unsigned char state)

Public Member Functions

 Logfile ()
void setFilename (QString filename)
 ~Logfile ()

Private Attributes

QFile file
QString logFilename
QDateTime now
QString programPath

Detailed Description

Handles the access to the global log-file.

Author:
Markus Knapp This class handles the access to the global log-file where all actions are stored if enabled in the ini-file.

Definition at line 38 of file logfile.h.


Constructor & Destructor Documentation

Logfile::Logfile ( )

Definition at line 23 of file logfile.cpp.

Logfile::~Logfile ( )

Definition at line 29 of file logfile.cpp.


Member Function Documentation

void Logfile::appendLog ( QString  text,
bool  CR = true 
)
slot

Appends text to the log file.

Parameters:
textis the text to be written.
CRadds a carriage return (CR) to the text, if true (default). This parameter is optional!

Definition at line 74 of file logfile.cpp.

Here is the caller graph for this function:

void Logfile::setFilename ( QString  filename)

Sets the name of the log file.

Parameters:
filename

Definition at line 113 of file logfile.cpp.

Here is the caller graph for this function:

void Logfile::writeHeartbeat ( unsigned char  state)
slot

Write the received heartbeat signal from the hardware to the logfile.

Todo:
Place somewhere else!
Parameters:
stateis unused!
See also:
SensorThread::heartbeat()

Definition at line 127 of file logfile.cpp.

Here is the call graph for this function:


Member Data Documentation

QFile Logfile::file
private

Definition at line 73 of file logfile.h.

QString Logfile::logFilename
private

Definition at line 72 of file logfile.h.

QDateTime Logfile::now
private

Definition at line 75 of file logfile.h.

QString Logfile::programPath
private

Definition at line 74 of file logfile.h.


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