Changeset View
Changeset View
Standalone View
Standalone View
src/persondata.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | */ | 45 | */ | ||
46 | class KPEOPLE_EXPORT PersonData : public QObject | 46 | class KPEOPLE_EXPORT PersonData : public QObject | ||
47 | { | 47 | { | ||
48 | Q_OBJECT | 48 | Q_OBJECT | ||
49 | Q_PROPERTY(QString name READ name NOTIFY dataChanged) | 49 | Q_PROPERTY(QString name READ name NOTIFY dataChanged) | ||
50 | Q_PROPERTY(QPixmap photo READ photo NOTIFY dataChanged) | 50 | Q_PROPERTY(QPixmap photo READ photo NOTIFY dataChanged) | ||
51 | Q_PROPERTY(QString presenceIconName READ presenceIconName NOTIFY dataChanged) | 51 | Q_PROPERTY(QString presenceIconName READ presenceIconName NOTIFY dataChanged) | ||
52 | 52 | | |||
53 | /** | ||||
54 | * @returns whether setContactCustomProperty can be called on this contact | ||||
55 | * | ||||
56 | * @since 5.62 | ||||
57 | */ | ||||
58 | Q_PROPERTY(bool isEditable READ isEditable CONSTANT) | ||||
59 | | ||||
53 | public: | 60 | public: | ||
54 | /** Creates a Person object from a given ID. | 61 | /** Creates a Person object from a given ID. | ||
55 | * The ID can be either a local application specific ID (such as akonadi://?item=15) | 62 | * The ID can be either a local application specific ID (such as akonadi://?item=15) | ||
56 | * or a kpeople ID in the form kpeople://15 | 63 | * or a kpeople ID in the form kpeople://15 | ||
57 | */ | 64 | */ | ||
58 | PersonData(const QString &id, QObject *parent = nullptr); | 65 | PersonData(const QString &id, QObject *parent = nullptr); | ||
59 | 66 | | |||
60 | virtual ~PersonData(); | 67 | virtual ~PersonData(); | ||
Show All 27 Lines | |||||
88 | */ | 95 | */ | ||
89 | QPixmap photo() const; | 96 | QPixmap photo() const; | ||
90 | 97 | | |||
91 | /** | 98 | /** | ||
92 | * @returns the property for a said @p key. | 99 | * @returns the property for a said @p key. | ||
93 | */ | 100 | */ | ||
94 | Q_SCRIPTABLE QVariant contactCustomProperty(const QString &key) const; | 101 | Q_SCRIPTABLE QVariant contactCustomProperty(const QString &key) const; | ||
95 | 102 | | |||
103 | Q_SCRIPTABLE bool setContactCustomProperty(const QString &key, const QVariant &value); | ||||
bshah: Missing API docs | |||||
104 | | ||||
96 | /** | 105 | /** | ||
97 | * Returns the contact's online presence. | 106 | * Returns the contact's online presence. | ||
98 | */ | 107 | */ | ||
99 | QString presence() const; | 108 | QString presence() const; | ||
100 | 109 | | |||
101 | /** | 110 | /** | ||
102 | * Returns the contact's preferred email address. | 111 | * Returns the contact's preferred email address. | ||
103 | */ | 112 | */ | ||
104 | QString email() const; | 113 | QString email() const; | ||
105 | 114 | | |||
106 | /** | 115 | /** | ||
107 | * Returns a the url of the picture that represents the contact. | 116 | * Returns a the url of the picture that represents the contact. | ||
108 | */ | 117 | */ | ||
109 | QUrl pictureUrl() const; | 118 | QUrl pictureUrl() const; | ||
110 | 119 | | |||
111 | /** Returns all groups the person is in. */ | 120 | /** Returns all groups the person is in. */ | ||
112 | QStringList groups() const; | 121 | QStringList groups() const; | ||
113 | 122 | | |||
114 | /** Returns all e-mail addresses from the person. */ | 123 | /** Returns all e-mail addresses from the person. */ | ||
115 | QStringList allEmails() const; | 124 | QStringList allEmails() const; | ||
116 | 125 | | |||
126 | bool isEditable() const; | ||||
bshah: Missing API doc | |||||
127 | | ||||
117 | // struct PhoneNumber { | 128 | // struct PhoneNumber { | ||
118 | // QString name; | 129 | // QString name; | ||
119 | // QString number; | 130 | // QString number; | ||
120 | // }; | 131 | // }; | ||
121 | // QVector<PhoneNumber> phoneNumbers() const { createPhoneNumbers(customProperty("phoneNumbers")); }; | 132 | // QVector<PhoneNumber> phoneNumbers() const { createPhoneNumbers(customProperty("phoneNumbers")); }; | ||
122 | 133 | | |||
123 | Q_SIGNALS: | 134 | Q_SIGNALS: | ||
124 | /** | 135 | /** | ||
Show All 15 Lines |
Missing API docs