mailcommon
mailutil.cpp
Go to the documentation of this file.
94 QLatin1String("org.freedesktop.Akonadi.Resource.") + ident, QLatin1String("/Settings"), QDBusConnection::sessionBus() );
150 foreach ( const Akonadi::AgentInstance &instance, Akonadi::AgentManager::self()->instances() ) {
179 QDBusInterface *interface = new QDBusInterface( QLatin1String("org.kde.korganizer"), QLatin1String("/MainApplication") );
397 void MailCommon::Util::expireOldMessages( const Akonadi::Collection &collection, bool immediate )
405 const QModelIndex idx = Akonadi::EntityTreeModel::modelIndexForCollection( KernelIf->collectionModel(), col );
406 const Akonadi::Collection collection = idx.data( Akonadi::EntityTreeModel::CollectionRole ).value<Akonadi::Collection>();
410 Akonadi::Collection::Id MailCommon::Util::convertFolderPathToCollectionId( const QString& folder)
414 Akonadi::Collection::List lst = FilterActionMissingCollectionDialog::potentialCorrectFolders( folder, exactPath );
418 QPointer<FilterActionMissingCollectionDialog> dlg = new FilterActionMissingCollectionDialog( lst, QString(), folder );
458 MailCommon::ExpireCollectionAttribute *MailCommon::Util::expirationCollectionAttribute(const Akonadi::Collection &collection, bool &mustDeleteExpirationAttribute )
472 attr->setReadExpireUnits((MailCommon::ExpireCollectionAttribute::ExpireUnits)configGroup.readEntry( "ReadExpireUnits", (int)MailCommon::ExpireCollectionAttribute::ExpireMonths ));
474 attr->setUnreadExpireUnits((MailCommon::ExpireCollectionAttribute::ExpireUnits)configGroup.readEntry( "UnreadExpireUnits", (int)MailCommon::ExpireCollectionAttribute::ExpireNever ));
475 attr->setExpireAction(configGroup.readEntry( "ExpireAction", "Delete" ) == QLatin1String( "Move" ) ?
MAILCOMMON_EXPORT bool ignoreNewMailInFolder(const Akonadi::Collection &collection)
Definition: mailutil.cpp:365
MAILCOMMON_EXPORT QColor defaultQuotaColor()
Definition: mailutil.cpp:391
MAILCOMMON_EXPORT Akonadi::AgentInstance::List agentInstances(bool excludeMailTransport=true)
Definition: mailutil.cpp:147
virtual int rowCount(const QModelIndex &parent) const =0
bool isValid() const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
void setUnreadExpireUnits(ExpireUnits units)
Sets the units to use for expiry of unread messages.
Definition: expirecollectionattribute.cpp:79
static QModelIndex indexAbove(QAbstractItemModel *model, const QModelIndex ¤t)
Definition: mailutil.cpp:310
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
void setReadExpireUnits(ExpireUnits units)
Sets the units to use for expiry of read messages.
Definition: expirecollectionattribute.cpp:98
MAILCOMMON_EXPORT bool isLocalCollection(const QString &resource)
Definition: mailutil.cpp:107
MAILCOMMON_EXPORT MailCommon::ExpireCollectionAttribute * expirationCollectionAttribute(const Akonadi::Collection &collection, bool &mustDeleteExpirationAttribute)
Definition: mailutil.cpp:458
QString message() const
T value() const
bool isValid() const
QDBusConnection sessionBus()
MAILCOMMON_EXPORT bool isVirtualCollection(const Akonadi::Collection &col)
Definition: mailutil.cpp:97
QString & remove(int position, int n)
QDBusMessage call(const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
void setAutoExpire(bool enabled)
Sets whether this folder automatically expires messages.
Definition: expirecollectionattribute.cpp:57
A scheduled "expire mails in this folder" task.
Definition: expirejob.h:70
bool isValid() const
SearchDirection
Describes the direction for searching next unread collection.
Definition: mailutil.h:88
QString number(int n, int base)
bool exists() const
int exec(QFlags< QEventLoop::ProcessEventsFlag > flags)
Type value() const
bool isEmpty() const
int row() const
Definition: mailutil.h:89
MAILCOMMON_EXPORT Akonadi::Collection updatedCollection(const Akonadi::Collection &col)
Definition: mailutil.cpp:403
QModelIndex parent() const
MAILCOMMON_EXPORT Akonadi::Collection parentCollectionFromItem(const Akonadi::Item &item)
Definition: mailutil.cpp:375
MAILCOMMON_EXPORT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &folder)
Definition: mailutil.cpp:410
static QModelIndex indexBelow(QAbstractItemModel *model, const QModelIndex ¤t)
Definition: mailutil.cpp:256
virtual QModelIndex parent(const QModelIndex &index) const =0
bool contains(QChar ch, Qt::CaseSensitivity cs) const
Definition: mailutil.h:90
static QModelIndex lastChildOfModel(QAbstractItemModel *model, const QModelIndex ¤t)
Definition: mailutil.cpp:301
static QString configGroupName(const Akonadi::Collection &col)
Definition: foldercollection.cpp:174
QString & replace(int position, int n, QChar after)
MAILCOMMON_EXPORT uint folderIdentity(const Akonadi::Item &item)
Returns the identity of the folder that contains the given Akonadi::Item.
Definition: mailutil.cpp:240
MAILCOMMON_EXPORT bool showJobErrorMessage(KJob *job)
Definition: mailutil.cpp:134
ExpireUnits
Definition: expirecollectionattribute.h:39
QVariant data(int role) const
MAILCOMMON_EXPORT QString fullCollectionPath(const Akonadi::Collection &collection)
Definition: mailutil.cpp:115
QModelIndex sibling(int row, int column) const
const QChar at(int position) const
MAILCOMMON_EXPORT QString convertFolderPathToCollectionStr(const QString &folder)
Definition: mailutil.cpp:427
void setReadExpireAge(int age)
Sets the maximum age for read messages in this folder.
Definition: expirecollectionattribute.cpp:86
void setExpireToFolderId(Akonadi::Collection::Id id)
Definition: expirecollectionattribute.cpp:115
MAILCOMMON_EXPORT QModelIndex nextUnreadCollection(QAbstractItemModel *model, const QModelIndex ¤t, SearchDirection direction, bool(*ignoreCollectionCallback)(const Akonadi::Collection &collection)=0)
Returns the index of the next unread collection following a given index.
Definition: mailutil.cpp:327
bool ignoreNewMail() const
Definition: newmailnotifierattribute.cpp:74
void setExpireAction(ExpireAction a)
Definition: expirecollectionattribute.cpp:105
MAILCOMMON_EXPORT void expireOldMessages(const Akonadi::Collection &collection, bool immediate)
Definition: mailutil.cpp:397
QDBusError lastError() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
MAILCOMMON_EXPORT QString realFolderPath(const QString &path)
Definition: mailutil.cpp:380
QString toString() const
void setUnreadExpireAge(int age)
Sets the maximum age for unread messages in this folder.
Definition: expirecollectionattribute.cpp:67
MAILCOMMON_EXPORT bool ensureKorganizerRunning(bool switchTo)
Definition: mailutil.cpp:168
static Akonadi::Collection::List potentialCorrectFolders(const QString &path, bool &exactPath)
Definition: filteractionmissingargumentdialog.cpp:166
MAILCOMMON_EXPORT OrgKdeAkonadiPOP3SettingsInterface * createPop3SettingsInterface(const QString &ident)
Definition: mailutil.cpp:89
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.