mailcommon
#include <mailkernel.h>
Signals | |
void | requestConfigSync () |
void | requestSystemTrayUpdate () |
Public Member Functions | |
virtual | ~Kernel () |
Akonadi::Collection | collectionFromId (const Akonadi::Collection::Id &id) const |
Akonadi::Collection | draftsCollectionFolder () |
void | emergencyExit (const QString &reason) |
IFilter * | filterIf () const |
bool | folderIsDraftOrOutbox (const Akonadi::Collection &collection) |
bool | folderIsDrafts (const Akonadi::Collection &) |
bool | folderIsSentMailFolder (const Akonadi::Collection &) |
bool | folderIsTemplates (const Akonadi::Collection &collection) |
bool | folderIsTrash (const Akonadi::Collection &collection) |
Akonadi::Collection | inboxCollectionFolder () |
void | initFolders () |
bool | isMainFolderCollection (const Akonadi::Collection &col) |
bool | isSystemFolderCollection (const Akonadi::Collection &col) |
IKernel * | kernelIf () const |
bool | kernelIsRegistered () const |
Akonadi::Collection | outboxCollectionFolder () |
void | registerFilterIf (IFilter *filterIf) |
void | registerKernelIf (IKernel *kernelIf) |
void | registerSettingsIf (ISettings *settingsIf) |
Akonadi::Collection | sentCollectionFolder () |
ISettings * | settingsIf () const |
Akonadi::Collection | templatesCollectionFolder () |
Akonadi::Collection | trashCollectionFolder () |
Akonadi::Collection | trashCollectionFromResource (const Akonadi::Collection &col) |
Static Public Member Functions | |
static bool | folderIsInbox (const Akonadi::Collection &, bool withoutPop3InboxSetting=false) |
static Kernel * | self () |
Detailed Description
Deals with common mail application related operations.
The required interfaces MUST be registered before using it! Be careful when using in multi-threaded applications, as Kernel is a QObject singleton, created in the main thread, thus event handling for Kernel::self() will happen in the main thread.
Definition at line 42 of file mailkernel.h.
Constructor & Destructor Documentation
|
virtual |
Definition at line 66 of file mailkernel.cpp.
Member Function Documentation
Akonadi::Collection MailCommon::Kernel::collectionFromId | ( | const Akonadi::Collection::Id & | id | ) | const |
Returns the collection associated with the given id
, or an invalid collection if not found.
The EntityTreeModel of the kernel is searched for the collection. Since the ETM is loaded async, this method will not find the collection right after startup, when the ETM is not yet fully loaded.
Definition at line 76 of file mailkernel.cpp.
Akonadi::Collection MailCommon::Kernel::draftsCollectionFolder | ( | ) |
Definition at line 113 of file mailkernel.cpp.
void MailCommon::Kernel::emergencyExit | ( | const QString & | reason | ) |
Definition at line 211 of file mailkernel.cpp.
|
inline |
Definition at line 98 of file mailkernel.h.
bool MailCommon::Kernel::folderIsDraftOrOutbox | ( | const Akonadi::Collection & | collection | ) |
Returns true if the folder is either the outbox or one of the drafts-folders.
Definition at line 234 of file mailkernel.cpp.
bool MailCommon::Kernel::folderIsDrafts | ( | const Akonadi::Collection & | col | ) |
Definition at line 243 of file mailkernel.cpp.
|
static |
Definition at line 335 of file mailkernel.cpp.
bool MailCommon::Kernel::folderIsSentMailFolder | ( | const Akonadi::Collection & | col | ) |
Returns true if the folder is one of the sent-mail folders.
Definition at line 313 of file mailkernel.cpp.
bool MailCommon::Kernel::folderIsTemplates | ( | const Akonadi::Collection & | collection | ) |
Definition at line 265 of file mailkernel.cpp.
bool MailCommon::Kernel::folderIsTrash | ( | const Akonadi::Collection & | collection | ) |
Returns true if the folder is a trash folder.
When calling this too early (before the SpecialMailCollectionsDiscoveryJob from initFolders finishes), it will say false erroneously. However you can connect to SpecialMailCollections::collectionsChanged to react on dynamic changes and call this again.
Definition at line 297 of file mailkernel.cpp.
Akonadi::Collection MailCommon::Kernel::inboxCollectionFolder | ( | ) |
Definition at line 92 of file mailkernel.cpp.
void MailCommon::Kernel::initFolders | ( | ) |
Definition at line 143 of file mailkernel.cpp.
bool MailCommon::Kernel::isMainFolderCollection | ( | const Akonadi::Collection & | col | ) |
Returns true if this folder is the inbox on the local disk.
Definition at line 137 of file mailkernel.cpp.
bool MailCommon::Kernel::isSystemFolderCollection | ( | const Akonadi::Collection & | col | ) |
Definition at line 127 of file mailkernel.cpp.
|
inline |
Definition at line 66 of file mailkernel.h.
|
inline |
Definition at line 61 of file mailkernel.h.
Akonadi::Collection MailCommon::Kernel::outboxCollectionFolder | ( | ) |
Definition at line 99 of file mailkernel.cpp.
|
inline |
Registers the interface dealing with mail settings.
This function MUST be called with a valid interface pointer, before any Kernel::self() method is used. The pointer ownership will not be transferred to Kernel.
Definition at line 93 of file mailkernel.h.
|
inline |
Registers the interface dealing with main mail functionality.
This function MUST be called with a valid interface pointer, before any Kernel::self() method is used. The pointer ownership will not be transferred to Kernel.
Definition at line 56 of file mailkernel.h.
|
inline |
Registers the interface dealing with mail settings.
This function MUST be called with a valid interface pointer, before any Kernel::self() method is used. The pointer ownership will not be transferred to Kernel.
Definition at line 77 of file mailkernel.h.
|
signal |
|
signal |
|
static |
Definition at line 71 of file mailkernel.cpp.
Akonadi::Collection MailCommon::Kernel::sentCollectionFolder | ( | ) |
Definition at line 106 of file mailkernel.cpp.
|
inline |
Definition at line 82 of file mailkernel.h.
Akonadi::Collection MailCommon::Kernel::templatesCollectionFolder | ( | ) |
Definition at line 120 of file mailkernel.cpp.
Akonadi::Collection MailCommon::Kernel::trashCollectionFolder | ( | ) |
Definition at line 85 of file mailkernel.cpp.
Akonadi::Collection MailCommon::Kernel::trashCollectionFromResource | ( | const Akonadi::Collection & | col | ) |
Returns the trash folder for the resource which col
belongs to.
When calling this too early (before the SpecialMailCollectionsDiscoveryJob from initFolders finishes), it will return an invalid collection erroneously. However you can connect to SpecialMailCollections::collectionsChanged to react on dynamic changes and call this again.
Definition at line 287 of file mailkernel.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.