akonadi
22 #ifndef AKONADI_CONTACT_IMMODEL_H
23 #define AKONADI_CONTACT_IMMODEL_H
25 #include <QtCore/QAbstractItemModel>
26 #include <QtCore/QVector>
31 typedef QVector<IMAddress> List;
34 IMAddress(
const QString &protocol,
const QString &name,
bool preferred );
36 void setProtocol(
const QString &protocol );
37 QString protocol()
const;
39 void setName(
const QString &name );
42 void setPreferred(
bool preferred );
43 bool preferred()
const;
51 class IMModel :
public QAbstractItemModel
56 ProtocolRole = Qt::UserRole,
60 IMModel( QObject *parent = 0 );
63 void setAddresses(
const IMAddress::List &addresses );
64 IMAddress::List addresses()
const;
66 virtual QModelIndex index(
int row,
int col,
const QModelIndex &parent = QModelIndex() )
const;
67 virtual QModelIndex parent(
const QModelIndex &child )
const;
68 virtual QVariant data(
const QModelIndex &index,
int role )
const;
69 virtual bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole );
70 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const;
71 virtual Qt::ItemFlags flags(
const QModelIndex &index )
const;
72 virtual int columnCount(
const QModelIndex &parent = QModelIndex() )
const;
73 virtual int rowCount(
const QModelIndex &parent = QModelIndex() )
const;
75 virtual bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() );
76 virtual bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() );
79 IMAddress::List mAddresses;
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue Dec 11 2012 12:14:32 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.