Warning, /plasma/libksysguard/faces/facepackages/colorgrid/contents/ui/Config.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl>
0003     SPDX-FileCopyrightText: 2022 Kai Uwe Broulik <kde@broulik.de>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 import QtQuick
0009 import QtQuick.Controls
0010 import QtQuick.Layouts
0011 
0012 import org.kde.kirigami as Kirigami
0013 
0014 ColumnLayout {
0015     id: root
0016 
0017     property alias cfg_columnCount: columnCountSpin.value
0018     property alias cfg_useSensorColor: sensorColorCheck.checked
0019 
0020     Kirigami.FormLayout {
0021         id: form
0022 
0023         CheckBox {
0024             id: sensorColorCheck
0025             Kirigami.FormData.label: i18n("Use sensor color:")
0026         }
0027 
0028         SpinBox {
0029             id: columnCountSpin
0030             Kirigami.FormData.label: i18n("Number of Columns:")
0031             editable: true
0032             from: 0
0033             to: 99999
0034 
0035             textFromValue: function(value, locale) {
0036                 if (value <= 0) {
0037                     return i18nc("@label", "Automatic")
0038                 }
0039                 return value.toString()
0040             }
0041 
0042             valueFromText: function(value, locale) {
0043                 return parseInt(value)
0044             }
0045         }
0046     }
0047 }