kmail
KMail::FilterLog Class Reference
KMail Filter Log Collector. More...
#include <filterlog.h>
Inheritance diagram for KMail::FilterLog:
Public Types | |
enum | ContentType { meta = 1, patternDesc = 2, ruleResult = 4, patternResult = 8, appliedAction = 16 } |
Signals | |
void | logEntryAdded (QString) |
void | logShrinked () |
void | logStateChanged () |
Public Member Functions | |
void | add (QString logEntry, ContentType contentType) |
void | addSeparator () |
void | clear () |
void | dump () |
const QStringList & | getLogEntries () |
long | getMaxLogSize () |
bool | isContentTypeEnabled (ContentType contentType) |
bool | isLogging () |
bool | saveToFile (QString fileName) |
void | setContentTypeEnabled (ContentType contentType, bool b) |
void | setLogging (bool active) |
void | setMaxLogSize (long size=-1) |
virtual | ~FilterLog () |
Static Public Member Functions | |
static FilterLog * | instance () |
static QString | recode (const QString &plain) |
Protected Member Functions | |
void | checkLogSize () |
FilterLog () | |
Protected Attributes | |
int | mAllowedTypes |
long | mCurrentLogSize |
QStringList | mLogEntries |
bool | mLogging |
long | mMaxLogSize |
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
Constructor & Destructor Documentation
FilterLog::~FilterLog | ( | ) | [virtual] |
FilterLog::FilterLog | ( | ) | [protected] |
Non-public constructor needed by the singleton implementation.
Definition at line 46 of file filterlog.cpp.
Member Function Documentation
void FilterLog::add | ( | QString | logEntry, | |
ContentType | contentType | |||
) |
void KMail::FilterLog::addSeparator | ( | ) | [inline] |
void FilterLog::checkLogSize | ( | ) | [protected] |
Definition at line 115 of file filterlog.cpp.
void KMail::FilterLog::clear | ( | ) | [inline] |
void FilterLog::dump | ( | ) |
const QStringList& KMail::FilterLog::getLogEntries | ( | ) | [inline] |
long KMail::FilterLog::getMaxLogSize | ( | ) | [inline] |
Definition at line 84 of file filterlog.h.
FilterLog * FilterLog::instance | ( | ) | [static] |
bool KMail::FilterLog::isContentTypeEnabled | ( | ContentType | contentType | ) | [inline] |
check a content type for inclusion in the set of logged ones
Definition at line 98 of file filterlog.h.
bool KMail::FilterLog::isLogging | ( | ) | [inline] |
void KMail::FilterLog::logEntryAdded | ( | QString | ) | [signal] |
void KMail::FilterLog::logShrinked | ( | ) | [signal] |
void KMail::FilterLog::logStateChanged | ( | ) | [signal] |
Definition at line 127 of file filterlog.h.
bool FilterLog::saveToFile | ( | QString | fileName | ) |
void KMail::FilterLog::setContentTypeEnabled | ( | ContentType | contentType, | |
bool | b | |||
) | [inline] |
void KMail::FilterLog::setLogging | ( | bool | active | ) | [inline] |
void FilterLog::setMaxLogSize | ( | long | size = -1 |
) |
Member Data Documentation
int KMail::FilterLog::mAllowedTypes [protected] |
long KMail::FilterLog::mCurrentLogSize [protected] |
Definition at line 148 of file filterlog.h.
QStringList KMail::FilterLog::mLogEntries [protected] |
bool KMail::FilterLog::mLogging [protected] |
long KMail::FilterLog::mMaxLogSize [protected] |
max size for kept log items, when reached the last recently added items are discarded -1 means unlimited
Definition at line 147 of file filterlog.h.
The documentation for this class was generated from the following files: