C

Qt Quick Ultralite Thermostat Demo

/****************************************************************************** ** ** Copyright (C) 2023 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Ultralite module. ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ******************************************************************************/
import QtQuick 2.15 import Thermo 1.0 Item { id: root property int selected: GlobalState.statsContentViewIndex Image { source: "stats-month.png" visible: !selected } Image { source: "stats-year.png" visible: selected } Text { color: ColorStyle.greyDark1 font.pixelSize: Theme.statsViewChartLabelFontSize horizontalAlignment: Text.AlignHCenter //% "Jan" text: selected ? qsTrId("id-jan") : //% "05/11" qsTrId("id-0511") width: 30 x: Theme.isBig ? 149 : 87 y: Theme.isBig ? 278 : 160 } Text { color: ColorStyle.greyDark1 font.pixelSize: Theme.statsViewChartLabelFontSize horizontalAlignment: Text.AlignHCenter //% "Feb" text: selected ? qsTrId("id-feb") : //% "05/12" qsTrId("id-0512") width: 30 x: Theme.isBig ? 254 : 150 y: Theme.isBig ? 278 : 160 } Text { color: ColorStyle.greyDark1 font.pixelSize: Theme.statsViewChartLabelFontSize horizontalAlignment: Text.AlignHCenter //% "Mar" text: selected ? qsTrId("id-mar") : //% "05/13" qsTrId("id-0513") width: 30 x: Theme.isBig ? 361 : 213 y: Theme.isBig ? 278 : 160 } Text { color: ColorStyle.greyDark1 font.pixelSize: Theme.statsViewChartLabelFontSize horizontalAlignment: Text.AlignHCenter //% "Apr" text: selected ? qsTrId("id-apr") : //% "05/14" qsTrId("id-0514") width: 30 x: Theme.isBig ? 468 : 276 y: Theme.isBig ? 278 : 160 } Text { color: ColorStyle.greyDark1 font.pixelSize: Theme.statsViewChartLabelFontSize horizontalAlignment: Text.AlignHCenter //% "May" text: selected ? qsTrId("id-may") : //% "05/15" qsTrId("id-0515") width: 30 x: Theme.isBig ? 575 : 339 y: Theme.isBig ? 278 : 160 } Text { color: ColorStyle.greyDark1 font.pixelSize: Theme.statsViewChartLabelFontSize horizontalAlignment: Text.AlignHCenter //% "Jun" text: selected ? qsTrId("id-jun") : //% "05/16" qsTrId("id-0516") width: 30 x: Theme.isBig ? 681 : 402 y: Theme.isBig ? 278 : 160 } }