blob: 32654372fa372e1cef63dec70846d1db134aa37c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
import QtQuick 2.6
import QtTest 1.1
// sysui, for getting HomePage
import display 1.0
Item {
width: 600
height: 600
QtObject {
id: redApp
property Item window
property Item loadedWindow: Rectangle { color: "red" }
property bool active: false
property bool canBeActive: true
property int heightRows: 1
property int minHeightRows: 1
function start() {
window = loadedWindow;
}
}
QtObject {
id: greenApp
property Item window
property Item loadedWindow: Rectangle { color: "green" }
property bool active: false
property bool canBeActive: true
property int heightRows: 2
property int minHeightRows: 1
function start() {
window = loadedWindow;
}
}
QtObject {
id: blueApp
property Item window
property Item loadedWindow: Rectangle { color: "blue" }
property bool active: false
property bool canBeActive: true
property int heightRows: 2
property int minHeightRows: 1
function start() {
window = loadedWindow;
}
}
HomePage {
anchors.fill: parent
widgetsList: ListModel { id: listModel }
Component.onCompleted: {
listModel.append({"appInfo":redApp})
listModel.append({"appInfo":greenApp})
listModel.append({"appInfo":blueApp})
}
}
TestCase {
name: "HomePage"
when: windowShown
function test_foobar() {
}
}
}
|