-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProductsForm.ui.qml
183 lines (164 loc) · 4.89 KB
/
ProductsForm.ui.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
import QtQuick 2.7
import QtQuick.Layouts 1.0
import QtQuick.Controls 2.1
GridLayout {
id: grid
property alias product: product
property alias quantity: quantity
property alias cost: cost
property alias comment_1: comment_1
property alias borrowed_data: borrowed_data
property alias lender: lender
property alias paid_back: paid_back
property alias paid_back_data: paid_back_data
property alias comment_2: comment_2
property alias paid_back_to: paid_back_to
property int minimumInputSize: 120
property string placeholderText: qsTr("<enter>")
rows: 10
columns: 2
Label {
text: qsTr("Product")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: product.visible
}
TextField {
id: product
focus: true
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
placeholderText: grid.placeholderText
}
Label {
text: qsTr("Quantity")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: quantity.visible
}
SpinBox {
id: quantity
stepSize: 1
to: 1000000
focus: true
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
}
Label {
text: qsTr("Price")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: cost.visible
}
SpinBox {
id: cost
stepSize: 50
to: 1000000
focus: true
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
}
Label {
text: qsTr("Comment")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: comment_1.visible
}
TextField {
id: comment_1
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
placeholderText: grid.placeholderText
}
Label {
text: qsTr("Data")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: borrowed_data.visible
}
RowLayout {
visible: borrowed_data.visible
//Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
Layout.fillWidth: true
TextEdit {
id: borrowed_data
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
//placeholderText: grid.placeholderText
}
Button {
id: borrowed_data_but
text: "Today"
}
}
Label {
text: qsTr("Lender")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: lender.visible
}
ComboBox {
id: lender
textRole: "display"
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
}
Label {
text: qsTr("Paid back")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: paid_back.visible
}
SpinBox {
id: paid_back
stepSize: 50
to: 1000000
focus: true
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
}
Label {
text: qsTr("Data")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: paid_back_data.visible
}
RowLayout {
visible: paid_back_data.visible
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
Layout.fillWidth: true
TextEdit {
id: paid_back_data
Layout.fillHeight: true
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
//placeholderText: grid.placeholderText
}
Button {
id: paid_back_data_but
text: "Today"
}
}
Label {
text: qsTr("Comment")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: comment_2.visible
}
TextField {
id: comment_2
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
placeholderText: grid.placeholderText
}
Label {
text: qsTr("Debt reciever")
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
visible: paid_back_to.visible
}
ComboBox {
id: paid_back_to
textRole: "display"
Layout.fillWidth: true
Layout.minimumWidth: grid.minimumInputSize
Layout.alignment: Qt.AlignLeft | Qt.AlignBaseline
}
}