diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2018-03-02 11:39:29 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2018-03-02 11:39:29 +0100 |
commit | cbcb2e305fb02853234e5394c4202b1150026d81 (patch) | |
tree | 0cde498889b3221afefba6fb6fd9439722308d44 /framework/src/domain/contactcontroller.cpp | |
parent | 12c24448cd42f5ab4f64b75352058ce0dc5a3c49 (diff) | |
download | kube-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.cpp | 24 |
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 | ||
24 | class MailsController : public Kube::ListPropertyController | ||
25 | { | ||
26 | public: | ||
27 | |||
28 | MailsController() | ||
29 | : Kube::ListPropertyController{{"email"}} | ||
30 | { | ||
31 | } | ||
32 | |||
33 | }; | ||
34 | |||
35 | class PhonesController : public Kube::ListPropertyController | ||
36 | { | ||
37 | public: | ||
38 | |||
39 | PhonesController() | ||
40 | : Kube::ListPropertyController{{"number"}} | ||
41 | { | ||
42 | } | ||
43 | |||
44 | }; | ||
45 | |||
24 | ContactController::ContactController() | 46 | ContactController::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(); |