Warning, /education/marble/src/plasma/applets/worldclock/package/contents/ui/configMapDisplay.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.Controls 1.0 as QtControls
0008 import QtQuick.Layouts 1.0
0009 
0010 ColumnLayout {
0011     id: mapDisplayPage
0012 
0013     property int cfg_projection: plasmoid.configuration.projection // Enum needs manual set/get for now
0014     property int cfg_centerMode: plasmoid.configuration.centerMode // Enum needs manual set/get for now
0015     property alias cfg_fixedLongitude: longitudeSpinBox.value
0016     property alias cfg_showDate: showDateCheckBox.checked
0017 
0018     GridLayout {
0019         columns: 2
0020 
0021         QtControls.Label {
0022             Layout.row: 0
0023             Layout.column: 0
0024             Layout.alignment: Qt.AlignRight
0025             anchors {
0026                 verticalCenter: projectionComboBox.verticalCenter
0027             }
0028             text: i18n("Projection:")
0029         }
0030 
0031         QtControls.ComboBox {
0032             id: projectionComboBox
0033             Layout.row: 0
0034             Layout.column: 1
0035             model: [
0036                 i18n("Equirectangular"),
0037                 i18n("Mercator")
0038             ]
0039             onCurrentIndexChanged: {
0040                 cfg_projection = currentIndex;
0041             }
0042             Component.onCompleted: {
0043                 currentIndex = plasmoid.configuration.projection;
0044             }
0045         }
0046 
0047         QtControls.Label {
0048             Layout.row: 1
0049             Layout.column: 0
0050             Layout.alignment: Qt.AlignRight
0051             anchors {
0052                 verticalCenter: centerModeComboBox.verticalCenter
0053             }
0054             text: i18n("Center on:")
0055         }
0056 
0057         QtControls.ComboBox {
0058             id: centerModeComboBox
0059             Layout.row: 1
0060             Layout.column: 1
0061             model: [
0062                 i18n("Daylight"),
0063                 i18n("Longitude"),
0064                 i18n("Location")
0065             ]
0066             onCurrentIndexChanged: {
0067                 cfg_centerMode = currentIndex;
0068             }
0069             Component.onCompleted: {
0070                 currentIndex = plasmoid.configuration.centerMode;
0071             }
0072         }
0073 
0074         QtControls.Label {
0075             Layout.row: 3
0076             Layout.column: 0
0077             Layout.alignment: Qt.AlignRight
0078             anchors {
0079                 verticalCenter: longitudeSpinBox.verticalCenter
0080             }
0081             enabled: (cfg_centerMode === 1)
0082             text: i18n("Longitude:")
0083         }
0084 
0085         QtControls.SpinBox {
0086             Layout.row: 3
0087             Layout.column: 1
0088             enabled: (cfg_centerMode === 1)
0089             id: longitudeSpinBox
0090             maximumValue: 180.0
0091             minimumValue: -180.0
0092             decimals: 5
0093         }
0094 
0095         QtControls.Label {
0096             Layout.row: 4
0097             Layout.column: 0
0098             Layout.alignment: Qt.AlignRight
0099             text: i18n("Show date:")
0100         }
0101 
0102         QtControls.CheckBox {
0103             Layout.row: 4
0104             Layout.column: 1
0105             id: showDateCheckBox
0106         }
0107     }
0108 
0109     Item { // tighten layout
0110         Layout.fillHeight: true
0111     }
0112 }