Warning, /education/kstars/kstars/kstarslite/qml/indi/modules/Led.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 2.6 0005 import "../../constants" 1.0 0006 0007 Image { 0008 property string color: "grey" 0009 width: 16 * Num.dp 0010 height: 16 * Num.dp 0011 sourceSize.height: 16 * Num.dp 0012 sourceSize.width: 16 * Num.dp 0013 0014 source: "images/" + Num.density + "/grey.png" 0015 onColorChanged: { 0016 if(color == "red") { 0017 source = "images/" + Num.density + "/red.png" 0018 } else if(color == "green") { 0019 source = "images/" + Num.density + "/green.png" 0020 } else if(color == "yellow") { 0021 source = "images/" + Num.density + "/yellow.png" 0022 } else if(color == "grey") { 0023 source = "images/" + Num.density + "/grey.png" 0024 } 0025 } 0026 }