summaryrefslogtreecommitdiffstats
path: root/examples/sensors/sensorsshowcase/ProgressXYZBar.qml
blob: be7bf7aeb426726d8c54c42d1c34f5ba30fde713 (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
40
41
42
43
44
45
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

ColumnLayout {
    id: root
    spacing: 0

    required property int fontSize
    property alias xText: xBar.text
    property alias xValue: xBar.value
    property alias yText: yBar.text
    property alias yValue: yBar.value
    property alias zText: zBar.text
    property alias zValue: zBar.value

    component NamedProgressBar: ColumnLayout {
        property alias text: axes.text
        property alias value: bar.value
        Text {
            id: axes
            font.pixelSize: root.fontSize
            Layout.fillWidth: true
        }
        ProgressBar {
            id: bar
            Layout.fillWidth: true
        }
    }

    NamedProgressBar {
        id: xBar
    }

    NamedProgressBar {
        id: yBar
    }

    NamedProgressBar {
        id: zBar
    }
}