diff options
author | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-02-16 08:33:49 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2017-02-28 13:16:09 +0000 |
commit | 35c1c07cd676b9c9afb23ad7266a67d5b6aef03a (patch) | |
tree | d43445955be5f1799ca9bb9db2c6e2cfd7915370 /tradeshow/iot-sensortag/resources/base/main.qml | |
parent | dec3883a1d0d7d24c797cf517fa7fad85b24a1f2 (diff) |
iot-sensortag: Allow reconnect after a failed connection attempt
A disconnected sensor tag can be tried to be reconnected by clicking
on the chart area or starting rescan from the Sensor settings menu.
During a (re)connection process a progress indicator is shown to
the user.
The user has a possibility to disconnect (and reconnect) a
currently connect SensorDataProvider
A new state, 'NotFound' is added in SensorTagDataProvider to
distinguish between states when a Sensor Tag has not been discovered
at all, and when it has already been discovered but is has been
disconnected.
Change-Id: I54eea72d8c92a67a5ccbb3bc192ac8f33ada1c39
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
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 + } + } } |