C

Qt Quick Ultralite Automotive Cluster Demo

// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial

import QtQuick 2.15

Image {
    property int limit
    visible: limit != SpeedLimitValues.None
    source: {
        switch (limit) {
        case SpeedLimitValues.VerySlow:
            return "images/speed-limit-warnings/20mph.png"
        case SpeedLimitValues.Slow:
            return "images/speed-limit-warnings/35mph.png"
        case SpeedLimitValues.Medium:
            return "images/speed-limit-warnings/45mph.png"
        case SpeedLimitValues.Fast:
            return "images/speed-limit-warnings/55mph.png"
        default:
            return "images/speed-limit-warnings/85mph.png"
        }
    }
}