testexecutor-ui 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- testexecutor/VERSION +1 -0
- testexecutor/__init__.py +6 -0
- testexecutor/control/TestListenerApi.py +56 -0
- testexecutor/control/TestSuiteListener.py +249 -0
- testexecutor/control/__init__.py +0 -0
- testexecutor/model/GenericListModel.py +63 -0
- testexecutor/model/InstructionsModel.py +351 -0
- testexecutor/model/KeyValueModel.py +177 -0
- testexecutor/model/MultiTestWindowModel.py +184 -0
- testexecutor/model/ResultModel.py +314 -0
- testexecutor/model/TestSuiteControlModel.py +139 -0
- testexecutor/model/TestSuiteGroup.py +105 -0
- testexecutor/model/TestSuiteModel.py +301 -0
- testexecutor/model/__init__.py +0 -0
- testexecutor/model/selector/FilterGroupModel.py +90 -0
- testexecutor/model/selector/FilterModel.py +251 -0
- testexecutor/model/selector/MultiSelectDetails.py +106 -0
- testexecutor/model/selector/MultiSelectListModel.py +48 -0
- testexecutor/model/selector/__init__.py +0 -0
- testexecutor/ui/IdentificationWidget.qml +40 -0
- testexecutor/ui/InputWidget.qml +74 -0
- testexecutor/ui/InstructionWidget.qml +185 -0
- testexecutor/ui/KeyValueItem.qml +194 -0
- testexecutor/ui/KeyValueItemConfig.qml +41 -0
- testexecutor/ui/KeyValueList.qml +49 -0
- testexecutor/ui/MultiTestWidget.qml +48 -0
- testexecutor/ui/MultiTestWindow.qml +88 -0
- testexecutor/ui/ResultItem.qml +199 -0
- testexecutor/ui/ResultItemConfig.qml +46 -0
- testexecutor/ui/ResultList.qml +58 -0
- testexecutor/ui/TestSuiteConfig.qml +95 -0
- testexecutor/ui/TestSuiteController.qml +54 -0
- testexecutor/ui/TestSuiteWidget.qml +350 -0
- testexecutor/ui/selector/FilterItem.qml +75 -0
- testexecutor/ui/selector/FilterItemConfig.qml +24 -0
- testexecutor/ui/selector/FilterMultiSelectorItem.qml +169 -0
- testexecutor/ui/selector/FilterMultiSelectorItemConfig.qml +22 -0
- testexecutor/ui/selector/FilterMultiSelectorList.qml +50 -0
- testexecutor/ui/selector/HeaderConfig.qml +24 -0
- testexecutor/ui/selector/SectionConfig.qml +24 -0
- testexecutor/ui/selector/SectionDelegate.qml +85 -0
- testexecutor/ui/selector/SelectorHeader.qml +43 -0
- testexecutor/ui/selector/SuiteList.qml +150 -0
- testexecutor/ui/selector/SuiteSelector.qml +71 -0
- testexecutor/ui/selector/SuiteSelectorConfig.qml +38 -0
- testexecutor/ui/selector/TestConfig.qml +22 -0
- testexecutor/ui/selector/TestDelegate.qml +75 -0
- testexecutor/ui/te-64x64.ico +0 -0
- testexecutor_ui-0.6.1.dist-info/LICENSE +204 -0
- testexecutor_ui-0.6.1.dist-info/METADATA +27 -0
- testexecutor_ui-0.6.1.dist-info/NOTICE +3 -0
- testexecutor_ui-0.6.1.dist-info/RECORD +54 -0
- testexecutor_ui-0.6.1.dist-info/WHEEL +5 -0
- testexecutor_ui-0.6.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
|
|
19
|
+
Item {
|
|
20
|
+
property var color: {"default": "lightgray"}
|
|
21
|
+
property var text: {"color": "green"}
|
|
22
|
+
property var name: "Test"
|
|
23
|
+
property var description: "Description"
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
|
|
19
|
+
Item {
|
|
20
|
+
property var color: {"default": "#8e8a8a", "selected": "goldenrod"}
|
|
21
|
+
property var text: {"color": {"default": "black"}}
|
|
22
|
+
property var border: {"color": "lightgray", "width": 1}
|
|
23
|
+
property var dimension: {"height": 25}
|
|
24
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
import QtQuick.Layouts
|
|
19
|
+
|
|
20
|
+
Rectangle {
|
|
21
|
+
id: sectionDelegate
|
|
22
|
+
property alias text: txt.text
|
|
23
|
+
property alias indicator: expansion_indicator.text
|
|
24
|
+
property alias count: count.text
|
|
25
|
+
property var selected: false
|
|
26
|
+
property var proportion
|
|
27
|
+
property var config: SectionConfig{}
|
|
28
|
+
signal expandClick()
|
|
29
|
+
signal sectionClick()
|
|
30
|
+
color: getBackgroundColor()
|
|
31
|
+
border.color: config ? config.border.color : "black"
|
|
32
|
+
border.width: config ? config.border.width : 0
|
|
33
|
+
height: config ? config.dimension.height : 25
|
|
34
|
+
|
|
35
|
+
RowLayout {
|
|
36
|
+
anchors.fill: parent
|
|
37
|
+
Text {
|
|
38
|
+
id: expansion_indicator
|
|
39
|
+
font.pixelSize: parent.height / 1.3
|
|
40
|
+
font.bold: true
|
|
41
|
+
color: config ? config.text.color.default : null
|
|
42
|
+
Layout.preferredWidth: parent.width * (proportion ? proportion.indicator : 0.02 )
|
|
43
|
+
horizontalAlignment: Text.AlignLeft
|
|
44
|
+
MouseArea {
|
|
45
|
+
anchors.fill: parent
|
|
46
|
+
onClicked: {
|
|
47
|
+
sectionDelegate.expandClick()
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
Text {
|
|
52
|
+
id: txt
|
|
53
|
+
Layout.alignment: Qt.AlignHCenter
|
|
54
|
+
Layout.preferredWidth: parent.width * (proportion ? proportion.indicator : 0.15 )
|
|
55
|
+
font.pixelSize: parent.height / 1.3
|
|
56
|
+
font.bold: true
|
|
57
|
+
Layout.fillHeight: true
|
|
58
|
+
Layout.fillWidth: true
|
|
59
|
+
color: config ? config.text.color.default : null
|
|
60
|
+
leftPadding: 3
|
|
61
|
+
MouseArea {
|
|
62
|
+
anchors.fill: parent
|
|
63
|
+
onClicked: {
|
|
64
|
+
sectionDelegate.sectionClick()
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
Text {
|
|
69
|
+
id: count
|
|
70
|
+
Layout.preferredWidth: parent.width * (proportion ? proportion.count : 0.03 )
|
|
71
|
+
font.pixelSize: parent.height / 1.3
|
|
72
|
+
font.bold: true
|
|
73
|
+
rightPadding: 3
|
|
74
|
+
color: config ? config.text.color.default : null
|
|
75
|
+
horizontalAlignment: Text.AlignRight
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function getBackgroundColor() {
|
|
79
|
+
var color = selected ? "burlywood" : null
|
|
80
|
+
if (config) {
|
|
81
|
+
color = selected ? config.color.selected : config.color.default
|
|
82
|
+
}
|
|
83
|
+
return color
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
import QtQuick.Layouts
|
|
19
|
+
|
|
20
|
+
Rectangle {
|
|
21
|
+
property var proportion: {"name": 0.15}
|
|
22
|
+
property var config: HeaderConfig{}
|
|
23
|
+
height: 30
|
|
24
|
+
width: parent.width
|
|
25
|
+
color: config ? config.color.default : "lightgray"
|
|
26
|
+
RowLayout {
|
|
27
|
+
anchors.fill: parent
|
|
28
|
+
Text {
|
|
29
|
+
Layout.fillHeight: true
|
|
30
|
+
Layout.preferredWidth: parent.width * (proportion ? proportion.name : 0.15)
|
|
31
|
+
text: config ? config.name : "Test"
|
|
32
|
+
font.pixelSize: parent.height / 1.3
|
|
33
|
+
color: config ? config.text.color: "black"
|
|
34
|
+
}
|
|
35
|
+
Text {
|
|
36
|
+
Layout.fillHeight: true
|
|
37
|
+
Layout.fillWidth: true
|
|
38
|
+
text: config ? config.description : "Description"
|
|
39
|
+
font.pixelSize: parent.height / 1.3
|
|
40
|
+
color: config ? config.text.color: "black"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
import QtQuick.Controls
|
|
19
|
+
|
|
20
|
+
ListView {
|
|
21
|
+
id: view
|
|
22
|
+
property var collapsed: ({})
|
|
23
|
+
property var selected: ({})
|
|
24
|
+
property var section_count: ({})
|
|
25
|
+
property var indicators: {0:"⮞", 1:"⮟"}
|
|
26
|
+
property var config: SuiteSelectorConfig{}
|
|
27
|
+
property int viewableCount: config ? config.viewableCount : -1
|
|
28
|
+
property int row_height: (viewableCount < 0) ? 30 : view.height / (view.viewableCount)
|
|
29
|
+
clip: true
|
|
30
|
+
|
|
31
|
+
signal sectionClick(string section, bool selected)
|
|
32
|
+
|
|
33
|
+
delegate: TestDelegate {
|
|
34
|
+
id: testDelegate
|
|
35
|
+
expanded: view.isSectionExpanded(model.owner)
|
|
36
|
+
config: view.config.row
|
|
37
|
+
dynamic_height: view.row_height
|
|
38
|
+
|
|
39
|
+
Connections {
|
|
40
|
+
target: view
|
|
41
|
+
function onSectionClick(section, selected) {
|
|
42
|
+
if (model.owner === section) {
|
|
43
|
+
model.selected = selected
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
onTestClick: function(model) {
|
|
48
|
+
testClicked(model)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
header: SelectorHeader {
|
|
53
|
+
width: parent.width
|
|
54
|
+
config: view.config ? view.config.header: ""
|
|
55
|
+
height: row_height
|
|
56
|
+
anchors {
|
|
57
|
+
left: parent.left
|
|
58
|
+
right: parent.right
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
section {
|
|
63
|
+
id: section_id
|
|
64
|
+
property: "model.owner"
|
|
65
|
+
criteria: ViewSection.FullString
|
|
66
|
+
delegate: SectionDelegate {
|
|
67
|
+
id: sectionDelegate
|
|
68
|
+
anchors {
|
|
69
|
+
left: parent.left
|
|
70
|
+
right: parent.right
|
|
71
|
+
}
|
|
72
|
+
text: section
|
|
73
|
+
indicator: getIndicator(section)
|
|
74
|
+
count: getSectionCount(section)
|
|
75
|
+
selected: getSectionCount(section) > 0
|
|
76
|
+
config: view.config.section
|
|
77
|
+
onExpandClick: view.toggleSection(section)
|
|
78
|
+
onSectionClick: view.toggleSelected(section)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
ScrollBar.vertical: ScrollBar {}
|
|
83
|
+
|
|
84
|
+
onCountChanged: {
|
|
85
|
+
// If the count changed int the list view model, take the simple
|
|
86
|
+
// approach and reset section count
|
|
87
|
+
var new_count = Object.keys(section_count).length
|
|
88
|
+
if (new_count > 0) {
|
|
89
|
+
section_count = {}
|
|
90
|
+
view.section_countChanged()
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function isSectionExpanded(section) {
|
|
95
|
+
return !(section in collapsed);
|
|
96
|
+
}
|
|
97
|
+
function showSection(section) {
|
|
98
|
+
delete collapsed[section]
|
|
99
|
+
collapsedChanged()
|
|
100
|
+
}
|
|
101
|
+
function hideSection(section) {
|
|
102
|
+
collapsed[section] = true
|
|
103
|
+
collapsedChanged()
|
|
104
|
+
}
|
|
105
|
+
function toggleSection(section) {
|
|
106
|
+
if (isSectionExpanded(section)) {
|
|
107
|
+
hideSection(section)
|
|
108
|
+
} else {
|
|
109
|
+
showSection(section)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function toggleSelected(section) {
|
|
113
|
+
if (isSectionSelected(section) || model.selected_count(section) > 0) {
|
|
114
|
+
delete selected[section]
|
|
115
|
+
} else {
|
|
116
|
+
selected[section] = true
|
|
117
|
+
}
|
|
118
|
+
view.sectionClick(section, isSectionSelected(section))
|
|
119
|
+
section_count[section] = model.selected_count(section)
|
|
120
|
+
section_countChanged()
|
|
121
|
+
}
|
|
122
|
+
function isSectionSelected(section) {
|
|
123
|
+
return (section in selected);
|
|
124
|
+
}
|
|
125
|
+
function getIndicator(owner) {
|
|
126
|
+
var ind = ""
|
|
127
|
+
var indicators = view.indicators
|
|
128
|
+
if (config) {
|
|
129
|
+
indicators = config.indicators
|
|
130
|
+
}
|
|
131
|
+
var istate = view.isSectionExpanded(owner)
|
|
132
|
+
if (istate) {
|
|
133
|
+
ind = indicators[1]
|
|
134
|
+
} else {
|
|
135
|
+
ind = indicators[0]
|
|
136
|
+
}
|
|
137
|
+
return ind
|
|
138
|
+
}
|
|
139
|
+
function getSectionCount(section) {
|
|
140
|
+
var count = 0;
|
|
141
|
+
if (section && section_count[section]) {
|
|
142
|
+
count = section_count[section]
|
|
143
|
+
}
|
|
144
|
+
return (count)
|
|
145
|
+
}
|
|
146
|
+
function testClicked(clicked) {
|
|
147
|
+
section_count[clicked.owner] = model.selected_count(clicked.owner)
|
|
148
|
+
section_countChanged()
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Sipke Vriend, Australia
|
|
3
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* A View for selection tests to run
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import QtQuick 2.4
|
|
23
|
+
import QtQuick.Controls 2.4
|
|
24
|
+
import QtQuick.Layouts 1.3
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Item {
|
|
28
|
+
id: suiteSelector
|
|
29
|
+
property var config: SuiteSelectorConfig{}
|
|
30
|
+
property var cntrlModel
|
|
31
|
+
width: 640
|
|
32
|
+
height: 480
|
|
33
|
+
ColumnLayout {
|
|
34
|
+
id: columnLayout
|
|
35
|
+
anchors.fill: parent
|
|
36
|
+
|
|
37
|
+
FilterMultiSelectorList {
|
|
38
|
+
id: filterMultiSelectorList
|
|
39
|
+
Layout.preferredHeight: parent.height * 0.07
|
|
40
|
+
Layout.fillWidth: true
|
|
41
|
+
filters: cntrlModel ? cntrlModel.filters : null
|
|
42
|
+
itemConfig: suiteSelector.config ? suiteSelector.config.filter: ""
|
|
43
|
+
onChanged: {}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
SuiteList {
|
|
47
|
+
id: suiteTree
|
|
48
|
+
Layout.fillHeight: true
|
|
49
|
+
Layout.fillWidth: true
|
|
50
|
+
config: suiteSelector.config
|
|
51
|
+
model: cntrlModel ? cntrlModel.testselector : null
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
ToolTip {
|
|
55
|
+
visible: cntrlModel ? cntrlModel.errors : false
|
|
56
|
+
timeout: 3000
|
|
57
|
+
delay: 100
|
|
58
|
+
contentItem:
|
|
59
|
+
Column {
|
|
60
|
+
Text {
|
|
61
|
+
width: filterMultiSelectorList.width / 2
|
|
62
|
+
wrapMode: Text.Wrap
|
|
63
|
+
text: cntrlModel ? cntrlModel.errors : ""
|
|
64
|
+
font.pixelSize: filterMultiSelectorList.height * 0.3
|
|
65
|
+
font.weight: Font.ExtraBold
|
|
66
|
+
color: "red"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
|
|
19
|
+
Item {
|
|
20
|
+
/*
|
|
21
|
+
* Define the proportions for the widths of the test suite items.
|
|
22
|
+
* The description area is not defined and will fill any remaining area.
|
|
23
|
+
*/
|
|
24
|
+
property var proportion: {
|
|
25
|
+
"indicator": 0.02,
|
|
26
|
+
"name": 0.15,
|
|
27
|
+
// descprition takes on remainder
|
|
28
|
+
"count": 0.03
|
|
29
|
+
}
|
|
30
|
+
property var header: HeaderConfig{}
|
|
31
|
+
property var section: SectionConfig{}
|
|
32
|
+
property var row: TestConfig{}
|
|
33
|
+
property var indicators: {0:"⮞", 1:"⮟"}
|
|
34
|
+
property int viewableCount: 25
|
|
35
|
+
property var filter: {
|
|
36
|
+
"item": false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
|
|
19
|
+
Item {
|
|
20
|
+
property var color: {"default": "snow", "alternate": "whitesmoke", "selected": "burlywood"}
|
|
21
|
+
property var text: {"color": {"default": "black"}}
|
|
22
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 Direkt Embedded Pty Ltd
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import QtQuick
|
|
18
|
+
import QtQuick.Layouts
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Item {
|
|
22
|
+
property bool expanded: true
|
|
23
|
+
property var dynamic_height: 40
|
|
24
|
+
width: parent ? parent.width : 100
|
|
25
|
+
clip: true
|
|
26
|
+
height: expanded ? dynamic_height : 0
|
|
27
|
+
property var proportion: {"name": 0.15}
|
|
28
|
+
property var config: TestConfig{}
|
|
29
|
+
|
|
30
|
+
signal testClick(variant model)
|
|
31
|
+
|
|
32
|
+
Rectangle {
|
|
33
|
+
color: getBackgroundColor()
|
|
34
|
+
anchors.fill: parent
|
|
35
|
+
RowLayout {
|
|
36
|
+
anchors.fill: parent
|
|
37
|
+
Text {
|
|
38
|
+
id: nameText
|
|
39
|
+
Layout.preferredWidth: parent.width * (proportion ? proportion.name : 0.15)
|
|
40
|
+
clip: true
|
|
41
|
+
text: model.name
|
|
42
|
+
font.pixelSize: dynamic_height / 1.3
|
|
43
|
+
color: config ? config.text.color.default : "black"
|
|
44
|
+
}
|
|
45
|
+
Text {
|
|
46
|
+
id: descriptionText
|
|
47
|
+
Layout.fillHeight: true
|
|
48
|
+
Layout.fillWidth: true
|
|
49
|
+
clip: true
|
|
50
|
+
text: model.description
|
|
51
|
+
font.pixelSize: dynamic_height / 1.3
|
|
52
|
+
color: config ? config.text.color.default : "black"
|
|
53
|
+
leftPadding: 3
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
MouseArea {
|
|
58
|
+
anchors.fill: parent
|
|
59
|
+
onClicked: {
|
|
60
|
+
model.selected = !model.selected
|
|
61
|
+
testClick(model)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
Behavior on height {
|
|
65
|
+
NumberAnimation { duration: 100 }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function getBackgroundColor() {
|
|
69
|
+
var color = model.selected ? "burlywood" : "white"
|
|
70
|
+
if (config) {
|
|
71
|
+
color = model.selected ? config.color.selected : config.color.default
|
|
72
|
+
}
|
|
73
|
+
return color
|
|
74
|
+
}
|
|
75
|
+
}
|
|
Binary file
|