From e52a02bb77c5292a016d2c14e0730d44d25d4000 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 10 Mar 2017 21:50:08 +0100 Subject: Simple peoplemodel for addressbook Currently just queries for a flat list of contacts. Read-only. --- framework/domain/contactcontroller.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'framework/domain/contactcontroller.h') diff --git a/framework/domain/contactcontroller.h b/framework/domain/contactcontroller.h index d9bca563..d1973d9c 100644 --- a/framework/domain/contactcontroller.h +++ b/framework/domain/contactcontroller.h @@ -29,28 +29,24 @@ class ContactController : public Kube::Controller { Q_OBJECT - Q_PROPERTY(QStringList emails READ emails NOTIFY emailsChanged) + // Input properties + Q_PROPERTY(QVariant contact READ contact WRITE loadContact) //Interface properties KUBE_CONTROLLER_PROPERTY(QString, Name, name) + KUBE_CONTROLLER_PROPERTY(QStringList, Emails, emails) KUBE_CONTROLLER_ACTION(save) public: explicit ContactController(); - QStringList emails() const; - Q_INVOKABLE void loadContact(const QVariant &contact); Q_INVOKABLE void removeEmail(const QString &email); Q_INVOKABLE void addEmail(const QString &email); -signals: - void emailsChanged(); + QVariant contact() const; private slots: void updateSaveAction(); - -private: - QStringList m_emails; }; -- cgit v1.2.3