1
#ifndef CONTACTLISTMODEL_H
2
#define CONTACTLISTMODEL_H
4
#include <QAbstractItemModel>
10
class ContactListModel : public QAbstractItemModel
16
ExpandedRole = Qt::UserRole + 0,
17
ContextMenuRole = Qt::UserRole + 1
25
ContactListModel(ContactList* contactList);
27
// Reimplemented from QAbstratItemModel
28
QVariant data(const QModelIndex &index, int role) const;
29
QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
30
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const;
31
virtual QModelIndex parent(const QModelIndex &index) const;
32
virtual int rowCount(const QModelIndex &parent) const;
33
virtual int columnCount(const QModelIndex &parent) const;
34
Qt::ItemFlags flags(const QModelIndex& index) const;
35
virtual bool setData(const QModelIndex&, const QVariant&, int role);
38
void contactList_changed();
41
ContactList* contactList_;