Warning, /plasma/kdeplasma-addons/applets/weather/package/contents/ui/config/ConfigUnits.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Friedrich W. H. Kossebau <kossebau@kde.org> 0003 * SPDX-FileCopyrightText: 2022 Ismael Asensio <isma.af@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 import QtQuick 0009 import QtQuick.Controls as QQC2 0010 0011 import org.kde.kirigami as Kirigami 0012 import org.kde.plasma.private.weather 0013 import org.kde.kcmutils as KCM 0014 0015 KCM.SimpleKCM { 0016 property alias cfg_temperatureUnit: temperatureComboBox.unit 0017 property alias cfg_pressureUnit: pressureComboBox.unit 0018 property alias cfg_speedUnit: windSpeedComboBox.unit 0019 property alias cfg_visibilityUnit: visibilityComboBox.unit 0020 0021 Kirigami.FormLayout { 0022 component UnitSelector: QQC2.ComboBox { 0023 property int unit 0024 0025 textRole: "display" 0026 currentIndex: model.listIndexForUnitId(unit) 0027 onActivated: unit = model.unitIdForListIndex(currentIndex) 0028 } 0029 0030 UnitSelector { 0031 id: temperatureComboBox 0032 Kirigami.FormData.label: i18nc("@label:listbox", "Temperature:") 0033 model: TemperatureUnitListModel 0034 } 0035 0036 UnitSelector { 0037 id: pressureComboBox 0038 Kirigami.FormData.label: i18nc("@label:listbox", "Pressure:") 0039 model: PressureUnitListModel 0040 } 0041 0042 UnitSelector { 0043 id: windSpeedComboBox 0044 Kirigami.FormData.label: i18nc("@label:listbox", "Wind speed:") 0045 model: WindSpeedUnitListModel 0046 } 0047 0048 UnitSelector { 0049 id: visibilityComboBox 0050 Kirigami.FormData.label: i18nc("@label:listbox", "Visibility:") 0051 model: VisibilityUnitListModel 0052 } 0053 } 0054 }