The API changed for rotations, requiring another argument for positions.
[contacts_plasmoid.git] / contactsmodel.cpp
blob537ea5992b18c6ecf6b8ac02e7e28896c825936c
1 #include <qlistmodelinterface.h>
2 #include "contactsmodel.h"
4 ContactsModel::ContactsModel(QObject *parent )
5 :QtListModelInterface( parent )
7 names.append("teste foobar");
8 names.append("teste2 foobar");
9 names.append("teste3 foobar");
10 names.append("teste4 foobar");
11 names.append("teste5 foobar");
12 names.append("teste6 foobar");
13 names.append("teste7 foobar");
14 names.append("teste8 foobar");
15 names.append("teste9 foobar");
16 names.append("teste10 foobar");
17 names.append("teste11 foobar");
18 names.append("teste12 foobar");
19 names.append("teste13 foobar");
20 names.append("teste14 foobar");
21 names.append("teste15 foobar");
25 int ContactsModel::count() const
27 return names.count();
30 QHash<int,QVariant> ContactsModel::data(int index, const QList<int> &roles) const
32 QHash<int,QVariant> hash;
34 for( int i =0 ; i < roles.count(); i++) {
35 if( roles.at(i) == 1)
36 hash.insert(1, names.at(index));
38 return hash;