diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-02 23:15:01 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-02 23:15:01 +0200 |
commit | 581b5a7f16a1c399958742a3b103f47ef9518662 (patch) | |
tree | cc7fa518f81d00522532b223e7373f2f04236f7e /views/people | |
parent | 6aa6051a1535db4fea13bbde62e7701ecba583e9 (diff) | |
download | kube-581b5a7f16a1c399958742a3b103f47ef9518662.tar.gz kube-581b5a7f16a1c399958742a3b103f47ef9518662.zip |
Addressbook support for the contact composer
Diffstat (limited to 'views/people')
-rw-r--r-- | views/people/qml/People.qml | 3 | ||||
-rw-r--r-- | views/people/qml/PersonComposer.qml | 28 |
2 files changed, 28 insertions, 3 deletions
diff --git a/views/people/qml/People.qml b/views/people/qml/People.qml index 718d3c08..ad723427 100644 --- a/views/people/qml/People.qml +++ b/views/people/qml/People.qml | |||
@@ -51,8 +51,7 @@ FocusScope { | |||
51 | leftMargin: Kube.Units.smallSpacing | 51 | leftMargin: Kube.Units.smallSpacing |
52 | } | 52 | } |
53 | text: qsTr("New Contact") | 53 | text: qsTr("New Contact") |
54 | //visible: stack.depth == 1 | 54 | visible: stack.depth == 1 |
55 | visible: false | ||
56 | 55 | ||
57 | onClicked: { | 56 | onClicked: { |
58 | stack.push(personComposer) | 57 | stack.push(personComposer) |
diff --git a/views/people/qml/PersonComposer.qml b/views/people/qml/PersonComposer.qml index f56532f8..b409c3d6 100644 --- a/views/people/qml/PersonComposer.qml +++ b/views/people/qml/PersonComposer.qml | |||
@@ -194,7 +194,7 @@ Flickable { | |||
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | Column{ | 197 | Column { |
198 | id: address | 198 | id: address |
199 | 199 | ||
200 | width: root.width - Kube.Units.largeSpacing | 200 | width: root.width - Kube.Units.largeSpacing |
@@ -226,6 +226,32 @@ Flickable { | |||
226 | backgroundColor: "white" | 226 | backgroundColor: "white" |
227 | } | 227 | } |
228 | } | 228 | } |
229 | |||
230 | Column{ | ||
231 | width: root.width - Kube.Units.largeSpacing | ||
232 | spacing: Kube.Units.smallSpacing | ||
233 | |||
234 | Kube.Label { | ||
235 | text: "Addressbook" | ||
236 | } | ||
237 | Kube.ComboBox { | ||
238 | width: Kube.Units.gridUnit * 20 | ||
239 | |||
240 | model: Kube.EntityModel { | ||
241 | id: addressbookModel | ||
242 | type: "addressbook" | ||
243 | //TODO | ||
244 | //accountId: "" | ||
245 | roles: ["name", "color"] | ||
246 | } | ||
247 | textRole: "name" | ||
248 | Layout.fillWidth: true | ||
249 | onCurrentIndexChanged: { | ||
250 | contactController.addressbook = addressbookModel.data(currentIndex).object | ||
251 | } | ||
252 | } | ||
253 | } | ||
254 | |||
229 | Item { | 255 | Item { |
230 | width: parent.width | 256 | width: parent.width |
231 | height: Kube.Units.largeSpacing | 257 | height: Kube.Units.largeSpacing |