-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.qml
53 lines (49 loc) · 1.3 KB
/
app.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
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import "components"
ApplicationWindow {
title: "SoundBoard"
visible: true
width: 800
height: 600
header: ToolBar {
RowLayout {
anchors.fill: parent
ComboBox {
model: sounddevices
currentIndex: logicmodel.selected_device
onActivated: logicmodel.sounddevice_changed(currentIndex)
}
Label {
text: qsTr("Sounds")
elide: Label.ElideRight
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
Layout.fillWidth: true
}
RowLayout {
ToolButton {
text: qsTr("-")
onClicked: logicmodel.remove()
}
ToolButton {
text: qsTr("+")
onClicked: logicmodel.add()
}
}
}
}
GridView {
anchors.fill: parent
anchors.margins: 5
cellHeight: 120
cellWidth: 120
model: soundbuttons
delegate: soundbutton.soundbuttoncomponent
SoundButton {
id: soundbutton
handlercontext: logicmodel
}
}
}