C

Qt Quick Ultralite tvii_effects Example

/****************************************************************************** ** ** Copyright (C) 2021 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.12 import QtQuickUltralite.Extras 2.0 import Automotive 1.0 import TviiEffects 1.0 Rectangle { id: root width: 800 height: 480 color: "black" property real t: 0 SequentialAnimation on t { running: true loops: Animation.Infinite NumberAnimation { from: 0 to: 1 easing.type: Easing.InOutSine duration: 4500 } NumberAnimation { from: 1 to: 0 easing.type: Easing.InOutSine duration: 4500 } } Gauge { id: gauge x: 5 anchors.verticalCenter: parent.verticalCenter value: t * Units.maximumSpeed maxValue: Units.maximumSpeed textLabel: Units.speedUnit } Row { x: gauge.width - 20 height: parent.height padding: 5 spacing: 5 GaussianBlur { anchors.verticalCenter: parent.verticalCenter width: 128 height: 128 source: "images/juno.png" blur: 2.5 * t } Desaturation { anchors.verticalCenter: parent.verticalCenter width: 128 height: 128 source: "images/ak.png" saturation: 1 - t } Column { anchors.verticalCenter: parent.verticalCenter padding: 20 Image { source: "images/cover.jpg" } ImageWithOpacityMask { source: "images/cover.jpg" mask: "images/opacity-mask.png" transform: [ Scale { yScale: -1 }, Translate { y: 128 } ] } } } }