Changeset View
Changeset View
Standalone View
Standalone View
src/personsmodel.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 49 | public: | |||
---|---|---|---|---|---|
50 | enum Role { | 50 | enum Role { | ||
51 | FormattedNameRole = Qt::DisplayRole,//QString best name for this person | 51 | FormattedNameRole = Qt::DisplayRole,//QString best name for this person | ||
52 | PhotoRole = Qt::DecorationRole, //QPixmap best photo for this person | 52 | PhotoRole = Qt::DecorationRole, //QPixmap best photo for this person | ||
53 | PersonUriRole = Qt::UserRole, //QString ID of this person | 53 | PersonUriRole = Qt::UserRole, //QString ID of this person | ||
54 | PersonVCardRole, //AbstractContact::Ptr | 54 | PersonVCardRole, //AbstractContact::Ptr | ||
55 | ContactsVCardRole, //AbstractContact::List (FIXME or map?) | 55 | ContactsVCardRole, //AbstractContact::List (FIXME or map?) | ||
56 | 56 | | |||
57 | GroupsRole, ///groups QStringList | 57 | GroupsRole, ///groups QStringList | ||
58 | PhoneNumberRole, | ||||
58 | 59 | | |||
59 | UserRole = Qt::UserRole + 0x1000 ///< in case it's needed to extend, use this one to start from | 60 | UserRole = Qt::UserRole + 0x1000 ///< in case it's needed to extend, use this one to start from | ||
60 | }; | 61 | }; | ||
apol: Put it after GroupsRole | |||||
61 | Q_ENUM(Role) | 62 | Q_ENUM(Role) | ||
62 | 63 | | |||
63 | explicit PersonsModel(QObject *parent = nullptr); | 64 | explicit PersonsModel(QObject *parent = nullptr); | ||
64 | 65 | | |||
65 | ~PersonsModel() override; | 66 | ~PersonsModel() override; | ||
66 | 67 | | |||
67 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; | 68 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; | ||
68 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | 69 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
Show All 34 Lines |
Put it after GroupsRole