#include <filterlog.h>
Inherits TQObject.
Public Types | |
enum | ContentType { meta = 1 , patternDesc = 2 , ruleResult = 4 , patternResult = 8 , appliedAction = 16 } |
Signals | |
void | logEntryAdded (TQString) |
void | logShrinked () |
void | logStateChanged () |
Public Member Functions | |
bool | isLogging () |
void | setLogging (bool active) |
void | setMaxLogSize (long size=-1) |
long | getMaxLogSize () |
void | setContentTypeEnabled (ContentType contentType, bool b) |
bool | isContentTypeEnabled (ContentType contentType) |
void | add (TQString logEntry, ContentType contentType) |
void | addSeparator () |
void | clear () |
const TQStringList & | getLogEntries () |
void | dump () |
bool | saveToFile (TQString fileName) |
virtual | ~FilterLog () |
Static Public Member Functions | |
static FilterLog * | instance () |
static TQString | recode (const TQString &plain) |
Protected Member Functions | |
FilterLog () | |
void | checkLogSize () |
Protected Attributes | |
TQStringList | mLogEntries |
bool | mLogging |
long | mMaxLogSize |
long | mCurrentLogSize |
int | mAllowedTypes |
Detailed Description
KMail Filter Log Collector.
The filter log helps to collect log information about the filter process in KMail. It's implemented as singleton, so it's easy to direct pieces of information to a unique instance. It's possible to activate / deactivate logging. All collected log information can get thrown away, the next added log entry is the first one until another clearing. A signal is emitted whenever a new logentry is added, when the log was cleared or any log state was changed.
Definition at line 53 of file filterlog.h.
Member Enumeration Documentation
◆ ContentType
log data types
Definition at line 63 of file filterlog.h.
Constructor & Destructor Documentation
◆ ~FilterLog()
|
virtual |
destructor
Definition at line 60 of file filterlog.cpp.
◆ FilterLog()
|
protected |
Non-public constructor needed by the singleton implementation.
Definition at line 46 of file filterlog.cpp.
Member Function Documentation
◆ add()
void FilterLog::add | ( | TQString | logEntry, |
ContentType | contentType | ||
) |
add a log entry
Definition at line 71 of file filterlog.cpp.
◆ addSeparator()
|
inline |
add a separating line in the log
Definition at line 108 of file filterlog.h.
◆ clear()
|
inline |
discard collected log data
Definition at line 110 of file filterlog.h.
◆ dump()
void FilterLog::dump | ( | ) |
dump the log - for testing purposes
Definition at line 101 of file filterlog.cpp.
◆ getLogEntries()
|
inline |
get access to the log entries
Definition at line 119 of file filterlog.h.
◆ instance()
|
static |
access to the singleton instance
Definition at line 64 of file filterlog.cpp.
◆ isContentTypeEnabled()
|
inline |
check a content type for inclusion in the set of logged ones
Definition at line 99 of file filterlog.h.
◆ isLogging()
|
inline |
check the logging state
Definition at line 74 of file filterlog.h.
◆ saveToFile()
bool FilterLog::saveToFile | ( | TQString | fileName | ) |
save the log to a file - returns true if okay
Definition at line 143 of file filterlog.cpp.
◆ setContentTypeEnabled()
|
inline |
add/remove a content type to the set of logged ones
Definition at line 89 of file filterlog.h.
◆ setLogging()
|
inline |
set the logging state
Definition at line 76 of file filterlog.h.
◆ setMaxLogSize()
void FilterLog::setMaxLogSize | ( | long | size = -1 | ) |
control the size of the log
Definition at line 88 of file filterlog.cpp.
Member Data Documentation
◆ mAllowedTypes
|
protected |
types currently allowed to be legged
Definition at line 152 of file filterlog.h.
◆ mLogEntries
|
protected |
The list contains the single log pieces.
Definition at line 140 of file filterlog.h.
◆ mLogging
|
protected |
the log status
Definition at line 143 of file filterlog.h.
◆ mMaxLogSize
|
protected |
max size for kept log items, when reached the last recently added items are discarded -1 means unlimited
Definition at line 148 of file filterlog.h.
The documentation for this class was generated from the following files: