-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneral.qml
229 lines (201 loc) · 5.92 KB
/
General.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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3
import QtQuick.Controls.Styles 1.4
Item {
id: item1
anchors.fill: parent
Column {
id: column1
anchors.leftMargin: 5
anchors.topMargin: 5
anchors.fill: parent
GroupBox {
id: groupBox1
flat: true
Layout.fillWidth: true
CheckBox {
id: checkBoxReal
text: qsTr(" real")
checked: config.real
Component.onCompleted: {
config.real = Qt.binding(function() { return checked})
}
onCheckedChanged: {
if(checked) {
configTabs.insertTab(1, "SoundInput", Qt.createComponent("SoundInput.qml"))
} else {
configTabs.removeTab(1)
}
}
}
Row {
id: row1
x: 0
anchors.top: checkBoxReal.bottom
anchors.topMargin: 0
spacing: 66
CheckBox {
id: checkBoxCreateLogFile
height: 29
text: qsTr(" create logfile")
anchors.verticalCenter: parent.verticalCenter
onCheckedChanged: textFieldLogName.visible = checked
checked: config.log
Component.onCompleted: {
config.log = Qt.binding(function() { return checked})
}
}
TextField {
id: textFieldLogName
visible: false
text: config.logFilename
placeholderText: qsTr("logfilename")
Component.onCompleted: {
config.logFilename = Qt.binding(function() {return text})
}
}
}
Row {
id: row2
x: 0
anchors.top: row1.bottom
anchors.topMargin: 0
spacing: 100
Label {
id: textSamplerate
text: qsTr("samplerate")
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
}
TextField {
id: textFieldSamplerate
text: config.samplerate
placeholderText: qsTr("samplerate")
validator: IntValidator{bottom: 0; top: 19200000;}
Component.onCompleted: {
config.samplerate = Qt.binding(function() {return Number(parseFloat(text)) > 1 ? Number(parseFloat(text)) : Number(1)})
}
}
}
}
GroupBox {
id: groupBox4
height: 200
anchors.top: groupBox1.bottom
anchors.topMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
flat: true
Label {
id: textMikrofone
x: -8
text: qsTr("Mikrofone:")
anchors.top: parent.top
anchors.topMargin: 0
font.pixelSize: 12
}
TableView {
id: micTable
anchors.top: textMikrofone.bottom
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.topMargin: 0
itemDelegate: TextInput {
text: styleData.value
validator: DoubleValidator{bottom: -100000000; top: 1000000000;}
onEditingFinished: {
var a = styleData.row
var b = styleData.role
micModel.setOwnData(a, text, b)
text = micModel.ownData(a, b)
}
}
TableViewColumn {
role: "x"
title: "x"
}
TableViewColumn {
role: "y"
title: "y"
}
TableViewColumn {
role: "z"
title: "z"
}
model: micModel
}
Row {
id: row3
x: -8
width: 200
height: 400
anchors.top: micTable.bottom
anchors.topMargin: 0
Button {
id: buttonAddMic
text: qsTr("add")
onClicked: micModel.append()
}
Button {
id: buttonRemoveMic
text: qsTr("remove")
onClicked: {
forceActiveFocus()
micModel.remove()
}
}
}
}
}
/*
ListModel {
id: micModel
ListElement {
x: 0.0
y: 0.0
z: 0.0
}
ListElement {
x: 0.0
y: 1.0
z: 0.0
}
ListElement {
x: 1.0
y: 0.0
z: 0.0
}
ListElement {
x: 1.0
y: 1.0
z: 0.0
}
ListElement {
x: 0.0
y: 0.0
z: 1.0
}
ListElement {
x: 1.0
y: 0.0
z: 1.0
}
ListElement {
x: 0.0
y: 1.0
z: 1.0
}
ListElement {
x: 1.0
y: 1.0
z: 1.0
}
onDataChanged: {
}
}
*/
}