summaryrefslogtreecommitdiffstats
path: root/framework/domain/contactcontroller.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-10 21:50:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-10 21:50:48 +0100
commite52a02bb77c5292a016d2c14e0730d44d25d4000 (patch)
treebb67d615bd8d699ca0ff2c5996253acf46d5389a /framework/domain/contactcontroller.h
parentca120180460c7eeefaec9b1f31e5ad8aee32df2d (diff)
downloadkube-e52a02bb77c5292a016d2c14e0730d44d25d4000.tar.gz
kube-e52a02bb77c5292a016d2c14e0730d44d25d4000.zip
Simple peoplemodel for addressbook
Currently just queries for a flat list of contacts. Read-only.
Diffstat (limited to 'framework/domain/contactcontroller.h')
-rw-r--r--framework/domain/contactcontroller.h12
1 files changed, 4 insertions, 8 deletions
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
29{ 29{
30 Q_OBJECT 30 Q_OBJECT
31 31
32 Q_PROPERTY(QStringList emails READ emails NOTIFY emailsChanged) 32 // Input properties
33 Q_PROPERTY(QVariant contact READ contact WRITE loadContact)
33 34
34 //Interface properties 35 //Interface properties
35 KUBE_CONTROLLER_PROPERTY(QString, Name, name) 36 KUBE_CONTROLLER_PROPERTY(QString, Name, name)
37 KUBE_CONTROLLER_PROPERTY(QStringList, Emails, emails)
36 38
37 KUBE_CONTROLLER_ACTION(save) 39 KUBE_CONTROLLER_ACTION(save)
38 40
39public: 41public:
40 explicit ContactController(); 42 explicit ContactController();
41 43
42 QStringList emails() const;
43
44 Q_INVOKABLE void loadContact(const QVariant &contact); 44 Q_INVOKABLE void loadContact(const QVariant &contact);
45 Q_INVOKABLE void removeEmail(const QString &email); 45 Q_INVOKABLE void removeEmail(const QString &email);
46 Q_INVOKABLE void addEmail(const QString &email); 46 Q_INVOKABLE void addEmail(const QString &email);
47 47
48signals: 48 QVariant contact() const;
49 void emailsChanged();
50 49
51private slots: 50private slots:
52 void updateSaveAction(); 51 void updateSaveAction();
53
54private:
55 QStringList m_emails;
56}; 52};