Kstars

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

KDE's Doxygen guidelines are available online.