Akonadi
favoritecollectionsmodel.h
66 FavoriteCollectionsModel(QAbstractItemModel *model, const KConfigGroup &group, QObject *parent = nullptr);
109 [[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
110 [[nodiscard]] bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
111 [[nodiscard]] QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
112 [[nodiscard]] bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
AKONADICORE_DEPRECATED Collection::List collections() const
Returns the list of favorite collections.
Definition favoritecollectionsmodel.cpp:305
QString favoriteLabel(const Akonadi::Collection &col)
Return associate label for collection.
Definition favoritecollectionsmodel.cpp:365
void addCollection(const Akonadi::Collection &collection)
Adds a collection to the list of favorite collections.
Definition favoritecollectionsmodel.cpp:293
~FavoriteCollectionsModel() override
Destroys the favorite collections model.
FavoriteCollectionsModel(QAbstractItemModel *model, const KConfigGroup &group, QObject *parent=nullptr)
Creates a new favorite collections model.
Definition favoritecollectionsmodel.cpp:262
QList< Collection::Id > collectionIds() const
Returns the list of ids of favorite collections set on the FavoriteCollectionsModel.
Definition favoritecollectionsmodel.cpp:317
void setFavoriteLabel(const Akonadi::Collection &collection, const QString &label)
Sets a custom label that will be used when showing the favorite collection.
Definition favoritecollectionsmodel.cpp:322
void setCollections(const Akonadi::Collection::List &collections)
Sets the collections as favorite collections.
Definition favoritecollectionsmodel.cpp:287
void removeCollection(const Akonadi::Collection &collection)
Removes a collection from the list of favorite collections.
Definition favoritecollectionsmodel.cpp:299
KSelectionProxyModel()
void setSourceModel(QAbstractItemModel *sourceModel) override
Helper integration between Akonadi and Qt.
QAbstractItemModel(QObject *parent)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual QModelIndex parent(const QModelIndex &index) const const=0
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
DropAction
DisplayRole
typedef ItemFlags
Orientation
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:57 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:57 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.