summaryrefslogtreecommitdiffstats
path: root/app/VolumeSlider.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/VolumeSlider.qml')
-rw-r--r--app/VolumeSlider.qml44
1 files changed, 44 insertions, 0 deletions
diff --git a/app/VolumeSlider.qml b/app/VolumeSlider.qml
new file mode 100644
index 0000000..56881b7
--- /dev/null
+++ b/app/VolumeSlider.qml
@@ -0,0 +1,44 @@
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 2.0
+
+RowLayout {
+ property int value
+ property string role
+
+ onRoleChanged: sliderName.text = role
+ onValueChanged: {
+ sliderValue.text = value + " %"
+ sliderControl.value = value;
+ }
+
+ //id: slider_" + name + "
+ Layout.minimumHeight: 75
+ Label {
+ id: sliderName
+ font.pixelSize: 24
+ text: role
+ Layout.minimumWidth: 150
+ }
+ Label {
+ id: sliderValue
+ //id: slider_" + name + "_textvalue
+ font.pixelSize: 24
+ text: "0 %"
+ }
+ Slider {
+ id: sliderControl
+ //id: slider_" + name + "_slider
+ Layout.fillWidth: true
+ from: 0
+ to: 100
+ stepSize: 1
+ snapMode: Slider.SnapOnRelease
+ onValueChanged: {
+ //slider_" + name + "_textvalue.text = value + \" %\"
+ //mixer.setVolume(\"" + name + "\", value)
+ }
+ //Component.onCompleted: {
+ //mixer.getVolume(\"" + name + "\")
+ //}
+ }
+}