mailcommon
#include <filterlog.h>
Public Types | |
enum | ContentType { Meta = 1, PatternDescription = 2, RuleResult = 4, PatternResult = 8, AppliedAction = 16 } |
Signals | |
void | logEntryAdded (const QString &entry) |
void | logShrinked () |
void | logStateChanged () |
Public Member Functions | |
virtual | ~FilterLog () |
void | add (const QString &entry, ContentType type) |
void | addSeparator () |
void | clear () |
void | dump () |
bool | isContentTypeEnabled (ContentType type) const |
bool | isLogging () const |
QStringList | logEntries () const |
long | maxLogSize () const |
bool | saveToFile (const QString &fileName) const |
void | setContentTypeEnabled (ContentType type, bool enabled) |
void | setLogging (bool active) |
void | setMaxLogSize (long size=-1) |
Static Public Member Functions | |
static FilterLog * | instance () |
static QString | recode (const QString &plain) |
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 56 of file filterlog.h.
Member Enumeration Documentation
Describes the type of content that will be logged.
Definition at line 74 of file filterlog.h.
Constructor & Destructor Documentation
|
virtual |
Destroys the filter log.
Definition at line 101 of file filterlog.cpp.
Member Function Documentation
void FilterLog::add | ( | const QString & | entry, |
ContentType | type | ||
) |
Adds the given log entry
under the given content type
to the log.
Definition at line 163 of file filterlog.cpp.
void FilterLog::addSeparator | ( | ) |
Adds a separator line to the log.
Definition at line 180 of file filterlog.cpp.
void FilterLog::clear | ( | ) |
Clears the log.
Definition at line 185 of file filterlog.cpp.
void FilterLog::dump | ( | ) |
|
static |
Returns the single global instance of the filter log.
Definition at line 106 of file filterlog.cpp.
bool FilterLog::isContentTypeEnabled | ( | ContentType | type | ) | const |
Returns whether the given content type
is enabled for logging.
Definition at line 158 of file filterlog.cpp.
bool FilterLog::isLogging | ( | ) | const |
Returns whether the filter log is currently active.
Definition at line 115 of file filterlog.cpp.
QStringList FilterLog::logEntries | ( | ) | const |
Returns the list of log entries.
Definition at line 191 of file filterlog.cpp.
|
signal |
This signal is emitted whenever a new entry
has been added to the log.
|
signal |
This signal is emitted whenever the log has shrinked.
|
signal |
This signal is emitted whenever the activity of the filter log has been changed.
long FilterLog::maxLogSize | ( | ) | const |
Returns the maximum size of the log in bytes.
Definition at line 142 of file filterlog.cpp.
|
static |
Returns an escaped version of the log which can be used in a HTML document.
Definition at line 227 of file filterlog.cpp.
bool FilterLog::saveToFile | ( | const QString & | fileName | ) | const |
Saves the log to the file with the given fileName
.
- Returns
true
on success orfalse
on failure.
Definition at line 207 of file filterlog.cpp.
void FilterLog::setContentTypeEnabled | ( | ContentType | type, |
bool | enabled | ||
) |
Sets whether a given content type
will be enabled
for logging.
Definition at line 147 of file filterlog.cpp.
void FilterLog::setLogging | ( | bool | active | ) |
Sets whether the filter log is currently active
.
Definition at line 120 of file filterlog.cpp.
void FilterLog::setMaxLogSize | ( | long | size = -1 | ) |
Sets the maximum size
of the log in bytes.
Definition at line 126 of file filterlog.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.