osd for volume and brightness
This commit is contained in:
parent
a53616523b
commit
ab2eb2578e
6 changed files with 104 additions and 0 deletions
20
modules/OsdState.qml
Normal file
20
modules/OsdState.qml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
property bool visible: false
|
||||
property real value: 0 // 0.0–1.0
|
||||
property string icon: ""
|
||||
|
||||
property Timer _timer: Timer {
|
||||
interval: 1500
|
||||
onTriggered: visible = false
|
||||
}
|
||||
|
||||
function show(val, ico) {
|
||||
value = val;
|
||||
icon = ico;
|
||||
visible = true;
|
||||
_timer.restart();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue