Kstars

Led.qml
1 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 
4 import QtQuick 2.6
5 import "../../constants" 1.0
6 
7 Image {
8  property string color: "grey"
9  width: 16 * Num.dp
10  height: 16 * Num.dp
11  sourceSize.height: 16 * Num.dp
12  sourceSize.width: 16 * Num.dp
13 
14  source: "images/" + Num.density + "/grey.png"
15  onColorChanged: {
16  if(color == "red") {
17  source = "images/" + Num.density + "/red.png"
18  } else if(color == "green") {
19  source = "images/" + Num.density + "/green.png"
20  } else if(color == "yellow") {
21  source = "images/" + Num.density + "/yellow.png"
22  } else if(color == "grey") {
23  source = "images/" + Num.density + "/grey.png"
24  }
25  }
26 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 04:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.