-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMatrixPanel.qml
More file actions
97 lines (91 loc) · 2.64 KB
/
MatrixPanel.qml
File metadata and controls
97 lines (91 loc) · 2.64 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import QtQuick 2.15
import QtQuick.Controls 2.15
import My 1.0
BasePanel {
property alias matrix: matrix
// Mtrx {
// id: matrix
// objectName: "mtrx"
// anchors.top: parent.top
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.bottom: track.top
// }
TableView {
id: matrix
objectName: "mtrx"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: track.top
columnSpacing: 1
rowSpacing: 1
clip: true
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AlwaysOn
width: 20
}
ScrollBar.horizontal: ScrollBar {
policy: ScrollBar.AlwaysOn
height: 20
}
// model: ListModel {
// id: fruitModel
// ListElement {
// name: "Apple"
// cost: 2.45
// }
// ListElement {
// name: "Orange"
// cost: 3.25
// }
// ListElement {
// name: "Banana"
// cost: 1.95
// }
// }
model: Commatrix {
id: commatrix
objectName: "model"
}
// rows: 10
// columns: 10
delegate: Rectangle {
implicitWidth: 30
implicitHeight: 30
// border.color: red
// border.width: 1
TextField {
text: display.toString()
// inputMethodHints: Qt.ImhDigitsOnly
anchors.fill: parent
leftPadding: 5
rightPadding: 5
// horizontalAlignment: TextInput.AlignHCenter
// inputMethodComposing :true
// width: 10
// color:
// onTextChanged: text = text.replace(/\D+/g, '')
}
}
}
Trak {
id: track
objectName: "track"
height: 50
anchors.left: parent.left
anchors.right: setZero.left
anchors.bottom: parent.bottom
}
Button {
id: setZero
text: "Обнулить"
width: 30
onClicked: backend.zeroing()
anchors.right: parent.right
anchors.bottom: parent.bottom
}
function updateMtrx() {
matrix.update()
}
}