diff options
Diffstat (limited to 'tradeshow/iot-sensortag/resources/base/main.qml')
-rw-r--r-- | tradeshow/iot-sensortag/resources/base/main.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tradeshow/iot-sensortag/resources/base/main.qml b/tradeshow/iot-sensortag/resources/base/main.qml index c55d8ee..2840433 100644 --- a/tradeshow/iot-sensortag/resources/base/main.qml +++ b/tradeshow/iot-sensortag/resources/base/main.qml @@ -58,6 +58,7 @@ Window { property alias contentFile: contentLoader.source property DataProviderPool dataProviderPool property SeriesStorage seriesStorage + property real globalBlinkOpacity: 1.0 // Size defaults to the small display width: 1920 @@ -76,4 +77,40 @@ Window { anchors.fill: parent anchors.centerIn: parent } + + + + function startBlink() { + flash.blinkers++; + } + + function stopBlink() { + flash.blinkers--; + } + + // Animation to allow synchronized + // blinking of BlinkingIcons + SequentialAnimation { + id: flash + + property int blinkers: 0 + + running: blinkers + loops: Animation.Infinite + alwaysRunToEnd: true + + PropertyAnimation { + target: mainWindow + property: "globalBlinkOpacity" + to: 0.3 + duration: 700 + } + + PropertyAnimation { + target: mainWindow + property: "globalBlinkOpacity" + to: 1 + duration: 700 + } + } } |