Warning, /education/marble/src/plasma/wallpapers/worldmap/contents/ui/config.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-License-Identifier: LGPL-2.1-or-later
0004 */
0005 
0006 import QtQuick 2.1
0007 import QtQuick.Layouts 1.0
0008 import QtQuick.Controls 2.5 as QQC2
0009 import org.kde.kirigami 2.5 as Kirigami
0010 
0011 
0012 Kirigami.FormLayout {
0013     id: root
0014     twinFormLayouts: globalSettingsLayout
0015 
0016     property int cfg_projection: wallpaper.configuration.projection // Enum needs manual set/get for now
0017     property int cfg_centerMode: wallpaper.configuration.centerMode // Enum needs manual set/get for now
0018     property alias cfg_fixedLongitude: longitudeSpinBox.value
0019 
0020     QQC2.ComboBox {
0021         id: projectionComboBox
0022         Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Projection:")
0023         model: [
0024             i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Equirectangular"),
0025             i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Mercator")
0026         ]
0027         onCurrentIndexChanged: {
0028             cfg_projection = currentIndex;
0029         }
0030         Component.onCompleted: {
0031             currentIndex = wallpaper.configuration.projection;
0032         }
0033     }
0034 
0035     QQC2.ComboBox {
0036         id: centerModeComboBox
0037         Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Center on:")
0038         model: [
0039             i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Daylight"),
0040             i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Longitude"),
0041             i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Location")
0042         ]
0043         onCurrentIndexChanged: {
0044             cfg_centerMode = currentIndex;
0045         }
0046         Component.onCompleted: {
0047             currentIndex = wallpaper.configuration.centerMode;
0048         }
0049     }
0050 
0051     QQC2.SpinBox {
0052         id: longitudeSpinBox
0053         Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Longitude:")
0054         from: -180
0055         to: 180
0056         enabled: (cfg_centerMode === 1)
0057     }
0058 }