• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • MailCommon
  • FilterLog
Public Types | Signals | Public Member Functions | Static Public Member Functions | List of all members
MailCommon::FilterLog Class Reference

#include <filterlog.h>

Inheritance diagram for MailCommon::FilterLog:
Inheritance graph
[legend]

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.

Author
Andreas Gungl a.gun.nosp@m.gl@g.nosp@m.mx.de

Definition at line 56 of file filterlog.h.

Member Enumeration Documentation

enum MailCommon::FilterLog::ContentType

Describes the type of content that will be logged.

Enumerator
Meta 

Log all meta data.

PatternDescription 

Log all pattern description.

RuleResult 

Log all rule matching results.

PatternResult 

Log all pattern matching results.

AppliedAction 

Log all applied actions.

Definition at line 74 of file filterlog.h.

Constructor & Destructor Documentation

FilterLog::~FilterLog ( )
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 ( )

Dumps the log to console.

Used for debugging.

Definition at line 196 of file filterlog.cpp.

FilterLog * FilterLog::instance ( )
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.

void MailCommon::FilterLog::logEntryAdded ( const QString &  entry)
signal

This signal is emitted whenever a new entry has been added to the log.

void MailCommon::FilterLog::logShrinked ( )
signal

This signal is emitted whenever the log has shrinked.

void MailCommon::FilterLog::logStateChanged ( )
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.

QString FilterLog::recode ( const QString &  plain)
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 or false 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:
  • filterlog.h
  • filterlog.cpp
This file is part of the KDE documentation.
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.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal