1import QtQuick 2.5
2import QtQuick.Controls 1.4
3import QtQuick.Layouts 1.1
4import QtQuick.Controls.Styles 1.4
5
6Rectangle {
7    id: rectangle
8    objectName: "mountControlObject"
9
10    color: "#000000"
11
12    property color buttonColor: "silver"
13    property color coordsColor: "gold"
14
15    FontMetrics {
16        id: fontMetrics
17        font.family: "Arial"
18        font.bold: false
19        font.italic: false
20        font.underline:false
21        font.pointSize: 12
22    }
23
24    width:  (Qt.platform.os === "osx") ? fontMetrics.height * 13.5 /.75 : fontMetrics.height * 13.5
25    height: (Qt.platform.os === "osx") ? fontMetrics.height * 29.5 /.75 : fontMetrics.height * 29.5
26
27    MouseArea {
28        anchors.fill: parent
29        onClicked: mountMotionLayout.focus = true
30
31        ColumnLayout {
32            id: mainVerticalLayout
33            anchors.fill: parent
34            anchors.margins: fontMetrics.height * 0.25
35
36            GridLayout {
37                id: mountMotionLayout
38                rowSpacing: fontMetrics.height * 0.05
39                columnSpacing: fontMetrics.height * 0.05
40                Layout.minimumHeight: fontMetrics.height * 8
41                Layout.maximumHeight: fontMetrics.height * 8
42                Layout.minimumWidth: fontMetrics.height * 10
43                Layout.maximumWidth: fontMetrics.height * 10
44                Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
45                columns: 3
46
47                focus: true
48                Keys.onPressed: {
49                    event.accepted = true;
50                    if (!event.isAutoRepeat)
51                        onPressedChanged(event, true);
52                }
53
54                Keys.onReleased: {
55                    event.accepted = true;
56                    if (!event.isAutoRepeat)
57                        onPressedChanged(event, false);
58                }
59
60                function setTimeout(delay_ms, cb) {
61                    var component = Qt.createComponent("timer.qml");
62                    var timer = component.createObject(rectangle, {x: 0, y: 0});
63
64                    if (timer === null) {
65                        console.error("Error creating timer object");
66                    }
67
68                    timer.callback = function() {
69                        cb();
70                        this.destroy();
71                    };
72                    timer.interval = delay_ms;
73                    timer.running = true;
74                }
75
76                property var keyState: ({})
77                 // -1 means not moving
78                property var motionState: ({ns: -1, we: -1})
79                // It appears [Qt.Key_Up] is not a valid subsituion in QML like Javascript in older versions?
80                //property var filteredKeyState: ({[Qt.Key_Up]: false, [Qt.Key_Down]: false, [Qt.Key_Left]: false, [Qt.Key_Right]: false})
81                // Replacing it with direct values and confirmed works with older Qt versions:
82                // true means pressed
83                property var filteredKeyState: {0x13: false, 0x15: false, 0x12: false, 0x14: false}
84                function moveMount() {
85                    var up = filteredKeyState[Qt.Key_Up];
86                    var down = filteredKeyState[Qt.Key_Down];
87                    var left = filteredKeyState[Qt.Key_Left];
88                    var right = filteredKeyState[Qt.Key_Right];
89
90                    var ns = -1;
91                    var we = -1;
92                    if (up !== down) {
93                        if (up){
94                            ns = 0;
95                        } else if (down) {
96                            ns = 1;
97                        }
98                        mount.motionCommand(0, ns, -1);
99                        motionState.ns = ns;
100                    } else if (motionState.ns !== -1) {
101                        mount.motionCommand(1, motionState.ns, -1);
102                        motionState.ns = -1;
103                    }
104                    if (left !== right) {
105                        if (left){
106                            we = 0;
107                        } else if (right) {
108                            we = 1;
109                        }
110                        mount.motionCommand(0, -1, we);
111                        motionState.we = we;
112                    } else if (motionState.we !== -1) {
113                        mount.motionCommand(1, -1, motionState.we);
114                        motionState.we = -1;
115                    }
116
117                    if (ns === 0) {
118                        northRect.opacity = 1;
119                    } else if (ns === 1) {
120                        southRect.opacity = 1;
121                    } else {
122                        northRect.opacity = 0;
123                        southRect.opacity = 0;
124                    }
125                    if (we === 0) {
126                        westRect.opacity = 1;
127                    } else if (we === 1) {
128                        eastRect.opacity = 1;
129                    } else {
130                        westRect.opacity = 0;
131                        eastRect.opacity = 0;
132                    }
133                }
134
135                function deflicker(key, pressed) {
136                    keyState[key] = pressed;
137                    setTimeout(5, function() {
138                        if (pressed === keyState[key] && pressed !== filteredKeyState[key]) {
139                            filteredKeyState[key] = pressed;
140                            moveMount();
141                        }
142                    });
143                }
144
145                function onPressedChanged(event, pressed) {
146                    deflicker(event.key, pressed);
147                }
148
149                Button
150                {
151                    id: northWest
152                    Layout.fillHeight: true
153                    Layout.fillWidth: true
154
155                    Rectangle
156                    {
157                        anchors.fill: parent
158                        color: northWest.pressed ? "red" : rectangle.buttonColor
159                    }
160
161                    onPressedChanged:
162                    {
163                        northWest.pressed ? mount.motionCommand(0, 0, 0) : mount.motionCommand(1, 0, 0);
164                    }
165
166                    onClicked:
167                    {
168                        mountMotionLayout.focus = true;
169                    }
170
171                    Image {
172                        anchors.fill: parent
173                        source: "go-northwest.png"
174                    }
175                }
176
177                Button {
178                    id: north
179                    Layout.fillHeight: true
180                    Layout.fillWidth: true
181
182                    Rectangle
183                    {
184                        anchors.fill: parent
185                        color: north.pressed ? "red" : rectangle.buttonColor
186                    }
187
188                    Rectangle
189                    {
190                        id: northRect
191                        opacity: 0
192                        anchors.fill: parent
193                        color: "red"
194                    }
195
196                    onPressedChanged:
197                    {
198                        north.pressed ? mount.motionCommand(0, 0, -1) : mount.motionCommand(1, 0, -1);
199                    }
200
201                    onClicked:
202                    {
203                        mountMotionLayout.focus = true;
204                    }
205
206                    Image {
207                        anchors.fill: parent
208                        source: "go-north.png"
209                    }
210                }
211
212                Button {
213                    id: northEast
214                    Layout.fillHeight: true
215                    Layout.fillWidth: true
216
217                    Rectangle
218                    {
219                        anchors.fill: parent
220                        color: northEast.pressed ? "red" : rectangle.buttonColor
221                    }
222
223                    onPressedChanged:
224                    {
225                        northEast.pressed ? mount.motionCommand(0, 0, 1) : mount.motionCommand(1, 0, 1);
226                    }
227
228                    onClicked:
229                    {
230                        mountMotionLayout.focus = true;
231                    }
232
233                    Image {
234                        anchors.fill: parent
235                        source: "go-northeast.png"
236                    }
237                }
238
239            Button {
240                    id: west
241                    Layout.fillHeight: true
242                    Layout.fillWidth: true
243
244                    Rectangle
245                    {
246                        anchors.fill: parent
247                        color: west.pressed ? "red" : rectangle.buttonColor
248                    }
249
250                    Rectangle
251                    {
252                        id: westRect
253                        opacity: 0
254                        anchors.fill: parent
255                        color: "red"
256                    }
257
258                    onPressedChanged:
259                    {
260                        west.pressed ? mount.motionCommand(0, -1, 0) : mount.motionCommand(1, -1, 0);
261                    }
262
263                    onClicked:
264                    {
265                        mountMotionLayout.focus = true;
266                    }
267
268                    Image {
269                        anchors.fill: parent
270                        source: "go-west.png"
271                    }
272                }
273
274                Button {
275                    id: stop
276                    Layout.fillHeight: true
277                    Layout.fillWidth: true
278
279                    Rectangle
280                    {
281                        anchors.fill: parent
282                        color: stop.pressed ? "red" : rectangle.buttonColor
283                    }
284
285                    Image {
286                        anchors.fill: parent
287                        source: "stop.png"
288                    }
289
290                    onClicked:
291                    {
292                        mount.abort();
293                        mountMotionLayout.focus = true;
294                    }
295
296
297                }
298
299                Button {
300                    id: east
301                    Layout.fillHeight: true
302                    Layout.fillWidth: true
303
304                    Rectangle
305                    {
306                        anchors.fill: parent
307                        color: east.pressed ? "red" : rectangle.buttonColor
308                    }
309
310                    Rectangle
311                    {
312                        id: eastRect
313                        opacity: 0
314                        anchors.fill: parent
315                        color: "red"
316                    }
317
318                    onPressedChanged:
319                    {
320                        east.pressed ? mount.motionCommand(0, -1, 1) : mount.motionCommand(1, -1, 1);
321                    }
322
323                    onClicked:
324                    {
325                        mountMotionLayout.focus = true;
326                    }
327
328                    Image {
329                        anchors.fill: parent
330                        source: "go-east.png"
331                    }
332                }
333
334                Button {
335                    id: southWest
336                    Layout.fillHeight: true
337                    Layout.fillWidth: true
338
339                    Rectangle
340                    {
341                        anchors.fill: parent
342                        color: southWest.pressed ? "red" : rectangle.buttonColor
343                    }
344
345                    onPressedChanged:
346                    {
347                        southWest.pressed ? mount.motionCommand(0, 1, 0) : mount.motionCommand(1, 1, 0);
348                    }
349
350                    onClicked:
351                    {
352                        mountMotionLayout.focus = true;
353                    }
354
355                    Image {
356                        anchors.fill: parent
357                        source: "go-southwest.png"
358                    }
359                }
360
361                Button {
362                    id: south
363                    Layout.fillHeight: true
364                    Layout.fillWidth: true
365
366                    Rectangle
367                    {
368                        anchors.fill: parent
369                        color: south.pressed ? "red" : rectangle.buttonColor
370                    }
371
372                    Rectangle
373                    {
374                        id: southRect
375                        opacity: 0
376                        anchors.fill: parent
377                        color: "red"
378                    }
379
380                    onPressedChanged:
381                    {
382                        south.pressed ? mount.motionCommand(0, 1, -1) : mount.motionCommand(1, 1, -1);
383                        mountMotionLayout.focus = true;
384                    }
385
386                    Image {
387                        anchors.fill: parent
388                        source: "go-south.png"
389                    }
390                }
391
392                Button {
393                    id: southEast
394                    Layout.fillHeight: true
395                    Layout.fillWidth: true
396
397                    Rectangle
398                    {
399                        anchors.fill: parent
400                        color: southEast.pressed ? "red" : rectangle.buttonColor
401                    }
402
403                    onPressedChanged:
404                    {
405                        southEast.pressed ? mount.motionCommand(0, 1, 1) : mount.motionCommand(1, 1, 1);
406                    }
407
408                    onClicked:
409                    {
410                        mountMotionLayout.focus = true;
411                    }
412
413                    Image {
414                        anchors.fill: parent
415                        source: "go-southeast.png"
416                    }
417                }
418            }
419
420
421            RowLayout {
422                id: mountReverseLayout
423                Layout.fillWidth: true
424                Layout.alignment: Qt.AlignHCenter
425
426                Label
427                {
428                    text: xi18n("Reverse")
429                }
430
431                CheckBox
432                {
433                    id: updownReverse
434                    text: xi18n("Up/Down")
435                    objectName: "upDownCheckObject"
436                    onClicked: mount.setUpDownReversed(checked)
437                }
438
439                CheckBox
440                {
441                    id: leftRightReverse
442                    text: xi18n("Left/Right")
443                    objectName: "leftRightCheckObject"
444                    onClicked: mount.setLeftRightReversed(checked)
445                }
446
447            }
448
449            RowLayout {
450                id: mountSpeedLayout
451                anchors.horizontalCenter: parent.Center
452                Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
453                Layout.fillHeight: false
454                Layout.fillWidth: true
455
456                Slider {
457                    id: speedSlider
458                    x: fontMetrics.height * 0.1
459                    y: 0
460                    width: fontMetrics.height * 1.5
461                    objectName: "speedSliderObject"
462                    Layout.fillWidth: true
463                    Layout.maximumWidth: fontMetrics.height * 7.5
464                    stepSize: 1
465                    minimumValue: 0
466                    maximumValue: 4
467                    value: 0
468
469                    onValueChanged:
470                    {
471                        mount.setSlewRate(speedSlider.value)
472                    }
473                }
474
475                Label {
476                    id: speedLabel
477                    width: fontMetrics.height * 3.75
478                    objectName: "speedLabelObject"
479                    text: xi18n("1x")
480                    horizontalAlignment: Text.AlignHCenter
481                    Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
482                    Layout.maximumWidth: fontMetrics.height * 3.75
483                    Layout.minimumWidth: fontMetrics.height * 3.75
484                    font.weight: Font.Bold
485                    font.bold: true
486                    font.pointSize: 12
487                    font.family: "Verdana"
488                    fontSizeMode: Text.Fit
489                    verticalAlignment: Text.AlignVCenter
490                    Layout.fillWidth: true
491                    color: "white"
492                }
493            }
494
495            GridLayout {
496                id: mountCoordsLayout
497                anchors.horizontalCenter: parent.Center
498                Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
499                Layout.fillWidth: true
500                columns: 4
501
502                MouseArea {
503                    anchors.fill: parent
504                    property bool toggle: false
505                    onClicked: {
506                        if (toggle) {
507                            targetRAText.text = ""
508                            targetDEText.text = ""
509                        }
510                        else {
511                            if (coordGroup.lastChecked == 0) {
512                                targetRAText.text = raValue.text
513                                targetDEText.text = deValue.text
514                            }
515                            if (coordGroup.lastChecked == 1) {
516                                targetRAText.text = azValue.text
517                                targetDEText.text = altValue.text
518                            }
519                            if (coordGroup.lastChecked == 2) {
520                                targetRAText.text = haValue.text
521                                targetDEText.text = deValue.text
522                            }
523                        }
524                        toggle = !toggle
525                    }
526                }
527
528                Label {
529                    id: raLabel
530                    text: xi18n("RA:")
531                    font.bold: true
532                    color: "white"
533                    fontSizeMode: Text.Fit
534                }
535
536                Label {
537                    id: raValue
538                    objectName: "raValueObject"
539                    color: coordsColor
540                    text: "00:00:00"
541                    Layout.fillWidth: true
542                    font.pointSize: 11
543                }
544
545                Label {
546                    id: azLabel
547                    color: "#ffffff"
548                    text: xi18n("AZ:")
549                    Layout.fillWidth: false
550                    fontSizeMode: Text.Fit
551                    font.bold: true
552                }
553
554                Label {
555                    id: azValue
556                    objectName: "azValueObject"
557                    color: coordsColor
558                    text: "00:00:00"
559                    Layout.fillWidth: true
560                    font.pointSize: 11
561                }
562
563                Label {
564                    id: deLabel
565                    color: "#ffffff"
566                    text: xi18n("DE:")
567                    fontSizeMode: Text.Fit
568                    font.bold: true
569                }
570
571                Label {
572                    id: deValue
573                    objectName: "deValueObject"
574                    color: coordsColor
575                    text: "00:00:00"
576                    Layout.fillWidth: true
577                    font.pointSize: 11
578                }
579
580                Label {
581                    id: altLabel
582                    color: "#ffffff"
583                    text: xi18n("AL:")
584                    fontSizeMode: Text.Fit
585                    font.bold: true
586                }
587
588                Label {
589                    id: altValue
590                    objectName: "altValueObject"
591                    color: coordsColor
592                    text: "00:00:00"
593                    Layout.fillWidth: true
594                    font.pointSize: 11
595                }
596
597                Label {
598                    id: haLabel
599                    color: "#ffffff"
600                    text: xi18n("HA:")
601                    fontSizeMode: Text.Fit
602                    font.bold: true
603                }
604
605                Label {
606                    id: haValue
607                    objectName: "haValueObject"
608                    color: coordsColor
609                    text: "00:00:00"
610                    Layout.fillWidth: true
611                    font.pointSize: 11
612                }
613
614                Label {
615                    id: zaLabel
616                    color: "#ffffff"
617                    text: xi18n("ZA:")
618                    fontSizeMode: Text.Fit
619                    font.bold: true
620                }
621
622                Label {
623                    id: zaValue
624                    objectName: "zaValueObject"
625                    color: coordsColor
626                    text: "00:00:00"
627                    Layout.fillWidth: true
628                    font.pointSize: 11
629                }
630            }
631
632            RowLayout
633            {
634                id: targetFindLayout
635                Layout.fillWidth: true
636                Layout.alignment: Qt.AlignHCenter
637
638                Label {
639                    id: targetLabel
640                    color: "#ffffff"
641                    text: xi18n("Target:")
642                    verticalAlignment: Text.AlignVCenter
643                    Layout.fillHeight: true
644                    Layout.fillWidth: false
645                    font.pointSize: 14
646                    font.bold: true
647                }
648
649                TextField {
650                    id: targetText
651                    objectName: "targetTextObject"
652                    placeholderText: "Click Find Icon"
653                    readOnly: true
654                    Rectangle
655                    {
656                        color: "black"
657                        radius: fontMetrics.height * 0.25
658                        anchors.fill: parent
659                        clip: true
660                        opacity: 0.5
661                        border.color: "#D4AF37"
662                        border.width: fontMetrics.height * 0.05
663                    }
664                    verticalAlignment: Text.AlignVCenter
665                    horizontalAlignment: Text.AlignHCenter
666                    Layout.fillHeight: false
667                    Layout.fillWidth: true
668                    font.pointSize: 14
669                    font.bold: true
670                }
671
672                Button {
673                    id: findButton
674                    objectName: "findButtonObject"
675                    Layout.fillWidth: false
676                    iconName: "view-history"
677                    Layout.alignment: Qt.AlignRight
678                    Layout.minimumHeight: fontMetrics.height * 1.4
679                    Layout.maximumHeight: fontMetrics.height * 1.4
680                    Layout.minimumWidth: fontMetrics.height * 1.5
681                    Layout.maximumWidth: fontMetrics.height * 1.5
682                    onClicked:
683                    {
684                        mount.findTarget()
685                    }
686                }
687
688            }
689
690
691            GridLayout {
692                id: targetCoordsLayout
693                Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
694                Layout.fillWidth: true
695                columns: 2
696
697                Label {
698                    id: targetRALabel
699                    objectName: "targetRALabelObject"
700                    color: "#ffffff"
701                    text: xi18n("RA:")
702                    font.pointSize: 14
703                    font.bold: true
704                }
705
706                TextField {
707                    id: targetRAText
708                    objectName: "targetRATextObject"
709                    placeholderText: "HH:MM:SS"
710                    font.pointSize: 14
711                    horizontalAlignment: Text.AlignHCenter
712                    Layout.minimumWidth: fontMetrics.height * 7
713                    clip: true
714                    font.bold: true
715                    Layout.minimumHeight: fontMetrics.height * 1.4
716                    Layout.fillWidth: true
717                }
718
719                Label {
720                    id: targetDELabel
721                    objectName: "targetDELabelObject"
722                    color: "#ffffff"
723                    text: xi18n("DE:")
724                    font.pointSize: 14
725                    font.bold: true
726                }
727
728                TextField {
729                    id: targetDEText
730                    objectName: "targetDETextObject"
731                    placeholderText: "DD:MM:SS"
732                    font.pointSize: 14
733                    width: fontMetrics.height * 7.5
734                    horizontalAlignment: Text.AlignHCenter
735                    Layout.fillHeight: false
736                    Layout.minimumWidth: fontMetrics.height * 7
737                    clip: true
738                    font.bold: true
739                    Layout.minimumHeight: fontMetrics.height * 1.4
740                    Layout.fillWidth: true
741                }
742
743                Label {
744                    id: coordLabel
745                    text: xi18n("Type:")
746                }
747
748                RowLayout
749                {
750                    ExclusiveGroup {
751                        id: coordGroup
752                        objectName: "coordGroupObject"
753                        property int lastChecked: 0
754                        property bool valid: false
755                    }
756
757                    RadioButton {
758                        id: equatorialCheck
759                        objectName: "equatorialCheckObject"
760                        checked: true
761                        text: xi18n("RA/DE")
762                        exclusiveGroup: coordGroup
763                        onCheckedChanged: {
764                            if (checked) {
765                                targetRALabel.text = xi18n("RA:")
766                                targetDELabel.text = xi18n("DE:")
767                                targetRAText.placeholderText = "HH:MM:SS"
768                                if (targetRAText.text == "" ||
769                                    targetDEText.text == "") {
770                                    targetRAText.text = ""
771                                    targetDEText.text = ""
772                                }
773                                else {
774                                    if (coordGroup.lastChecked == 1)
775                                        coordGroup.valid = mount.azAltToRaDec(
776                                            targetRAText.text, targetDEText.text)
777                                    else
778                                        coordGroup.valid = mount.haDecToRaDec(
779                                            targetRAText.text)
780                                    if (!coordGroup.valid) {
781                                        targetRAText.text = ""
782                                        targetDEText.text = ""
783                                    }
784                                }
785                                targetRAText.focus = false
786                                targetDEText.focus = false
787                                coordGroup.lastChecked = 0
788                            }
789                        }
790                    }
791
792                    RadioButton {
793                        id: horizontalCheck
794                        exclusiveGroup: coordGroup
795                        objectName: "horizontalCheckObject"
796                        text: xi18n("AZ/AL")
797                        checked: false
798                        onCheckedChanged: {
799                            if (checked) {
800                                targetText.text = ""
801                                targetRALabel.text = xi18n("AZ:")
802                                targetDELabel.text = xi18n("AL:")
803                                targetRAText.placeholderText = "DDD:MM:SS"
804                                if (targetRAText.text == "" ||
805                                    targetDEText.text == "") {
806                                    targetRAText.text = ""
807                                    targetDEText.text = ""
808                                }
809                                else {
810                                    if (coordGroup.lastChecked == 0)
811                                        coordGroup.valid = mount.raDecToAzAlt(
812                                            targetRAText.text, targetDEText.text)
813                                    else
814                                        coordGroup.valid = mount.haDecToAzAlt(
815                                            targetRAText.text, targetDEText.text)
816                                    if (!coordGroup.valid) {
817                                        targetRAText.text = ""
818                                        targetDEText.text = ""
819                                    }
820                                }
821                                targetRAText.focus = false
822                                targetDEText.focus = false
823                                coordGroup.lastChecked = 1
824                            }
825                        }
826                    }
827
828                    RadioButton {
829                        id: haEquatorialCheck
830                        text: xi18n("HA/DE")
831                        exclusiveGroup: coordGroup
832                        objectName: "haEquatorialCheckObject"
833                        checked: false
834                        onCheckedChanged: {
835                            if (checked) {
836                                targetText.text = ""
837                                targetRALabel.text = xi18n("HA:")
838                                targetDELabel.text = xi18n("DE:")
839                                targetRAText.placeholderText = "HH:MM:SS"
840                                if (targetRAText.text == "" ||
841                                    targetDEText.text == "") {
842                                    targetRAText.text = ""
843                                    targetDEText.text = ""
844                                }
845                                else {
846                                    if (coordGroup.lastChecked == 1)
847                                        coordGroup.valid = mount.azAltToHaDec(
848                                            targetRAText.text, targetDEText.text)
849                                    else
850                                        coordGroup.valid = mount.raDecToHaDec(
851                                            targetRAText.text)
852                                    if (!coordGroup.valid) {
853                                        targetRAText.text = ""
854                                        targetDEText.text = ""
855                                    }
856                                }
857                                targetRAText.focus = false
858                                targetDEText.focus = false
859                                coordGroup.lastChecked = 2
860                            }
861                        }
862                    }
863                }
864
865                Label {
866                    id: epochLabel
867                    text: xi18n("Epoch:")
868                }
869
870                RowLayout
871                {
872                    ExclusiveGroup { id: epochGroup }
873
874                    RadioButton {
875                        id: jnowCheck
876                        objectName: "jnowCheckObject"
877                        checked: true
878                        text: xi18n("JNow")
879                        exclusiveGroup: epochGroup
880                    }
881
882                    RadioButton {
883                        id: j2000Check
884                        objectName: "j2000CheckObject"
885                        text: xi18n("J2000")
886                        exclusiveGroup: epochGroup
887                    }
888                }
889            }
890
891            GridLayout {
892                id: actionLayout
893                Layout.fillHeight: false
894                Layout.fillWidth: true
895                Layout.alignment: Qt.AlignHCenter
896                columns: 2
897
898                Button {
899                    id: gotoButton
900                    objectName: "gotoButtonObject"
901                    text: xi18n("GOTO")
902                    Layout.fillWidth: true
903
904                    onClicked:
905                    {
906                        mount.slew(targetRAText.text, targetDEText.text);
907                        mountMotionLayout.focus = true;
908                    }
909                }
910
911                Button {
912                    id: syncButton
913                    objectName: "syncButtonObject"
914                    text: xi18n("SYNC")
915                    Layout.fillWidth: true
916
917                    onClicked:
918                    {
919                        mount.sync(targetRAText.text, targetDEText.text);
920                        mountMotionLayout.focus = true;
921                    }
922                }
923
924                Button {
925                    id: parkButton
926                    objectName: "parkButtonObject"
927                    text: xi18n("PARK")
928                    Layout.fillWidth: true
929
930                    onClicked:
931                    {
932                        mount.park()
933                    }
934                }
935
936                Button {
937                    id: unparkButton
938                    objectName: "unparkButtonObject"
939                    text: xi18n("UNPARK")
940                    Layout.fillWidth: true
941
942                    onClicked:
943                    {
944                        mount.unpark()
945                    }
946                }
947            }
948
949            RowLayout {
950                id: statusLayout
951                Layout.fillHeight: false
952                Layout.fillWidth: true
953                Layout.alignment: Qt.AlignHCenter
954
955                Label {
956                    id: statusLabel
957                    color: "#ffffff"
958                    text: xi18n("Status:")
959                    font.pointSize: 12
960                    font.bold: true
961                }
962
963                Label {
964                    id: statusText
965                    objectName: "statusTextObject"
966                    color: "#ffffff"
967                    text: xi18n("Idle")
968                    Layout.fillWidth: true
969                    Layout.minimumWidth: fontMetrics.height * 5
970                    font.pointSize: 12
971                    font.bold: true
972                }
973
974                Button {
975                    id: centerMount
976                    Layout.minimumWidth: fontMetrics.height * 1.4
977                    Layout.minimumHeight: fontMetrics.height * 1.4
978                    iconName: "crosshairs"
979
980                    onClicked:
981                    {
982                        mount.centerMount()
983                    }
984                }
985            }
986        }
987    }
988}
989
990/*##^##
991Designer {
992    D{i:0;autoSize:true;height:480;width:640}
993}
994##^##*/
995