import QtQuick 2.0 import Sailfish.Silica 1.0 // Copertina: legge api.summary (context property C++), quindi non dipende // dallo scope delle property della pagina principale. CoverBackground { id: cover function t(key) { var v = api.summary[key] return api.formatValue(v) } Label { id: titleLabel anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: Theme.paddingLarge text: qsTr("Aira") color: Theme.primaryColor font.pixelSize: Theme.fontSizeLarge } Column { anchors.centerIn: parent width: parent.width - 2 * Theme.paddingLarge spacing: Theme.paddingSmall Label { width: parent.width horizontalAlignment: Text.AlignHCenter text: cover.t("dhw_current") + " °C" color: Theme.primaryColor font.pixelSize: Theme.fontSizeHuge } Label { width: parent.width horizontalAlignment: Text.AlignHCenter text: qsTr("ACS · obiettivo %1 °C").arg(cover.t("dhw_target")) color: Theme.secondaryColor font.pixelSize: Theme.fontSizeExtraSmall truncationMode: TruncationMode.Fade } Label { width: parent.width horizontalAlignment: Text.AlignHCenter text: qsTr("casa %1 °C · obiettivo %2 °C").arg(cover.t("zone1_temperature")).arg(cover.t("zone1_setpoint")) color: Theme.secondaryColor font.pixelSize: Theme.fontSizeExtraSmall truncationMode: TruncationMode.Fade } } Label { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: Theme.paddingMedium text: qsTr("est. %1 °C").arg(cover.t("outdoor_temperature")) color: Theme.secondaryColor font.pixelSize: Theme.fontSizeExtraSmall } }