Warning, /education/kstars/kstars/kstarslite/qml/modules/popups/ProjectionsPopup.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick.Controls 2.0 0005 import QtQuick 2.6 0006 import QtQuick.Layouts 1.1 0007 import "../../constants" 1.0 0008 import "../../modules" 0009 import KStarsLiteEnums 1.0 0010 0011 Popup { 0012 id: projPopup 0013 focus: true 0014 modal: true 0015 width: projList.implicitWidth 0016 height: parent.height > projList.implicitHeight ? projList.implicitHeight : parent.height 0017 0018 background: Rectangle { 0019 anchors.fill: parent 0020 color: Num.sysPalette.base 0021 } 0022 0023 KSListView { 0024 id: projList 0025 anchors { 0026 fill: parent 0027 centerIn: parent 0028 } 0029 checkCurrent: true 0030 0031 model: ListModel { 0032 id: projModel 0033 Component.onCompleted: { 0034 projModel.append({ name: xi18n("Lambert (Default)"), proj: Projection.Lambert }); 0035 projModel.append({ name: xi18n("Azimuthal Equidistant"), proj: Projection.AzimuthalEquidistant }); 0036 projModel.append({ name: xi18n("Orthographic"), proj: Projection.Orthographic }); 0037 projModel.append({ name: xi18n("Equirectangular"), proj: Projection.Equirectangular }); 0038 projModel.append({ name: xi18n("Stereographic"), proj: Projection.Stereographic }); 0039 projModel.append({ name: xi18n("Gnomonic"), proj: Projection.Gnomonic }); 0040 0041 //Initialize projector 0042 for(var i = 0; i < projList.model.count; ++i) { 0043 if(projList.model.get(i).proj == SkyMapLite.projType()) { 0044 projList.currentIndex = i 0045 } 0046 } 0047 } 0048 } 0049 0050 onClicked: { 0051 var item = projModel.get(projList.currentIndex) 0052 KStarsLite.setProjection(item.proj) 0053 skyMapLite.notification.showNotification("Set projection system to " 0054 + item.name) 0055 close() 0056 } 0057 0058 textRole: "name" 0059 } 0060 }