6import QtQuick.Controls 2.0
7import QtQuick.Controls.Material 2.0
9import QtQuick.Window 2.2 as Window
10import QtQuick.Layouts 1.1
13import "modules/helpers"
14import "modules/popups"
16import "modules/tutorial"
21import "dialogs/helpers"
29 width:
Window.Screen.desktopAvailableWidth
30 height:
Window.Screen.desktopAvailableHeight
34 property bool isLoaded:
false
35 property bool isPortrait: width < height ?
true:
false
36 property bool isSkyMapVisible: stackView.currentItem == initPage
42 if(
KStarsLite.runTutorial) tutorialPopup.open()
48 Material.foreground:
"white"
49 height: stackView.currentItem != initPage ? backButton.height : 0
50 visible: stackView.currentItem != initPage
60 easing.type: Easing.InOutQuad
74 horizontalAlignment: Image.AlignHCenter
75 verticalAlignment: Image.AlignVCenter
76 source:
"images/back.png"
79 if(stackView.depth != 1) stackView.pop()
85 text: stackView.currentItem.title
88 width: parent.width - backButton.width - toolRow.spacing
90 elide: Label.ElideRight
94 anchors.verticalCenter: parent.verticalCenter
111 initialItem: initPage
135 y: (
window.height - height)/2
162 title:
xi18n(
"Sky Map")
186 x: (
window.width - width)/2
187 y: (
window.height - height)/2
192 x: (
window.width - width)/2
193 y: (
window.height - height)/2
198 x: (
window.width - width)/2
199 y: (
window.height - height)/2
204 x: (
window.width - width)/2
205 y: (
window.height - height)/2
209 id: tutorialExitPopup
210 x: (
window.width - width)/2
211 y: (
window.height - height)/2
217 x: (
window.width - width)/2
218 y: (
window.height - height)/2
223 x: (
window.width - width)/2
224 y: (
window.height - height)/2
229 objectName:
"globalDrawer"
233 dragMargin: isLoaded ?
Qt.styleHints.startDragDistance : -
Qt.styleHints.startDragDistance
234 background: Rectangle {
236 color: Num.sysPalette.base
240 contextDrawer.close()
245 source:
"images/kstars.png"
246 fillMode: Image.PreserveAspectFit
260 top: drawerBanner.bottom
262 bottom: parent.bottom
266 id: globalDrawerControl
269 horizontalCenter: parent.horizontalCenter
270 bottom: parent.bottom
272 width: parent.width - 10
277 contentItem: KSText {
278 rightPadding: globalDrawerControl.spacing
279 text: globalDrawerControl.text
280 font: globalDrawerControl.font
281 elide: Text.ElideRight
282 visible: globalDrawerControl.text
283 horizontalAlignment: Text.AlignLeft
284 verticalAlignment: Text.AlignVCenter
288 text: model.objID.title
290 if(stackView.currentItem != model.objID) {
291 if(model.objID != initPage) {
292 stackView.replace(null, [initPage, model.objID])
294 stackView.replace(null, initPage)
301 property ListModel drawerModel : ListModel {
303 Component.onCompleted: {
304 append({objID: initPage});
305 append({objID: indiControlPanel});
306 append({objID: findDialog});
307 append({objID: locationDialog});
308 append({objID: aboutDialog});
314 ScrollIndicator.vertical: ScrollIndicator { }
319 property bool step1:
false
320 property bool step2:
false
321 property bool step3:
false
322 property bool step4:
false
323 property bool step5:
false
325 function askExitTutorial() {
326 tutorialExitPopup.open()
329 function exitTutorial() {
331 tutorialPopup.close()
356 objectName:
"contextDrawer"
360 dragMargin: isSkyMapVisible && isLoaded ?
Qt.styleHints.startDragDistance + 15 : -
Qt.styleHints.startDragDistance
362 background: Rectangle {
364 color: Num.sysPalette.base
380 text: stackView.currentItem.title
387 top: contextTitle.bottom
389 bottom: parent.bottom
395 id: contextDrawerControl
398 horizontalCenter: parent.horizontalCenter
399 bottom: parent.bottom
401 width: parent.width - 10
409 if(model.type ==
"popup") {
413 contextDrawer.close()
416 contentItem: KSText {
417 rightPadding: contextDrawerControl.spacing
418 text: contextDrawerControl.text
419 font: contextDrawerControl.font
420 elide: Text.ElideRight
421 visible: contextDrawerControl.text
422 horizontalAlignment: Text.AlignLeft
423 verticalAlignment: Text.AlignVCenter
427 property ListModel drawerModel : ListModel {
429 Component.onCompleted: {
430 append({title:
xi18n(
"Projection systems"), objID: projPopup,
type:
"popup"});
431 append({title:
xi18n(
"Color Schemes"), objID: colorSchemePopup,
type:
"popup"});
432 append({title:
xi18n(
"FOV Symbols"), objID: fovPopup,
type:
"popup"});
436 ScrollIndicator.vertical: ScrollIndicator { }
443 bottom: parent.bottom
455 property color magnitudeColor: colorSchemePopup.currentCScheme ==
"cs_night" ?
"white" :
"black"
460 bottom: smallestMag.bottom
466 color: magnitudeRow.magnitudeColor
471 horizontalCenter: parent.horizontalCenter
472 bottom: smallestMag.bottom
478 color: magnitudeRow.magnitudeColor
486 verticalCenter: parent.bottom
492 color: magnitudeRow.magnitudeColor
518 if (
Qt.platform.os ==
"android") {
519 if(stackView.depth > 1) {
520 close.accepted =
false;
Dialog window for finding SkyObjects by name.
This class loads QML files and connects SkyMapLite and KStarsData Unlike KStars class it is not a mai...
Dialog for changing the geographic location of the observer.
This is the main item that displays all SkyItems.
double magLim
magnitude limit.
QString xi18n(const char *text, const TYPE &arg...)
Type type(const QSqlDatabase &db)
KGUIADDONS_EXPORT QWindow * window(QObject *job)
const QList< QKeySequence > & close()
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)