diff options
Diffstat (limited to 'framework/src')
-rw-r--r-- | framework/src/domain/contactcontroller.cpp | 24 | ||||
-rw-r--r-- | framework/src/domain/contactcontroller.h | 4 |
2 files changed, 28 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(); |
diff --git a/framework/src/domain/contactcontroller.h b/framework/src/domain/contactcontroller.h index 72d8eee1..102f6bef 100644 --- a/framework/src/domain/contactcontroller.h +++ b/framework/src/domain/contactcontroller.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <QObject> | 22 | #include <QObject> |
23 | #include <QString> | 23 | #include <QString> |
24 | #include <QStringList> | 24 | #include <QStringList> |
25 | #include <QStandardItemModel> | ||
25 | 26 | ||
26 | #include "controller.h" | 27 | #include "controller.h" |
27 | 28 | ||
@@ -43,6 +44,9 @@ class ContactController : public Kube::Controller | |||
43 | KUBE_CONTROLLER_PROPERTY(QString, JobTitle, jobTitle) | 44 | KUBE_CONTROLLER_PROPERTY(QString, JobTitle, jobTitle) |
44 | KUBE_CONTROLLER_PROPERTY(QByteArray, ImageData, imageData) | 45 | KUBE_CONTROLLER_PROPERTY(QByteArray, ImageData, imageData) |
45 | 46 | ||
47 | KUBE_CONTROLLER_LISTCONTROLLER(mails) | ||
48 | KUBE_CONTROLLER_LISTCONTROLLER(phones) | ||
49 | |||
46 | KUBE_CONTROLLER_ACTION(save) | 50 | KUBE_CONTROLLER_ACTION(save) |
47 | 51 | ||
48 | public: | 52 | public: |