20#ifndef AKONADI_ITEMMODEL_H
21#define AKONADI_ITEMMODEL_H
23#include "akonadi_export.h"
24#include <akonadi/item.h>
25#include <akonadi/job.h>
27#include <QtCore/QAbstractTableModel>
56class AKONADI_DEPRECATED_EXPORT
ItemModel :
public QAbstractTableModel
92 virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const;
94 virtual QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
96 virtual int rowCount(
const QModelIndex &parent = QModelIndex())
const;
98 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
100 virtual Qt::ItemFlags flags(
const QModelIndex &index)
const;
102 virtual QMimeData *mimeData(
const QModelIndexList &indexes)
const;
104 virtual QStringList mimeTypes()
const;
106 virtual Qt::DropActions supportedDropActions()
const;
137 Item itemForIndex(
const QModelIndex &index)
const;
145 QModelIndex indexForItem(
const Akonadi::Item &item,
const int column)
const;
147 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent);
183 Q_PRIVATE_SLOT(d,
void listingDone(KJob *))
184 Q_PRIVATE_SLOT(d,
void collectionFetchResult(KJob *))
185 Q_PRIVATE_SLOT(d,
void itemChanged(
const Akonadi::Item &,
const QSet<QByteArray> &))
187 Q_PRIVATE_SLOT(d,
void itemAdded(
const Akonadi::Item &))
188 Q_PRIVATE_SLOT(d,
void itemsAdded(
const Akonadi::Item::List &))
189 Q_PRIVATE_SLOT(d,
void itemRemoved(
const Akonadi::Item &))
Represents a collection of PIM items.
Specifies which parts of an item should be fetched from the Akonadi storage.
Session * session() const
Returns the Session object used for all operations by this model.
Roles
Describes the roles of the model.
@ UserRole
Role for user extensions.
@ IdRole
The id of the item.
@ MimeTypeRole
The mime type of the item.
@ ItemRole
The item object.
ItemModel(QObject *parent=0)
Creates a new item model.
Collection collection() const
Returns the collection being displayed in the model.
void collectionChanged(const Akonadi::Collection &collection)
This signal is emitted whenever setCollection is called.
Column
Describes the types of the columns in the model.
@ RemoteId
The remote identifier.
@ MimeType
The item's mime type.
Base class for all actions in the Akonadi storage.
A communication session with the Akonadi storage.
FreeBusyManager::Singleton.
This file is part of the KDE documentation.
Documentation copyright © 1996-2026 The KDE developers.
Generated on
by
doxygen 1.15.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.