KPeople 5.109.0
|
This class creates a model of all known contacts from all sources Contacts are represented as a tree where the top level represents a "person" which is an amalgamation of all the sub-contacts. More...
#include <personsmodel.h>
Public Types | |
enum | Role { FormattedNameRole = Qt::DisplayRole , PhotoRole = Qt::DecorationRole , PersonUriRole = Qt::UserRole , PersonVCardRole , ContactsVCardRole , GroupsRole , PhoneNumberRole , PhotoImageProviderUri , UserRole = Qt::UserRole + 0x1000 } |
Properties | |
bool | isInitialized |
specifies whether the model has already been initialized | |
Signals | |
void | modelInitialized (bool success) |
Will emit when the model is finally initialized. | |
Public Member Functions | |
PersonsModel (QObject *parent=nullptr) | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | contactCustomProperty (const QModelIndex &index, const QString &key) const |
Makes it possible to access custom properties that are not available to the model. | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
QVariant | get (int row, int role) |
Helper class to ease model access through QML. | |
QModelIndex | index (int row, int column=0, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | indexForPersonUri (const QString &personUri) const |
bool | isInitialized () const |
Returns if all the backends have been initialized yet. | |
QModelIndex | parent (const QModelIndex &index) const override |
QHash< int, QByteArray > | roleNames () const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
This class creates a model of all known contacts from all sources Contacts are represented as a tree where the top level represents a "person" which is an amalgamation of all the sub-contacts.
|
read |
specifies whether the model has already been initialized
QVariant KPeople::PersonsModel::contactCustomProperty | ( | const QModelIndex & | index, |
const QString & | key | ||
) | const |
Makes it possible to access custom properties that are not available to the model.
index
defined by the key
QVariant KPeople::PersonsModel::get | ( | int | row, |
int | role | ||
) |
Helper class to ease model access through QML.
QModelIndex KPeople::PersonsModel::indexForPersonUri | ( | const QString & | personUri | ) | const |
personUri
bool KPeople::PersonsModel::isInitialized | ( | ) | const |
Returns if all the backends have been initialized yet.
|
signal |
Will emit when the model is finally initialized.
success
will specify if it succeeded