kmail
#include <kmkernel.h>
Public Slots | |
Q_SCRIPTABLE QStringList | accounts () |
Q_SCRIPTABLE bool | canQueryClose () |
Q_SCRIPTABLE void | checkAccount (const QString &account) |
Q_SCRIPTABLE void | checkMail () |
void | dumpDeadLetters () |
Q_SCRIPTABLE bool | handleCommandLine (bool noArgsOpensReader) |
Q_SCRIPTABLE void | makeResourceOnline (MessageViewer::Viewer::ResourceOnlineMode mode) |
Q_SCRIPTABLE QDBusObjectPath | newMessage (const QString &to, const QString &cc, const QString &bcc, bool hidden, bool useFolderId, const QString &messageFile, const QString &attachURL) |
Q_SCRIPTABLE int | openComposer (const QString &to, const QString &cc, const QString &bcc, const QString &subject, const QString &body, bool hidden, const QString &messageFile, const QStringList &attachmentPaths, const QStringList &customHeaders, const QString &replyTo=QString(), const QString &inReplyTo=QString()) |
Q_SCRIPTABLE int | openComposer (const QString &to, const QString &cc, const QString &bcc, const QString &subject, const QString &body, bool hidden, const QString &attachName, const QByteArray &attachCte, const QByteArray &attachData, const QByteArray &attachType, const QByteArray &attachSubType, const QByteArray &attachParamAttr, const QString &attachParamValue, const QByteArray &attachContDisp, const QByteArray &attachCharset, unsigned int identity) |
Q_SCRIPTABLE QDBusObjectPath | openComposer (const QString &to, const QString &cc, const QString &bcc, const QString &subject, const QString &body, bool hidden) |
Q_SCRIPTABLE void | openReader () |
Q_SCRIPTABLE void | pauseBackgroundJobs () |
Q_SCRIPTABLE void | reloadFolderArchiveConfig () |
Q_SCRIPTABLE void | resumeBackgroundJobs () |
Q_SCRIPTABLE void | resumeNetworkJobs () |
Q_SCRIPTABLE bool | selectFolder (const QString &folder) |
Q_SCRIPTABLE void | setSystrayIconNotificationsEnabled (bool enabled) |
Q_SCRIPTABLE void | showFolder (const QString &collectionId) |
Q_SCRIPTABLE bool | showMail (qint64 serialNumber) |
void | slotConfigChanged () |
void | slotRequestConfigSync () |
void | slotRunBackgroundTasks () |
void | slotShowConfigurationDialog () |
void | slotSyncConfig () |
Q_SCRIPTABLE void | stopNetworkJobs () |
Q_SCRIPTABLE void | updateConfig () |
void | updatedTemplates () |
void | updateSystemTray () |
Q_SCRIPTABLE int | viewMessage (const QString &messageFile) |
Signals | |
void | configChanged () |
void | customTemplatesChanged () |
void | endCheckMail () |
void | onlineStatusChanged (GlobalSettings::EnumNetworkState::type) |
void | startCheckMail () |
Public Member Functions | |
KMKernel (QObject *parent=0) | |
~KMKernel () | |
void | action (bool mailto, bool check, const QString &to, const QString &cc, const QString &bcc, const QString &subj, const QString &body, const KUrl &messageFile, const KUrl::List &attach, const QStringList &customHeaders, const QString &replyTo, const QString &inReplyTo) |
Akonadi::Collection::List | allFolders () const |
bool | allowToDebugBalooSupport () const |
void | checkFolderFromResources (const Akonadi::Collection::List &collectionList) |
void | checkMailOnStartup () |
void | cleanup (void) |
void | closeAllKMailWindows () |
qreal | closeToQuotaThreshold () |
Akonadi::EntityMimeTypeFilterModel * | collectionModel () const |
PimCommon::AutoCorrection * | composerAutoCorrection () |
KSharedConfig::Ptr | config () |
void | createFilter (const QByteArray &field, const QString &value) |
QStringList | customTemplates () |
bool | doSessionManagement () |
Akonadi::EntityTreeModel * | entityTreeModel () const |
bool | excludeImportantMailFromExpiry () |
void | expireAllFoldersNow () |
bool | firstInstance () const |
bool | firstStart () const |
FolderArchiveManager * | folderArchiveManager () const |
Akonadi::ChangeRecorder * | folderCollectionMonitor () const |
KMMainWidget * | getKMMainWidget () |
bool | haveSystemTrayApplet () const |
KPIMIdentities::IdentityManager * | identityManager () |
void | init () |
bool | isImapFolder (const Akonadi::Collection &, bool &isOnline) const |
MailCommon::JobScheduler * | jobScheduler () const |
Akonadi::Collection::Id | lastSelectedFolder () |
KMainWindow * | mainWin () |
MessageComposer::MessageSender * | msgSender () |
QTextCodec * | networkCodec () const |
void | openFilterDialog (bool createDummyFilter=true) |
QString | previousVersion () const |
void | quit () |
void | raise () |
void | recoverDeadLetters () |
void | savePaneSelection () |
void | selectCollectionFromId (const Akonadi::Collection::Id id) |
void | setAccountStatus (bool) |
void | setFirstInstance (bool value) |
void | setLastSelectedFolder (const Akonadi::Collection::Id &col) |
void | setShuttingDown (bool flag) |
void | setupDBus () |
void | setXmlGuiInstance (const KComponentData &instance) |
bool | showPopupAfterDnD () |
bool | shuttingDown () const |
void | stopAgentInstance () |
PimCommon::StorageServiceManager * | storageServiceManager () const |
void | syncConfig () |
void | toggleSystemTray () |
const QAbstractItemModel * | treeviewModelSelection () |
UndoStack * | undoStack () const |
void | updatePaneTagComboBox () |
const KComponentData & | xmlGuiInstance () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static bool | askToGoOnline () |
static bool | isOffline () |
static QString | localDataPath () |
static KMKernel * | self () |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
void | agentInstanceBroken (const Akonadi::AgentInstance &instance) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
Central point of coordination in KMail.
The KMKernel class represents the core of KMail, where the different parts come together and are coordinated. It is currently also the class which exports KMail's main D-BUS interfaces.
The kernel is responsible for creating various (singleton) objects such as the identity manager and the message sender.
The kernel also creates an Akonadi Session, Monitor and EntityTreeModel. These are shared so that other objects in KMail have access to it. Having only one EntityTreeModel instead of many reduces the overall communication with the Akonadi server.
The kernel also manages some stuff that should be factored out:
- default collection handling, like inboxCollectionFolder()
- job handling, like jobScheduler()
- handling of some config settings, like wrapCol()
- various other stuff
Definition at line 105 of file kmkernel.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 129 of file kmkernel.cpp.
KMKernel::~KMKernel | ( | ) |
Definition at line 250 of file kmkernel.cpp.
Member Function Documentation
|
slot |
Definition at line 486 of file kmkernel.cpp.
void KMKernel::action | ( | bool | mailto, |
bool | check, | ||
const QString & | to, | ||
const QString & | cc, | ||
const QString & | bcc, | ||
const QString & | subj, | ||
const QString & | body, | ||
const KUrl & | messageFile, | ||
const KUrl::List & | attach, | ||
const QStringList & | customHeaders, | ||
const QString & | replyTo, | ||
const QString & | inReplyTo | ||
) |
Definition at line 1336 of file kmkernel.cpp.
|
protected |
Definition at line 1758 of file kmkernel.cpp.
Akonadi::Collection::List KMKernel::allFolders | ( | ) | const |
Returns a list of all currently loaded folders.
Since folders are loaded async, this is empty at startup.
Definition at line 1584 of file kmkernel.cpp.
bool KMKernel::allowToDebugBalooSupport | ( | ) | const |
Definition at line 2085 of file kmkernel.cpp.
|
static |
A static helper function that asks the user if they want to go online.
- Returns
- true if the user wants to go online
- false if the user wants to stay offline
Definition at line 1023 of file kmkernel.cpp.
|
slot |
Definition at line 1594 of file kmkernel.cpp.
|
slot |
Checks the account with the specified name for new mail.
If the account name is empty, all accounts not excluded from manual mail check will be checked.
Definition at line 499 of file kmkernel.cpp.
void KMKernel::checkFolderFromResources | ( | const Akonadi::Collection::List & | collectionList | ) |
Definition at line 1884 of file kmkernel.cpp.
|
slot |
Start of D-Bus callable stuff.
The D-Bus methods need to be public slots, otherwise they can't be accessed.
Definition at line 452 of file kmkernel.cpp.
void KMKernel::checkMailOnStartup | ( | ) |
End of D-Bus callable stuff.
Definition at line 1010 of file kmkernel.cpp.
void KMKernel::cleanup | ( | void | ) |
Definition at line 1270 of file kmkernel.cpp.
void KMKernel::closeAllKMailWindows | ( | ) |
Definition at line 1238 of file kmkernel.cpp.
qreal KMKernel::closeToQuotaThreshold | ( | ) |
Definition at line 1846 of file kmkernel.cpp.
Akonadi::EntityMimeTypeFilterModel * KMKernel::collectionModel | ( | ) | const |
Returns a model of all folders in KMail.
This is basically the same as entityTreeModel(), but with items filtered out, the model contains only collections.
Definition at line 275 of file kmkernel.cpp.
PimCommon::AutoCorrection * KMKernel::composerAutoCorrection | ( | ) |
Definition at line 2026 of file kmkernel.cpp.
KSharedConfig::Ptr KMKernel::config | ( | ) |
Definition at line 1476 of file kmkernel.cpp.
|
signal |
void KMKernel::createFilter | ( | const QByteArray & | field, |
const QString & | value | ||
) |
Definition at line 1877 of file kmkernel.cpp.
QStringList KMKernel::customTemplates | ( | ) |
Definition at line 1861 of file kmkernel.cpp.
|
signal |
bool KMKernel::doSessionManagement | ( | ) |
Definition at line 1221 of file kmkernel.cpp.
|
slot |
Save contents of all open composer widnows to ~/dead.letter.
Definition at line 1316 of file kmkernel.cpp.
|
signal |
Akonadi::EntityTreeModel * KMKernel::entityTreeModel | ( | ) | const |
Returns the main model, which contains all folders and the items of recently opened folders.
Definition at line 270 of file kmkernel.cpp.
bool KMKernel::excludeImportantMailFromExpiry | ( | ) |
Definition at line 1841 of file kmkernel.cpp.
void KMKernel::expireAllFoldersNow | ( | ) |
Expire all folders, used for the gui action.
Definition at line 1589 of file kmkernel.cpp.
|
inline |
Definition at line 338 of file kmkernel.h.
|
inline |
Definition at line 367 of file kmkernel.h.
FolderArchiveManager * KMKernel::folderArchiveManager | ( | ) | const |
Definition at line 2075 of file kmkernel.cpp.
Akonadi::ChangeRecorder * KMKernel::folderCollectionMonitor | ( | ) | const |
Definition at line 265 of file kmkernel.cpp.
KMMainWidget * KMKernel::getKMMainWidget | ( | ) |
Get first mainwidget.
Definition at line 1537 of file kmkernel.cpp.
|
slot |
Definition at line 299 of file kmkernel.cpp.
bool KMKernel::haveSystemTrayApplet | ( | ) | const |
Returns true if we have a system tray applet.
This is needed in order to know whether the application should be allowed to exit in case the last visible composer or separate message window is closed.
Definition at line 1426 of file kmkernel.cpp.
KPIMIdentities::IdentityManager * KMKernel::identityManager | ( | ) |
return the pointer to the identity manager
Definition at line 1438 of file kmkernel.cpp.
void KMKernel::init | ( | ) |
Definition at line 1187 of file kmkernel.cpp.
bool KMKernel::isImapFolder | ( | const Akonadi::Collection & | col, |
bool & | isOnline | ||
) | const |
Definition at line 1797 of file kmkernel.cpp.
|
static |
Checks if the current network state is online or offline.
- Returns
- true if the network state is offline
- false if the network state is online
Definition at line 969 of file kmkernel.cpp.
|
inline |
Definition at line 362 of file kmkernel.h.
Akonadi::Entity::Id KMKernel::lastSelectedFolder | ( | ) |
Definition at line 1851 of file kmkernel.cpp.
|
static |
Returns the full path of the user's local data directory for KMail.
The path ends with '/'.
Definition at line 1419 of file kmkernel.cpp.
KMainWindow * KMKernel::mainWin | ( | ) |
returns a reference to the first Mainwin or a temporary Mainwin
Definition at line 1446 of file kmkernel.cpp.
|
slot |
Definition at line 2014 of file kmkernel.cpp.
MessageComposer::MessageSender * KMKernel::msgSender | ( | ) |
Definition at line 1625 of file kmkernel.cpp.
|
inline |
Definition at line 383 of file kmkernel.h.
|
slot |
Opens a composer window and prefills it with different message parts.
- Returns
- The DBus object path for the composer.
- Parameters
-
to A comma separated list of To addresses. cc A comma separated list of CC addresses. bcc A comma separated list of BCC addresses. subject The message subject. body The message body. hidden Whether the composer window shall initially be hidden. useFolderId The id of the folder whose associated identity will be used. messageFile A message file that will be used as message body. attachURL The URL to the file that will be attached to the message.
Definition at line 804 of file kmkernel.cpp.
|
signal |
|
slot |
Opens a composer window and prefills it with different message parts.
- Returns
- The id of composer if more are opened.
- Parameters
-
to A comma separated list of To addresses. cc A comma separated list of CC addresses. bcc A comma separated list of BCC addresses. subject The message subject. body The message body. hidden Whether the composer window shall initially be hidden. messageFile A message file that will be used as message body. attachmentPaths A list of files that will be attached to the message. customHeaders A list of custom headers.
Definition at line 550 of file kmkernel.cpp.
|
slot |
Opens a composer window and prefills it with different message parts.
- Returns
- The id of composer if more are opened.
- Parameters
-
to A comma separated list of To addresses. cc A comma separated list of CC addresses. bcc A comma separated list of BCC addresses. subject The message subject. body The message body. hidden Whether the composer window shall initially be hidden. attachName The name of the attachment. attachCte The content transfer encoding of the attachment. attachData The raw data of the attachment. attachType The mime type of the attachment. attachSubType The sub mime type of the attachment. attachParamAttr The parameter attribute of the attachment. attachParamValue The parameter value of the attachment. attachContDisp The content display type of the attachment. attachCharset The charset of the attachment. identity The identity identifier which will be used as sender identity.
Definition at line 649 of file kmkernel.cpp.
|
slot |
Opens a composer window and prefills it with different message parts.
- Returns
- The DBus object path for the composer.
- Parameters
-
to A comma separated list of To addresses. cc A comma separated list of CC addresses. bcc A comma separated list of BCC addresses. subject The message subject. body The message body. hidden Whether the composer window shall initially be hidden.
Definition at line 763 of file kmkernel.cpp.
void KMKernel::openFilterDialog | ( | bool | createDummyFilter = true | ) |
Definition at line 1866 of file kmkernel.cpp.
|
inlineslot |
Definition at line 121 of file kmkernel.h.
|
slot |
Pauses all background jobs and does not allow new background jobs to be started.
Definition at line 903 of file kmkernel.cpp.
|
inline |
Definition at line 368 of file kmkernel.h.
void KMKernel::quit | ( | ) |
Definition at line 1075 of file kmkernel.cpp.
void KMKernel::raise | ( | ) |
Definition at line 858 of file kmkernel.cpp.
void KMKernel::recoverDeadLetters | ( | ) |
Definition at line 1129 of file kmkernel.cpp.
|
slot |
Definition at line 2061 of file kmkernel.cpp.
|
slot |
Resumes all background jobs and allows new jobs to be started.
Definition at line 909 of file kmkernel.cpp.
|
slot |
Resumes all network related jobs and enter online mode New network jobs can be started.
Definition at line 948 of file kmkernel.cpp.
void KMKernel::savePaneSelection | ( | ) |
Definition at line 1985 of file kmkernel.cpp.
void KMKernel::selectCollectionFromId | ( | const Akonadi::Collection::Id | id | ) |
Definition at line 1508 of file kmkernel.cpp.
|
slot |
Definition at line 1521 of file kmkernel.cpp.
|
static |
normal control stuff
Definition at line 1471 of file kmkernel.cpp.
void KMKernel::setAccountStatus | ( | bool | goOnline | ) |
Definition at line 928 of file kmkernel.cpp.
|
inline |
Definition at line 339 of file kmkernel.h.
void KMKernel::setLastSelectedFolder | ( | const Akonadi::Collection::Id & | col | ) |
Definition at line 1856 of file kmkernel.cpp.
|
inline |
Definition at line 370 of file kmkernel.h.
|
slot |
Enables/disables systray icon changing when mail arrives.
With this disabled the systray icon will always be the same.
Definition at line 479 of file kmkernel.cpp.
void KMKernel::setupDBus | ( | ) |
Definition at line 280 of file kmkernel.cpp.
|
inline |
Definition at line 351 of file kmkernel.h.
|
slot |
Definition at line 2053 of file kmkernel.cpp.
|
slot |
Definition at line 873 of file kmkernel.cpp.
bool KMKernel::showPopupAfterDnD | ( | ) |
Definition at line 1836 of file kmkernel.cpp.
|
inline |
Definition at line 369 of file kmkernel.h.
|
slot |
Definition at line 1411 of file kmkernel.cpp.
|
slot |
Call this slot instead of directly KConfig::sync() to minimize the overall config writes.
Calling this slot will schedule a sync of the application config file using a timer, so that many consecutive calls can be condensed into a single sync, which is more efficient.
Definition at line 1358 of file kmkernel.cpp.
|
slot |
Definition at line 1551 of file kmkernel.cpp.
|
slot |
Definition at line 1382 of file kmkernel.cpp.
|
slot |
Sync the config immediatley.
Definition at line 1364 of file kmkernel.cpp.
|
signal |
void KMKernel::stopAgentInstance | ( | ) |
Definition at line 1806 of file kmkernel.cpp.
|
slot |
Stops all network related jobs and enter offline mode New network jobs cannot be started.
Definition at line 915 of file kmkernel.cpp.
PimCommon::StorageServiceManager * KMKernel::storageServiceManager | ( | ) | const |
Definition at line 2080 of file kmkernel.cpp.
void KMKernel::syncConfig | ( | ) |
Definition at line 1502 of file kmkernel.cpp.
void KMKernel::toggleSystemTray | ( | ) |
Definition at line 2031 of file kmkernel.cpp.
const QAbstractItemModel * KMKernel::treeviewModelSelection | ( | ) |
Definition at line 1923 of file kmkernel.cpp.
|
inline |
Definition at line 353 of file kmkernel.h.
|
slot |
Definition at line 1377 of file kmkernel.cpp.
|
slot |
Custom templates have changed, so all windows using them need to regenerate their menus.
Definition at line 1791 of file kmkernel.cpp.
void KMKernel::updatePaneTagComboBox | ( | ) |
Definition at line 1993 of file kmkernel.cpp.
|
slot |
Definition at line 1431 of file kmkernel.cpp.
|
slot |
Definition at line 850 of file kmkernel.cpp.
|
inline |
Definition at line 350 of file kmkernel.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.