This repository has been archived by the owner on Dec 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Page1Form.ui.qml
346 lines (321 loc) · 11.8 KB
/
Page1Form.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
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Controls 1.4
Flickable {
anchors.fill: parent
contentWidth: Page1Form.contentWidth
contentHeight: Page1Form.contentHeight
ScrollBar.vertical: ScrollBar {
}
ScrollBar.horizontal: ScrollBar {
}
property alias driveScanButton: driveScanButton
property alias driveScanBusyIndicator: driveScanBusyIndicator
property alias driveName: driveName
property alias pickMusicHome: pickMusicHome
property alias musicHome: musicHome
property alias freedbResults: freedbResults
property alias cddbSearchResultsView: cddbSearchResultsView
property alias cddbAlbumView: cddbAlbumView
property alias artistName: artistName
property alias titleName: titleName
property alias importMusic: importMusic
property alias cancelImportMusic: cancelImportMusic
property alias importStatusView: importStatusView
property alias importStatus: importStatus
Item {
id: mainForm
anchors.fill: parent
width: parent.width
height: parent.height
RoundButton {
id: driveScanButton
height: mainWindow.buttonHeight
radius: mainWindow.buttonRadius
text: qsTr("Drive Scan")
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: horizontalMargin
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
ToolTip.visible: hovered
ToolTip.delay: 2000
ToolTip.text: qsTr("Scan for a CD-ROM drive with an Audio CD.")
BusyIndicator {
id: driveScanBusyIndicator
objectName: "driveScanBusyIndicator"
width: 38
height: 38
visible: true
running: false
anchors.top: parent.top
anchors.left: driveScanButton.right
anchors.leftMargin: 10
Connections {
target: QtCdParanoia
onBusyIndicator: driveScanBusyIndicator.running
= !driveScanBusyIndicator.running
}
}
Text {
id: driveName
objectName: "driveName"
width: parent.width - driveScanButton.width - (2 * horizontalMargin)
anchors.verticalCenter: driveScanButton.verticalCenter
anchors.left: driveScanButton.right
anchors.leftMargin: 10
text: "No disc found."
font.family: mainWindow.fontFamily
font.pointSize: mainWindow.fontSize
Connections {
target: QtCdParanoia
onDriveName: driveName.text = text
}
}
}
Label {
id: freedbResults
text: qsTr('<a href="http://www.freedb.org/">freedb</a> Artist and Title')
textFormat: Text.StyledText
linkColor: "blue"
anchors.top: driveScanButton.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: driveScanButton.left
anchors.leftMargin: 7
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
}
TableView {
id: cddbSearchResultsView
objectName: "cddbSearchResultsView"
model: cddbSearchResultsModel
anchors.top: freedbResults.bottom
anchors.left: freedbResults.left
anchors.topMargin: 7
frameVisible: false
sortIndicatorVisible: false
width: parent.width - (2 * horizontalMargin)
height: 99
anchors.leftMargin: 0
Connections {
target: QtCdParanoia
onCddbSearchResult: cddbSearchResultsModel.append(result)
}
TableViewColumn {
title: qsTr("Pick")
width: 40
delegate: RadioButton {
objectName: model.category
exclusiveGroup: searchResults
anchors.left: parent ? parent.left : undefined
anchors.leftMargin: 15
}
}
TableViewColumn {
role: "category"
title: qsTr('Category')
width: 75
}
TableViewColumn {
role: "artist"
title: qsTr('Artist')
width: 100
}
TableViewColumn {
role: "title"
title: qsTr('Title')
width: 500
}
}
Label {
id: artistLabel
text: qsTr('Artist')
anchors.top: cddbSearchResultsView.bottom
anchors.topMargin: mainWindow.topMargin * 2
anchors.left: cddbSearchResultsView.left
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
}
TextField {
id: artistName
width: cddbSearchResultsView.width
anchors.top: artistLabel.bottom
anchors.left: artistLabel.left
height: textFieldHeight
}
Label {
id: titleLabel
text: qsTr('Title')
anchors.top: artistName.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: artistName.left
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
}
TextField {
id: titleName
width: cddbSearchResultsView.width
anchors.top: titleLabel.bottom
anchors.left: titleLabel.left
height: textFieldHeight
}
Label {
id: tracksLabel
text: qsTr('Tracks')
anchors.top: titleName.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: titleName.left
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
}
TableView {
id: cddbAlbumView
model: cddbAlbumModel
anchors.top: tracksLabel.bottom
anchors.left: tracksLabel.left
frameVisible: false
sortIndicatorVisible: false
width: cddbSearchResultsView.width
height: 135
anchors.leftMargin: 0
Connections {
target: QtCdParanoia
onCddbTrackInfo: cddbAlbumModel.append(result)
}
TableViewColumn {
role: "track"
title: qsTr('#')
width: 30
horizontalAlignment: 3
}
TableViewColumn {
role: "length"
title: qsTr('Length')
width: 70
}
TableViewColumn {
role: "title"
title: qsTr('Title')
width: 500
delegate: TextInput {
text: styleData.value
}
}
}
RoundButton {
id: pickMusicHome
height: mainWindow.buttonHeight
radius: mainWindow.buttonRadius
text: qsTr("Choose")
anchors.top: cddbAlbumView.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: cddbAlbumView.left
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
ToolTip.visible: hovered
ToolTip.delay: 2000
ToolTip.text: qsTr("Choose a home directory for music imports.")
Text {
id: musicHome
text: qsTr("Select Music Home Directory.")
width: parent.width - pickMusicHome.width - (2 * horizontalMargin)
anchors.verticalCenter: pickMusicHome.verticalCenter
anchors.left: pickMusicHome.right
anchors.leftMargin: 10
font.family: mainWindow.fontFamily
font.pointSize: mainWindow.fontSize
}
}
RoundButton {
id: importMusic
height: mainWindow.buttonHeight
radius: mainWindow.buttonRadius
text: qsTr("Import")
anchors.top: pickMusicHome.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: cddbAlbumView.left
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
ToolTip.visible: hovered
ToolTip.delay: 2000
ToolTip.text: qsTr("Import tracks as WAV files.")
}
RoundButton {
id: cancelImportMusic
height: mainWindow.buttonHeight
radius: mainWindow.buttonRadius
text: qsTr("Cancel Import")
anchors.top: pickMusicHome.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: importMusic.right
anchors.leftMargin: 75
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
ToolTip.visible: hovered
ToolTip.delay: 2000
ToolTip.text: qsTr("Stop writing tracks as WAV files.")
}
Label {
id: trackWriteStatusLabel
text: qsTr('Track Write Status')
anchors.top: importMusic.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: importMusic.left
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
}
Frame {
id: cddbSearchResultsFrame
objectName: "cddbSearchResultsFrame"
width: cddbSearchResultsView.width
height: 100
padding: 1
anchors.top: trackWriteStatusLabel.bottom
anchors.topMargin: mainWindow.topMargin
anchors.left: trackWriteStatusLabel.left
background: Rectangle {
color: "transparent"
border.color: "#9E9E9E"
border.width: 1
radius: 1
}
Flickable {
id: importStatusView
objectName: "importStatusView"
anchors.fill: parent
clip: true
contentWidth: parent.width
contentHeight: importStatus.contentHeight + 20
Rectangle {
color: "#FFFFFF"
width: importStatusView.width
height: importStatusView.contentHeight
Text {
id: importStatus
objectName: "importStatus"
padding: 5
wrapMode: Text.WordWrap
width: cddbSearchResultsView.width - 10
text: "\n\n\n\n\n"
font.family: mainWindow.fontFamily
font.capitalization: mainWindow.fontCapitalization
font.pointSize: mainWindow.fontSize
}
}
}
}
Connections {
target: QtCdParanoia
onUpdateStatus: importStatus.text += "\n" + text
}
}
}