Akonadi
partfetcher.cpp
23 PartFetcherPrivate(PartFetcher *partFetcher, const QModelIndex &index, const QByteArray &partName)
69 const auto loadedParts = m_persistentIndex.data(EntityTreeModel::LoadedPartsRole).value<QSet<QByteArray>>();
103 const auto loadedParts = index.data(EntityTreeModel::LoadedPartsRole).value<QSet<QByteArray>>();
111 const auto availableParts = index.data(EntityTreeModel::AvailablePartsRole).value<QSet<QByteArray>>();
114 setErrorText(i18n("Payload part '%1' is not available for this index", QString::fromLatin1(d->m_partName)));
119 auto session = qobject_cast<Akonadi::Session *>(qvariant_cast<QObject *>(index.data(EntityTreeModel::SessionRole)));
@ AvailablePartsRole
Parts available in the Akonadi server for the item.
Definition entitytreemodel.h:330
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition itemfetchscope.h:58
void fetchPayloadPart(const QByteArray &part, bool fetch=true)
Sets which payload parts shall be fetched.
Definition itemfetchscope.cpp:67
Convenience class for getting payload parts from an Akonadi Model.
Definition partfetcher.h:61
Item item() const
Returns the item that contains the fetched payload part.
Definition partfetcher.cpp:160
PartFetcher(const QModelIndex &index, const QByteArray &partName, QObject *parent=nullptr)
Creates a new part fetcher.
Definition partfetcher.cpp:89
QByteArray partName() const
Returns the name of the part that has been fetched.
Definition partfetcher.cpp:153
QModelIndex index() const
Returns the index of the item the part was fetched from.
Definition partfetcher.cpp:146
void setErrorText(const QString &errorText)
void emitResult()
int error() const
void result(KJob *job)
void setError(int errorCode)
QString i18n(const char *text, const TYPE &arg...)
Helper integration between Akonadi and Qt.
KIOCORE_EXPORT QStringList list(const QString &fileClass)
const_reference at(qsizetype i) const const
qsizetype size() const const
QVariant data(int role) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
T qobject_cast(QObject *object)
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
QString fromLatin1(QByteArrayView str)
QVariant fromValue(T &&value)
T value() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.