-
Notifications
You must be signed in to change notification settings - Fork 0
/
ToolstringEditor.qml
61 lines (57 loc) · 1.57 KB
/
ToolstringEditor.qml
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
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2
SplitView {
anchors.fill: parent
orientation: Qt.Horizontal
Layout.minimumWidth: 640
Layout.minimumHeight: 300
Item {
id: possibleDevicesView
Layout.minimumWidth: 200
Layout.margins: 6
TableView {
anchors.fill: parent
model: possibleDevicesListModel
TableViewColumn {
title: qsTr("Прибор")
role: "name"
}
onDoubleClicked: {
console.log("Row double clicked ", row);
selectedDevicesListModel.append({"name" : possibleDevicesListModel.get(row).name, "serial" : possibleDevicesListModel.get(row).deviceId});
}
}
}
Item {
id: selectedDevicesView
Layout.minimumWidth: 200
Layout.margins: 6
TableView {
anchors.fill: parent
model: selectedDevicesListModel
TableViewColumn {
title: qsTr("Прибор")
role: "name"
movable: false
}
TableViewColumn {
title: qsTr("Номер")
role: "serial"
movable: false
}
}
}
Item {
id: toolStringView
Layout.minimumWidth: 200
Layout.fillWidth: true
Layout.margins: 6
Image {
id: pipeImage
anchors.fill: parent
fillMode: Image.PreserveAspectFit
source: "simple_pipe.svg"
}
}
}