diff options
author | Scott Murray <scott.murray@konsulko.com> | 2017-02-28 19:31:02 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2017-02-28 19:31:02 -0500 |
commit | 27dbd46c4c73964a0fe61cddf30470b4587e17f2 (patch) | |
tree | d75dad773096f8864ea8106f3fb3ed95527632ca /app/models | |
parent | e5e26112bb44b62eaeadf1ec2e9b3253352f70f8 (diff) |
Import latest code from CES2017 repo
Change-Id: Id7ad21f47ea50d15156171a7dfa139da46c4f977
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/CallHistoryModel.qml | 34 | ||||
-rwxr-xr-x | app/models/ContactsModel.qml | 68 | ||||
-rw-r--r-- | app/models/qmldir | 8 |
3 files changed, 110 insertions, 0 deletions
diff --git a/app/models/CallHistoryModel.qml b/app/models/CallHistoryModel.qml new file mode 100644 index 0000000..ee11799 --- /dev/null +++ b/app/models/CallHistoryModel.qml @@ -0,0 +1,34 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * Copyright (C) 2016, The Qt Company. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQml.Models 2.2 + +ListModel { + ListElement { + name: "Droopy" + number: "8003451234" + time: "2015-01-05 07:15" + } + + ListElement { + name: "Doc" + number: "8003451234" + time: "2015-01-05 07:15" + } + + ListElement { + name: "Grumpy" + number: "8003451234" + time: "2015-01-05 07:15" + } + + ListElement { + name: "Bashful" + number: "8003451234" + time: "2015-01-05 07:15" + } +} diff --git a/app/models/ContactsModel.qml b/app/models/ContactsModel.qml new file mode 100755 index 0000000..f8419ee --- /dev/null +++ b/app/models/ContactsModel.qml @@ -0,0 +1,68 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved.
+ * Copyright (C) 2015, The Qt Company. All Rights Reserved.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+import QtQml.Models 2.2
+
+ListModel {
+ function findName(number) {
+ for (var i = 0; i < count; i++) {
+ var o = get(i)
+ if (o.phone === number || o.mobile === number || o.work === number)
+ return o.name
+ }
+ return "Unknown number"
+ }
+
+ ListElement {
+ name: "Art McGee"
+ number: "503-616-4940"
+ mobile: "503-715-6618"
+ work: "972-256-9732"
+ }
+
+ ListElement {
+ name: "Dana Jonty"
+ number: "503-000-0000"
+ mobile: "503-209-3254"
+ work: "972-000-0000"
+ }
+
+ ListElement {
+ name: "Jojo Derick"
+ number: "503-000-0000"
+ mobile: "503-209-3254"
+ work: "972-000-0000"
+ }
+
+ ListElement {
+ name: "Kelly Johnson"
+ number: "503-000-0000"
+ mobile: "503-000-0000"
+ work: "972-000-0000"
+ }
+
+ ListElement {
+ name: "Marco Morales"
+ number: "503-000-0000"
+ mobile: "503-209-3254"
+ work: "972-000-0000"
+ }
+
+ ListElement {
+ name: "Rob Brad"
+ number: "503-000-0000"
+ mobile: "503-209-3254"
+ work: "972-000-0000"
+ }
+
+ ListElement {
+ name: "Ted Gilbert"
+ number: "503-000-0000"
+ mobile: "503-209-3254"
+ work: "972-000-0000"
+ }
+}
diff --git a/app/models/qmldir b/app/models/qmldir new file mode 100644 index 0000000..0b87a56 --- /dev/null +++ b/app/models/qmldir @@ -0,0 +1,8 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +CallListModel 1.0 CallListModel.qml +ContactsModel 1.0 ContactsModel.qml |