summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/contactcontroller.cpp
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2018-03-02 11:39:29 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2018-03-02 11:39:29 +0100
commitcbcb2e305fb02853234e5394c4202b1150026d81 (patch)
tree0cde498889b3221afefba6fb6fd9439722308d44 /framework/src/domain/contactcontroller.cpp
parent12c24448cd42f5ab4f64b75352058ce0dc5a3c49 (diff)
downloadkube-cbcb2e305fb02853234e5394c4202b1150026d81.tar.gz
kube-cbcb2e305fb02853234e5394c4202b1150026d81.zip
add listcontrollers for phoneNumbers and emails to the contact controller
Diffstat (limited to 'framework/src/domain/contactcontroller.cpp')
-rw-r--r--framework/src/domain/contactcontroller.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/framework/src/domain/contactcontroller.cpp b/framework/src/domain/contactcontroller.cpp
index bc536bf6..b9bb90c2 100644
--- a/framework/src/domain/contactcontroller.cpp
+++ b/framework/src/domain/contactcontroller.cpp
@@ -21,8 +21,32 @@
21#include <sink/applicationdomaintype.h> 21#include <sink/applicationdomaintype.h>
22#include <KContacts/VCardConverter> 22#include <KContacts/VCardConverter>
23 23
24class MailsController : public Kube::ListPropertyController
25{
26public:
27
28 MailsController()
29 : Kube::ListPropertyController{{"email"}}
30 {
31 }
32
33};
34
35class PhonesController : public Kube::ListPropertyController
36{
37public:
38
39 PhonesController()
40 : Kube::ListPropertyController{{"number"}}
41 {
42 }
43
44};
45
24ContactController::ContactController() 46ContactController::ContactController()
25 : Kube::Controller(), 47 : Kube::Controller(),
48 controller_mails{new MailsController},
49 controller_phones(new PhonesController),
26 action_save{new Kube::ControllerAction{this, &ContactController::save}} 50 action_save{new Kube::ControllerAction{this, &ContactController::save}}
27{ 51{
28 updateSaveAction(); 52 updateSaveAction();