summaryrefslogtreecommitdiffstats
path: root/tests/manual/sensorclerk/qml/main.qml
blob: 0853599cbc9a2fbbc6284fe983927346e1de293a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2017 Lorn Potter.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Controls
import Collector
import QtSensors

Rectangle {
    Collector {
        id: writer
    }

    Text {
        id: label
        text: "Sensor Clerk<br> push to start and stop<br> sensor dump";
        anchors.horizontalCenter: parent.horizontalCenter
    }

    Button {
        id: startCollectingButton
        text: depressed ? "Stop" : "Start"
        property bool depressed: false
        anchors.top: label.bottom
        enabled: true;
        anchors.horizontalCenter: parent.horizontalCenter
        onClicked: {
            if (!depressed) {
                writer.startCollecting()
                depressed = true
            } else {
                writer.stopCollecting()
                depressed = false
            }
        }
    }

}