C
Qt Cluster: Rendering and Recovery from Main UI Failure
// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // This file is part of the Qt Safe Renderer module import QtQuick import ClusterDemo Item { property real fuelmeterNeedleRotation: fuelValue * fuelDegreesPerValue property real fuelValue: ValueSource.fuelLevel property real maxValueAngle: 170 property real minValueAngle: 10 property real maximumValue: 100 property real fuelDegreesPerValue: Math.abs((maxValueAngle - minValueAngle) / maximumValue) anchors.right: parent.right anchors.top: parent.top anchors.rightMargin: 436 anchors.topMargin: 93 width: 105 height: 7 rotation: fuelmeterNeedleRotation - 80 Image { // width: 37 // height: 3 anchors.left: parent.left anchors.verticalCenterOffset: 0 anchors.leftMargin: -14 anchors.verticalCenter: parent.verticalCenter source: "image://etc/gaugeNeedleSmall.png" } Behavior on fuelValue { enabled: !ValueSource.automaticDemoMode && startupAnimationsFinished PropertyAnimation { duration: 250 } } }