summaryrefslogtreecommitdiffstats
path: root/views/people
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-09 09:35:59 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-10 12:42:13 +0100
commit6d726bb10386b3d7f5481d41b735ec06cb2163ad (patch)
tree4d591b67b54c5a83f9f1d718a4576c8ccf05859b /views/people
parent2d9944bd0b5cd1dd202d9dc6318d612e1aca4241 (diff)
downloadkube-6d726bb10386b3d7f5481d41b735ec06cb2163ad.tar.gz
kube-6d726bb10386b3d7f5481d41b735ec06cb2163ad.zip
Install composer/converations/people as separate views and load them
dynamically.
Diffstat (limited to 'views/people')
-rw-r--r--views/people/metadata.json4
-rw-r--r--views/people/qml/View.qml38
-rw-r--r--views/people/tests/tst_peopleview.qml37
3 files changed, 79 insertions, 0 deletions
diff --git a/views/people/metadata.json b/views/people/metadata.json
new file mode 100644
index 00000000..44296a7e
--- /dev/null
+++ b/views/people/metadata.json
@@ -0,0 +1,4 @@
1{
2 "icon": "im-user-inverted",
3 "tooltip": "Your contacts."
4}
diff --git a/views/people/qml/View.qml b/views/people/qml/View.qml
new file mode 100644
index 00000000..3f1b9261
--- /dev/null
+++ b/views/people/qml/View.qml
@@ -0,0 +1,38 @@
1/*
2 * Copyright (C) 2017 Michael Bohlender, <michael.bohlender@kdemail.net>
3 * Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20
21import QtQuick 2.7
22import QtQuick.Controls 2.1
23import org.kube.framework 1.0 as Kube
24
25Item {
26
27 StackView.onActivated: {
28 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"type": "contacts"})
29 }
30
31 Kube.People {
32 id: people
33 anchors {
34 fill: parent
35 margins: Kube.Units.smallSpacing
36 }
37 }
38}
diff --git a/views/people/tests/tst_peopleview.qml b/views/people/tests/tst_peopleview.qml
new file mode 100644
index 00000000..263247ad
--- /dev/null
+++ b/views/people/tests/tst_peopleview.qml
@@ -0,0 +1,37 @@
1/*
2 * Copyright 2017 Christian Mollekopf <mollekopf@kolabsys.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20import QtQuick 2.7
21import QtTest 1.0
22import "../qml"
23
24TestCase {
25 id: testCase
26 width: 400
27 height: 400
28 name: "PeopleView"
29
30 View {
31 id: peopleView
32 }
33
34 function test_start() {
35 verify(peopleView)
36 }
37}