24 lines
489 B
QML
24 lines
489 B
QML
pragma Singleton
|
||
import QtQuick
|
||
|
||
QtObject {
|
||
property bool visible: false
|
||
property real value: 0 // 0.0–1.0
|
||
property string icon: ""
|
||
property real itemX: 0
|
||
property var screen: null
|
||
|
||
property Timer _timer: Timer {
|
||
interval: 1500
|
||
onTriggered: visible = false
|
||
}
|
||
|
||
function show(val, ico, x, scr) {
|
||
value = val;
|
||
icon = ico;
|
||
itemX = x;
|
||
screen = scr;
|
||
visible = true;
|
||
_timer.restart();
|
||
}
|
||
}
|