5import QtQuick.Layouts 1.1
6import QtQuick.Controls 2.0
7import QtQuick.Controls.Material 2.0
8import QtQuick.Controls.Universal 2.0
10import QtQuick.Window 2.2
11import "../constants" 1.0
13import KStarsLiteEnums 1.0
18 property int padding: 10
19 property double openOffset: -topBar.background.radius
20 property double closedOffset: -topBar.height
21 property string prevState
36 property alias state : topMenu.state
39 x: (parent.width - width)/2
41 Layout.fillHeight: true
42 width: parent.width < menuFlow.childrenWidth ? parent.width : menuFlow.childrenWidth
71 PropertyAnimation { target: topMenu
76 PropertyAnimation { target: topMenu
81 PropertyAnimation { target: topMenu
88 anchors.horizontalCenter: parent.horizontalCenter
89 implicitWidth: parent.width
90 Layout.fillHeight:
true
92 background: Rectangle {
94 color: Num.sysPalette.base
97 color: Num.sysPalette.light
106 property double childrenWidth: 0
108 Component.onCompleted: {
109 if(
Qt.platform.os ==
"android") {
111 var columnForTab =
Qt.createQmlObject(
'import QtQuick 2.7
115 iconSrc: "../../images/kstars_automode.png"
116 title: xi18n("Automatic mode")
118 visible: Qt.platform.os == "android"
120 toggled: SkyMapLite.automaticMode
122 SkyMapLite.automaticMode = !SkyMapLite.automaticMode
127 for(var i = 0; i < children.length; ++i) {
128 childrenWidth += children[i].width + spacing
130 childrenWidth += topBar.padding*2
135 topMargin: menuRect.radius/2
137 Layout.fillHeight:
true
140 iconSrc:
"../../images/kstars_stars.png"
141 title:
xi18n(
"Stars")
143 toggled:
KStarsLite.isToggled(ObjectsToToggle.Stars)
149 iconSrc:
"../../images/kstars_deepsky.png"
150 title:
xi18n(
"DeepSky Objects")
152 toggled:
KStarsLite.isToggled(ObjectsToToggle.DeepSky)
158 iconSrc:
"../../images/kstars_planets.png"
159 title:
xi18n(
"Solar System")
162 toggled:
KStarsLite.isToggled(ObjectsToToggle.Planets)
168 iconSrc:
"../../images/kstars_supernovae.png"
169 title:
xi18n(
"Supernovae")
171 toggled:
KStarsLite.isToggled(ObjectsToToggle.Supernovae)
177 iconSrc:
"../../images/kstars_satellites.png"
178 title:
xi18n(
"Satellites")
180 toggled:
KStarsLite.isToggled(ObjectsToToggle.Satellites)
186 iconSrc:
"../../images/kstars_clines.png"
187 title:
xi18n(
"Constellation Lines")
189 toggled:
KStarsLite.isToggled(ObjectsToToggle.CLines)
195 iconSrc:
"../../images/kstars_cnames.png"
196 title:
xi18n(
"Constellation Names")
198 toggled:
KStarsLite.isToggled(ObjectsToToggle.CNames)
205 iconSrc:
"../../images/kstars_constellationart.png"
206 title:
xi18n(
"Constellation Art")
209 toggled:
KStarsLite.isToggled(ObjectsToToggle.ConstellationArt)
216 iconSrc:
"../../images/kstars_cbound.png"
217 title:
xi18n(
"Constellation Bounds")
219 toggled:
KStarsLite.isToggled(ObjectsToToggle.CBounds)
225 iconSrc:
"../../images/kstars_mw.png"
226 title:
xi18n(
"Milky Way")
235 iconSrc:
"../../images/kstars_grid.png"
236 title:
xi18n(
"Equatorial Grid")
239 toggled:
KStarsLite.isToggled(ObjectsToToggle.EquatorialGrid)
245 iconSrc:
"../../images/kstars_hgrid.png"
246 title:
xi18n(
"Horizontal Grid")
249 toggled:
KStarsLite.isToggled(ObjectsToToggle.HorizontalGrid)
255 iconSrc:
"../../images/kstars_horizon.png"
256 title:
xi18n(
"Horizon")
259 toggled:
KStarsLite.isToggled(ObjectsToToggle.Ground)
270 horizontalCenter: parent.horizontalCenter
273 source:
"../images/arrow.png"
275 if(topMenu.state ==
"closed")
277 else if(topMenu.state ==
"open")
283 objectName:
"arrowDownMouseArea"
286 topMenu.state = topMenu.state ==
"closed" ?
"open" :
"closed"
288 function manualPress() {
293 Behavior on rotation {
295 duration: 200; direction: RotationAnimation.Counterclockwise
This class loads QML files and connects SkyMapLite and KStarsData Unlike KStars class it is not a mai...
Class that handles drawing of MilkyWay (both filled and non-filled)
This is the main item that displays all SkyItems.
bool slewing
true if SkyMapLite is being panned
Q_INVOKABLE void toggleObjects(ObjectsToToggle toToggle, bool toggle)
toggles on/off objects of group toToggle
QString xi18n(const char *text, const TYPE &arg...)
QString name(GameStandardAction id)