| 1 |
#ifndef IDENTITY_H |
| 2 |
#define IDENTITY_H |
| 3 |
|
| 4 |
#include <QObject> |
| 5 |
#include <Helpers.h> |
| 6 |
#include <QVariantMap> |
| 7 |
#include <qmailaddress.h> |
| 8 |
|
| 9 |
class Identity : public QObject |
| 10 |
{ |
| 11 |
Q_OBJECT |
| 12 |
QML_WRITABLE_PROPERTY(quint64, accountId) |
| 13 |
QML_WRITABLE_PROPERTY(quint64, parentId) |
| 14 |
QML_WRITABLE_PROPERTY(bool, isDefault) |
| 15 |
QML_WRITABLE_PROPERTY(QString, name) |
| 16 |
QML_WRITABLE_PROPERTY(QString, email) |
| 17 |
QML_WRITABLE_PROPERTY(QString, replyTo) |
| 18 |
QML_WRITABLE_PROPERTY(QString, signature) |
| 19 |
Q_PROPERTY(QString initials READ initials NOTIFY nameChanged) |
| 20 |
Q_DISABLE_COPY(Identity) |
| 21 |
public: |
| 22 |
explicit Identity(QObject *parent = 0); |
| 23 |
|
| 24 |
static Identity *fromMap(QObject *p, const QVariantMap &map); |
| 25 |
|
| 26 |
QString initials(); |
| 27 |
QMailAddress fromAddress(); |
| 28 |
|
| 29 |
public slots: |
| 30 |
QVariantMap toMap(); |
| 31 |
}; |
| 32 |
|
| 33 |
#endif |