Add volume control

This commit is contained in:
Anika Raemer 2021-03-14 14:42:32 +01:00
parent 5d5e3c6888
commit 4a83f971f3
14 changed files with 144 additions and 32 deletions

31
LenaPi/VolumeSlider.qml Normal file
View file

@ -0,0 +1,31 @@
import QtQuick 2.0
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
ColumnLayout {
property alias from: slider.from
property alias to: slider.to
property alias stepSize: slider.stepSize
property alias value: slider.value
spacing: 5
RoundImageButton{
id: increaseButton
imageSource: "qrc:///icon_increase_volume"
onClicked: slider.increase();
}
Slider{
id: slider
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
orientation: Qt.Vertical
from: 34 // we cannot hear anything if lower than 35%
to: 100
stepSize: 1
value: 50
}
RoundImageButton{
id: decreaseButton
imageSource: "qrc:///icon_decrease_volume"
onClicked: slider.decrease();
}
}