5import QtQuick.Layouts 1.1
6import QtQuick.Controls 2.0
7import QtQuick.Controls.Material 2.0
8import QtQuick.Controls.Universal 2.0
9import QtQuick.Window 2.2
11import TelescopeLiteEnums 1.0
12import "../constants" 1.0
17 objectName:
"bottomMenu"
18 property int padding: 10
19 property bool telescope:
false
20 property int slewCount: 1
21 property alias sliderValue: slider.value
23 property double openOffset: bottomMenu.height - bottomBar.background.radius
24 property double closedOffset: arrowUp.height + padding
25 property string prevState
27 property bool isWindowWidthSmall:
window.
width < menuGrid.maxWidth
43 property alias state : bottomMenu.state
46 x: (parent.width - width)/2
48 Layout.fillHeight: true
55 y: parent.height - openOffset
62 y: parent.height - closedOffset
77 PropertyAnimation { target: bottomMenu
82 PropertyAnimation { target: bottomMenu
87 PropertyAnimation { target: bottomMenu
95 horizontalCenter: parent.horizontalCenter
98 source:
"../images/arrow.png"
100 if(bottomMenu.state ==
"closed")
102 else if(bottomMenu.state ==
"open")
109 objectName:
"arrowUpMouseArea"
112 bottomMenu.state = bottomMenu.state ==
"closed" ?
"open" :
"closed"
114 function manualPress() {
119 Behavior on rotation {
121 duration: 200; direction: RotationAnimation.Counterclockwise
128 bottom: bottomBar.top
129 horizontalCenter: parent.horizontalCenter
131 visible: bottomMenu.telescope
135 background: Rectangle {
139 width: control.availableWidth
140 height: implicitHeight
145 width: control.visualPosition * parent.width
146 height: parent.height
154 to: bottomMenu.slewCount-1
156 snapMode: Slider.SnapOnRelease
159 slewLabel.text =
ClientManagerLite.getTelescope().getSlewRateLabels()[slider.value]
163 if (slider.pressed)
return
179 anchors.horizontalCenter: parent.horizontalCenter
181 background: Rectangle {
183 color: Num.sysPalette.base
186 color: Num.sysPalette.light
193 property double maxWidth: {width}
196 if(width > maxWidth) maxWidth = width
200 bottom: parent.bottom
201 bottomMargin: menuRect.radius/2
203 rows: isWindowWidthSmall ? 2 : 1
204 flow: isWindowWidthSmall ? GridLayout.TopToBottom : GridLayout.LeftToRight
206 Layout.fillWidth:
true
209 Layout.fillHeight:
true
210 Layout.fillWidth:
true
218 iconSrc:
"../../images/telescope-left.png"
219 visible: bottomMenu.telescope
221 ClientManagerLite.getTelescope().moveWE(TelescopeNS.MOTION_WEST, TelescopeCommand.MOTION_START)
224 ClientManagerLite.getTelescope().moveWE(TelescopeNS.MOTION_WEST, TelescopeCommand.MOTION_STOP)
230 iconSrc:
"../../images/telescope-down.png"
231 visible: bottomMenu.telescope && menuGrid.rows == 1
233 ClientManagerLite.getTelescope().moveNS(TelescopeNS.MOTION_SOUTH, TelescopeCommand.MOTION_START)
236 ClientManagerLite.getTelescope().moveNS(TelescopeNS.MOTION_SOUTH, TelescopeCommand.MOTION_STOP)
242 iconSrc:
"../../images/media-skip-backward.png"
257 iconSrc:
"../../images/media-playback-pause.png"
264 iconSrc:
"../../images/media-playback-start.png"
272 startTimer.state =
"on"
274 startTimer.state =
"off"
280 onIsSkyMapVisibleChanged: {
283 startTimer.state =
"off"
290 iconSrc:
"../../images/media-skip-forward.png"
297 anchors.right: parent.right
301 stackView.push(timePage)
303 visible: isWindowWidthSmall
305 iconSrc:
"../../images/appointment-new.png"
309 id: separatorSearchSmall
310 height: decreaseUnitLandscape.height*0.75
311 color: Num.sysPalette.shadow
313 visible: isWindowWidthSmall
318 stackView.push(findDialog)
320 visible: isWindowWidthSmall
322 iconSrc:
"../../images/edit-find.png"
327 iconSrc:
"../../images/telescope-right.png"
328 visible: bottomMenu.telescope && menuGrid.rows == 2
330 ClientManagerLite.getTelescope().moveWE(TelescopeNS.MOTION_EAST, TelescopeCommand.MOTION_START)
333 ClientManagerLite.getTelescope().moveWE(TelescopeNS.MOTION_EAST, TelescopeCommand.MOTION_STOP)
341 Layout.fillHeight:
true
342 Layout.fillWidth:
true
346 iconSrc:
"../../images/telescope-down.png"
347 visible: bottomMenu.telescope && menuGrid.rows == 2
349 ClientManagerLite.getTelescope().moveNS(TelescopeNS.MOTION_SOUTH, TelescopeCommand.MOTION_START)
352 ClientManagerLite.getTelescope().moveNS(TelescopeNS.MOTION_SOUTH, TelescopeCommand.MOTION_STOP)
358 timeSpinBox.decreaseTimeUnit()
360 visible: isWindowWidthSmall
362 iconSrc:
"../../images/arrow-down.png"
372 timeSpinBox.increaseTimeUnit()
375 iconSrc:
"../../images/arrow-up.png"
379 id: decreaseUnitLandscape
381 timeSpinBox.decreaseTimeUnit()
383 visible: !isWindowWidthSmall
385 iconSrc:
"../../images/arrow-down.png"
390 height: decreaseUnitLandscape.height*0.75
391 color: Num.sysPalette.shadow
393 visible: !isWindowWidthSmall
398 stackView.push(timePage)
400 visible: !isWindowWidthSmall
402 iconSrc:
"../../images/appointment-new.png"
406 id: separatorSearchLarge
407 height: decreaseUnitLandscape.height*0.75
408 color: Num.sysPalette.shadow
410 visible: !isWindowWidthSmall
415 stackView.push(findDialog)
417 visible: !isWindowWidthSmall
419 iconSrc:
"../../images/edit-find.png"
424 iconSrc:
"../../images/telescope-up.png"
425 visible: bottomMenu.telescope
427 ClientManagerLite.getTelescope().moveNS(TelescopeNS.MOTION_NORTH, TelescopeCommand.MOTION_START)
430 ClientManagerLite.getTelescope().moveNS(TelescopeNS.MOTION_NORTH, TelescopeCommand.MOTION_STOP)
436 iconSrc:
"../../images/telescope-right.png"
437 visible: bottomMenu.telescope && menuGrid.rows == 1
439 ClientManagerLite.getTelescope().moveWE(TelescopeNS.MOTION_EAST, TelescopeCommand.MOTION_START)
442 ClientManagerLite.getTelescope().moveWE(TelescopeNS.MOTION_EAST, TelescopeCommand.MOTION_STOP)
This class loads QML files and connects SkyMapLite and KStarsData Unlike KStars class it is not a mai...
void slotToggleTimer()
action slot: toggle whether kstars clock is running or not
void slotStepBackward()
action slot: advance one step backward in time
void slotStepForward()
action slot: advance one step forward in time
Q_INVOKABLE bool isActive()
Whether the clock is active or not is a bit complicated by the introduction of "manual mode".
This is the main item that displays all SkyItems.
bool slewing
true if SkyMapLite is being panned
Custom spinbox to handle selection of timestep values with variable units.
KGUIADDONS_EXPORT QWindow * window(QObject *job)
QString name(StandardAction id)
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)