~ubuntu-branches/ubuntu/utopic/psi/utopic

« back to all changes in this revision

Viewing changes to src/tools/contactlist/contactlistmodel.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2010-02-19 09:37:12 UTC
  • mfrom: (6.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100219093712-e225xvm1wjcf1cgi
Tags: 0.14-2
* comment out only function which uses va_list to work around build
  problems on armel
* Set Standards-Version to 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef CONTACTLISTMODEL_H
2
 
#define CONTACTLISTMODEL_H
3
 
 
4
 
#include <QAbstractItemModel>
5
 
#include <QModelIndex>
6
 
#include <QVariant>
7
 
 
8
 
class ContactList;
9
 
 
10
 
class ContactListModel : public QAbstractItemModel
11
 
{
12
 
        Q_OBJECT
13
 
 
14
 
public:
15
 
        enum {
16
 
                ExpandedRole = Qt::UserRole + 0,
17
 
                ContextMenuRole = Qt::UserRole + 1
18
 
        };
19
 
        enum {
20
 
                StatusIconColumn = 0,
21
 
                NameColumn = 1,
22
 
                PictureColumn = 2
23
 
        };
24
 
 
25
 
        ContactListModel(ContactList* contactList);
26
 
 
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);
36
 
 
37
 
protected slots:
38
 
        void contactList_changed();
39
 
 
40
 
private:
41
 
        ContactList* contactList_;
42
 
        bool showStatus_;
43
 
};
44
 
 
45
 
#endif