Kstars

wiview.qml
1// SPDX-FileCopyrightText: 2017 Robert Lancaster <rlancaste@gmail.com>
2
3// based on work of:
4// SPDX-FileCopyrightText: 2013 Samikshan Bairagya <samikshan@gmail.com>
5
6// SPDX-License-Identifier: GPL-2.0-or-later
7
8import QtQuick 2.15
9// N.B. 2.15 can only be used when using Qt6
10// Using 2.15 leads to crash in Qt5
11import QtQuick.Layouts 1.15
12import QtQuick.Controls 2.15
13
14
15Rectangle {
16 id: container
17 objectName: "containerObj"
18 color: "#020518"
19 anchors.fill: parent
20
21 property double buttonOpacity: 0.2
22 property double categoryTitleOpacity: 0.350
23
24 ProgressBar {
25 id: progress
26 objectName: "progressBar"
27 width: container.width
28 value: 0.10
29 }
30
31 Text {
32 id: title
33 x: 9
34 y: 20
35 color: "#59ad0e"
36 text: xi18n("What's Interesting...")
37 renderType: Text.QtRendering
38 verticalAlignment: Text.AlignVCenter
39 font {
40 family: "Cantarell"
41 bold: false
42 pixelSize:22
43 }
44 }
45
46 Text {
47 id: catTitle
48 objectName: "categoryTitle"
49 x: 30
50 y: 50
51 color: "white"
52 text: ""
53 renderType: Text.QtRendering
54 verticalAlignment: Text.AlignVCenter
55 horizontalAlignment: Text.AlignHCenter
56 font {
57 family: "Cantarell"
58 bold: false
59 pixelSize:22
60 }
61 }
62
63 Item {
64 id: base
65 y: 89
66 width: parent.width
67 height: parent.height
68 anchors {
69 left: parent.left
70 leftMargin: 0
71 right: parent.right
72 rightMargin: 0
73 }
74
75 Item {
76 id: viewsRow
77 objectName: "viewsRowObj"
78 width: parent.width
79 anchors {
80 top: parent.top
81 bottom: parent.bottom
82 }
83
84 signal categorySelected(string category)
85 signal inspectSkyObject(string name);
86
87 Item {
88 id: categoryView
89 width: parent.width
90 height: parent.height - 150
91
92 Rectangle {
93 id: background
94
95 color: "#00060b"
96 radius: 12
97 anchors {
98 top: parent.top
99 topMargin: 15
100 bottom: parent.bottom
101 bottomMargin: 13
102 right: parent.right
103 rightMargin: 20
104 left: parent.left
105 leftMargin: 20
106 }
107
108 opacity: 0.500
109 border {
110 width: 4
111 color: "black"
112 }
113 }
114 Item {
115 id: nakedEyeItem
116 width: nakedEyeText.width
117 height: nakedEyeText.height
118 anchors{
119 verticalCenterOffset: -250
120 horizontalCenterOffset: 0
121 centerIn: parent
122 }
123
124 CategoryTitle {
125 id: nakedEyeText
126 color: "yellow"
127 title: xi18n("Naked-Eye Objects")
128 renderType: Text.QtRendering
129 anchors.centerIn: parent
130 }
131 }
132
133 Item {
134 id: sunItem
135 width: sunText.width
136 height: sunText.height
137 anchors{
138 verticalCenterOffset: -210
139 horizontalCenterOffset: -50
140 centerIn: parent
141 }
142
143 CategoryTitle {
144 id: sunText
145
146 title: xi18n("Sun")
147 renderType: Text.QtRendering
148 anchors.centerIn: parent
149
150 MouseArea {
151 id: sunMouseArea
152 anchors.fill: parent
153 hoverEnabled: true
154 onEntered: sunText.state = "selected"
155 onExited: sunText.state = ""
156 onClicked: {
157 viewsRow.inspectSkyObject("Sun")
158 catTitle.text = xi18n("Sun")
159 container.state = "singleItemSelected"
160 }
161 }
162 }
163 }
164
165 Item {
166 id: moonItem
167 width: moonText.width
168 height: moonText.height
169 anchors{
170 verticalCenterOffset: -210
171 horizontalCenterOffset: 50
172 centerIn: parent
173 }
174
175 CategoryTitle {
176 id: moonText
177
178 title: xi18n("Moon")
179 renderType: Text.QtRendering
180 anchors.centerIn: parent
181
182 MouseArea {
183 id: moonMouseArea
184 anchors.fill: parent
185 hoverEnabled: true
186 onEntered: moonText.state = "selected"
187 onExited: moonText.state = ""
188 onClicked: {
189 viewsRow.inspectSkyObject("Moon")
190 catTitle.text = xi18n("Moon")
191 container.state = "singleItemSelected"
192 }
193 }
194 }
195 }
196
197
198
199 Item {
200 id: planetItem
201 width: planetText.width
202 height: planetText.height
203 anchors{
204 verticalCenterOffset: -170
205 horizontalCenterOffset: -50
206 centerIn: parent
207 }
208
209 CategoryTitle {
210 id: planetText
211
212 title: xi18n("Planets")
213 renderType: Text.QtRendering
214 anchors.centerIn: parent
215
216 MouseArea {
217 id: planetMouseArea
218 anchors.fill: parent
219 hoverEnabled: true
220 onEntered: planetText.state = "selected"
221 onExited: planetText.state = ""
222 onClicked: {
223 viewsRow.categorySelected("planets")
224 catTitle.text = xi18n("Planets")
225 container.state = "objectFromListSelected"
226 }
227 }
228 }
229 }
230
231 Item {
232 id: satelliteItem
233 width: satelliteText.width
234 height: satelliteText.height
235 anchors {
236 verticalCenterOffset: -170
237 horizontalCenterOffset: 50
238 centerIn: parent
239 }
240
241 CategoryTitle {
242 id: satelliteText
243 title: xi18n("Satellites")
244 renderType: Text.QtRendering
245 anchors.centerIn: parent
246
247 MouseArea {
248 id: satelliteMouseArea
249 anchors.fill: parent
250 hoverEnabled: true
251 onEntered: satelliteText.state = "selected"
252 onExited: satelliteText.state = ""
253 onClicked: {
254 viewsRow.categorySelected("satellites")
255 catTitle.text = xi18n("Satellites")
256 container.state = "objectFromListSelected"
257 }
258 }
259 }
260 }
261
262 Item {
263 id: starItem
264
265 width: starText.width
266 height: starText.height
267 anchors{
268 verticalCenterOffset: -130
269 horizontalCenterOffset: -50
270 centerIn: parent
271 }
272
273 CategoryTitle {
274 id: starText
275
276 title: xi18n("Stars")
277 renderType: Text.QtRendering
278 anchors.centerIn: parent
279
280 MouseArea {
281 id: starMouseArea
282 hoverEnabled: true
283 anchors.fill: parent
284 onEntered: starText.state = "selected"
285 onExited: starText.state = ""
286 onClicked: {
287 viewsRow.categorySelected("stars")
288 catTitle.text = xi18n("Stars")
289 container.state = "objectFromListSelected"
290 }
291 }
292 }
293 }
294
295 Item {
296 id: conItem
297 width: conText.width
298 height: conText.height
299 anchors {
300 verticalCenterOffset: -130
301 horizontalCenterOffset: 50
302 centerIn: parent
303 }
304
305 CategoryTitle {
306 id: conText
307 title: xi18n("Constellations")
308 renderType: Text.QtRendering
309 anchors.centerIn: parent
310
311 MouseArea {
312 id: conMouseArea
313 anchors.fill: parent
314 hoverEnabled: true
315 onEntered: conText.state = "selected"
316 onExited: conText.state = ""
317 onClicked: {
318 viewsRow.categorySelected("constellations")
319 catTitle.text = xi18n("Constellations")
320 container.state = "objectFromListSelected"
321 }
322 }
323 }
324 }
325
326 Item {
327 id: dsoItem
328 width: dsoText.width
329 height: dsoText.height
330
331 anchors {
332 verticalCenterOffset: -90
333 horizontalCenterOffset: 0
334 centerIn: parent
335 }
336
337 CategoryTitle {
338 id: dsoText
339 color: "yellow"
340 title: xi18n("Deep-sky Objects")
341 renderType: Text.QtRendering
342 anchors.centerIn: parent
343 }
344 }
345
346 Item {
347 id: asteroidItem
348
349 width: asteroidText.width
350 height: asteroidText.height
351 anchors{
352 verticalCenterOffset: -50
353 horizontalCenterOffset: -50
354 centerIn: parent
355 }
356
357 CategoryTitle {
358 id: asteroidText
359
360 title: xi18n("Asteroids")
361 renderType: Text.QtRendering
362 anchors.centerIn: parent
363
364 MouseArea {
365 id: asteroidMouseArea
366 hoverEnabled: true
367 anchors.fill: parent
368 onEntered: asteroidText.state = "selected"
369 onExited: asteroidText.state = ""
370 onClicked: {
371 viewsRow.categorySelected("asteroids")
372 catTitle.text = xi18n("Asteroids")
373 container.state = "objectFromListSelected"
374 }
375 }
376 }
377 }
378
379 Item {
380 id: cometItem
381
382 width: cometText.width
383 height: cometText.height
384 anchors{
385 verticalCenterOffset: -50
386 horizontalCenterOffset: 50
387 centerIn: parent
388 }
389
390 CategoryTitle {
391 id: cometText
392
393 title: xi18n("Comets")
394 renderType: Text.QtRendering
395 anchors.centerIn: parent
396
397 MouseArea {
398 id: cometMouseArea
399 hoverEnabled: true
400 anchors.fill: parent
401 onEntered: cometText.state = "selected"
402 onExited: cometText.state = ""
403 onClicked: {
404 viewsRow.categorySelected("comets")
405 catTitle.text = xi18n("Comets")
406 container.state = "objectFromListSelected"
407 }
408 }
409 }
410 }
411
412 Item {
413 id: galItem
414
415 width: galText.width
416 height: galText.height
417
418 anchors {
419 verticalCenterOffset: -10
420 horizontalCenterOffset: -50
421 centerIn: parent
422 }
423
424 CategoryTitle {
425 id: galText
426 title: xi18n("Galaxies")
427 renderType: Text.QtRendering
428 anchors {
429 centerIn: parent
430 margins: 0
431 }
432
433 MouseArea {
434 id: galMouseArea
435 hoverEnabled: true
436 anchors.fill: parent
437 onEntered: galText.state = "selected"
438 onExited: galText.state = ""
439 onClicked: {
440 viewsRow.categorySelected("galaxies")
441 catTitle.text = xi18n("Galaxies")
442 container.state = "objectFromListSelected"
443 }
444 }
445 }
446 }
447
448 Item {
449 id: nebItem
450
451 width: nebText.width
452 height: nebText.height
453
454 anchors {
455 verticalCenterOffset: -10
456 horizontalCenterOffset: 50
457 centerIn: parent
458 }
459
460 CategoryTitle {
461 id: nebText
462 title: xi18n("Nebulae")
463 renderType: Text.QtRendering
464 anchors.centerIn: parent
465
466 MouseArea {
467 id: nebMouseArea
468 hoverEnabled: true
469 anchors.fill: parent
470 onEntered: nebText.state = "selected"
471 onExited: nebText.state = ""
472 onClicked: {
473 viewsRow.categorySelected("nebulas")
474 catTitle.text = xi18n("Nebulae")
475 container.state = "objectFromListSelected"
476 }
477 }
478 }
479 }
480
481 Item {
482 id: clustItem
483
484 width: clustText.width
485 height: clustText.height
486
487 anchors {
488 verticalCenterOffset: 30
489 horizontalCenterOffset: -75
490 centerIn: parent
491 }
492
493 CategoryTitle {
494 id: clustText
495 title: xi18n("Clusters")
496 renderType: Text.QtRendering
497 anchors.centerIn: parent
498
499 MouseArea {
500 id: clustMouseArea
501 hoverEnabled: true
502 anchors.fill: parent
503 onEntered: clustText.state = "selected"
504 onExited: clustText.state = ""
505 onClicked: {
506 viewsRow.categorySelected("clusters")
507 catTitle.text = xi18n("Clusters")
508 container.state = "objectFromListSelected"
509 }
510 }
511 }
512 }
513
514 Item {
515 id: superItem
516
517 width: superText.width
518 height: superText.height
519
520 anchors {
521 verticalCenterOffset: 30
522 horizontalCenterOffset: 75
523 centerIn: parent
524 }
525
526 CategoryTitle {
527 id: superText
528 title: xi18n("Supernovae")
529 renderType: Text.QtRendering
530 anchors.centerIn: parent
531
532 MouseArea {
533 id: superMouseArea
534 hoverEnabled: true
535 anchors.fill: parent
536 onEntered: superText.state = "selected"
537 onExited: superText.state = ""
538 onClicked: {
539 viewsRow.categorySelected("supernovas")
540 catTitle.text = xi18n("Supernovae")
541 container.state = "objectFromListSelected"
542 }
543 }
544 }
545 }
546
547 Item {
548 id: catalogsItem
549 width: catalogText.width
550 height: catalogText.height
551 anchors{
552 verticalCenterOffset: 70
553 horizontalCenterOffset: 0
554 centerIn: parent
555 }
556
557 CategoryTitle {
558 id: catalogText
559 color: "yellow"
560 title: xi18n("Explore Catalogs")
561 renderType: Text.QtRendering
562 anchors.centerIn: parent
563 }
564 }
565
566 Item {
567 id: messierItem
568
569 width: messierText.width
570 height: messierText.height
571
572 anchors {
573 verticalCenterOffset: 110
574 horizontalCenterOffset: 0
575 centerIn: parent
576 }
577
578 CategoryTitle {
579 id: messierText
580 title: xi18n("Messier Catalog")
581 renderType: Text.QtRendering
582 anchors.centerIn: parent
583
584 MouseArea {
585 id: messierMouseArea
586 hoverEnabled: true
587 anchors.fill: parent
588 onEntered: messierText.state = "selected"
589 onExited: messierText.state = ""
590 onClicked: {
591 viewsRow.categorySelected("messier")
592 catTitle.text = "Messier Catalog"
593 container.state = "objectFromListSelected"
594 }
595 }
596 }
597 }
598
599 Item {
600 id: ngcItem
601
602 width: ngcText.width
603 height: ngcText.height
604
605 anchors {
606 verticalCenterOffset: 150
607 horizontalCenterOffset: 0
608 centerIn: parent
609 }
610
611 CategoryTitle {
612 id: ngcText
613 title: xi18n("NGC Catalog")
614 renderType: Text.QtRendering
615 anchors.centerIn: parent
616
617 MouseArea {
618 id: ngcMouseArea
619 hoverEnabled: true
620 anchors.fill: parent
621 onEntered: ngcText.state = "selected"
622 onExited: ngcText.state = ""
623 onClicked: {
624 viewsRow.categorySelected("ngc")
625 catTitle.text = "NGC Catalog"
626 container.state = "objectFromListSelected"
627 }
628 }
629 }
630 }
631
632 Item {
633 id: icItem
634
635 width: icText.width
636 height: icText.height
637
638 anchors {
639 verticalCenterOffset: 190
640 horizontalCenterOffset: 0
641 centerIn: parent
642 }
643
644 CategoryTitle {
645 id: icText
646 title: xi18n("IC Catalog")
647 renderType: Text.QtRendering
648 anchors.centerIn: parent
649
650 MouseArea {
651 id: icMouseArea
652 hoverEnabled: true
653 anchors.fill: parent
654 onEntered: icText.state = "selected"
655 onExited: icText.state = ""
656 onClicked: {
657 viewsRow.categorySelected("ic")
658 catTitle.text = "IC Catalog"
659 container.state = "objectFromListSelected"
660 }
661 }
662 }
663 }
664
665 Item {
666 id: sh2Item
667
668 width: sh2Text.width
669 height: sh2Text.height
670
671 anchors {
672 verticalCenterOffset: 230
673 horizontalCenterOffset: 0
674 centerIn: parent
675 }
676
677 CategoryTitle {
678 id: sh2Text
679 title: xi18n("Sharpless Catalog")
680 renderType: Text.QtRendering
681 anchors.centerIn: parent
682
683 MouseArea {
684 id: sh2MouseArea
685 hoverEnabled: true
686 anchors.fill: parent
687 onEntered: sh2Text.state = "selected"
688 onExited: sh2Text.state = ""
689 onClicked: {
690 viewsRow.categorySelected("sharpless")
691 catTitle.text = "Sharpless Catalog"
692 container.state = "objectFromListSelected"
693 }
694 }
695 }
696 }
697
698 } //end of categoryView
699
700 Flipable {
701 id: skyObjView
702 objectName: "skyObjView"
703 width: parent.width
704 height: parent.height - 150
705 anchors.leftMargin: categoryView.width
706 anchors.left: categoryView.right
707 property bool flipped: false
708
709 front: Item {
710 id: soListContainer
711 anchors.fill: parent
712 enabled: !parent.flipped // To hide content of front side on back side
713
714 Rectangle {
715 id: soListViewBackground
716 anchors.fill: soListViewContainer
717 color: "#00060b"
718 opacity: 0.5
719 radius: 12
720 }
721
722 Rectangle {
723 id: soListViewContainer
724 anchors{
725 top: soListContainer.top
726 bottom: soListContainer.bottom
727 left: soListContainer.left
728 right: soListContainer.right
729 }
730 color: "transparent"
731 radius: 12
732 border {
733 width: 4
734 color: "#000000"
735 }
736
737 Flickable {
738 id: flickable
739 anchors.fill: parent
740 clip: true
741 flickableDirection: Flickable.VerticalFlick
742
743
744 ListView {
745 id: soListView
746 z: 0
747 objectName: "soListObj"
748 anchors.fill: parent
749
750 signal soListItemClicked(int curIndex)
751 clip: true
752
753 highlightMoveDuration: 1
754
755 model: soListModel
756
757 Rectangle{
758 id: soListEmptyMessage
759 objectName: "soListEmptyMessage"
760 color: "#00060b"
761 anchors.fill: parent
762 Text{
763 anchors.fill: parent
764 text: xi18n("No Items to display")
765 renderType: Text.QtRendering
766 verticalAlignment: Text.AlignVCenter
767 horizontalAlignment: Text.AlignHCenter
768 color: "white"
769 font{
770 family: "Arial"
771 pointSize: 20
772 }
773 }
774 visible: (soListView.count > 0 || container.state === "singleItemSelected") ? false : true
775 }
776
777 Rectangle {
778 id: scrollbar
779 anchors.right: soListView.right
780 y: soListView.visibleArea.yPosition * soListView.height
781 width: 10
782 height: (soListView.visibleArea.heightRatio * soListView.height > 10) ? soListView.visibleArea.heightRatio * soListView.height : 10
783 color: "blue"
784 MouseArea {
785 id: dragScrollBar
786 drag.target: scrollbar
787 drag.axis: Drag.YAxis
788 drag.minimumY: 0
789 drag.maximumY: soListView.height - scrollbar.height
790 anchors.fill: parent
791 enabled: true
792 onPositionChanged: {
793 soListView.contentY = scrollbar.y / soListView.height * soListView.contentHeight
794 }
795
796 }//Mousearea
797 }
798
799 delegate: Item {
800 id: soListItem
801 x: 8
802 width: soListView.width
803 height: (dispSummary.height >= 130) ? dispSummary.height + 20 : 160
804
805 Rectangle{
806 id: summaryBackground
807 color: (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "#030723" : "transparent"
808 width: parent.width
809 height: parent.height
810 MouseArea {
811 id: mouseListArea
812 anchors.fill: parent
813 hoverEnabled: true
814 onClicked: {
815 soListView.currentIndex = index
816 soListView.soListItemClicked(soListView.currentIndex)
817 skyObjView.flipped = true
818 }
819 }//Mousearea
820 Text {
821 id: dispSummary
822 objectName: dispObjSummary
823 text: dispObjSummary
824 renderType: Text.QtRendering
825 textFormat: Text.RichText
826 x: image.width + 5
827 topPadding: 15
828 width: parent.width - image.width - 30
829 color: (nightVision.state === "active" && soListItem.ListView.isCurrentItem) ? "#F89404" : (nightVision.state === "active") ? "red" : (soListItem.ListView.isCurrentItem) ? "white" : (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "yellow" : "gray"
830
831 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
832 font{
833 family: "Arial"
834 pixelSize: 13
835 }
836
837 MouseArea {
838 id: mouseTextArea
839 anchors.fill: parent
840 hoverEnabled: true
841 onClicked: {
842 soListView.currentIndex = index
843 soListView.soListItemClicked(soListView.currentIndex)
844 skyObjView.flipped = true
845 }
846 }//Mousearea
847 }
848 }
849 Image {
850 id: image
851 width: 150
852 height: parent.height
853 fillMode: Image.PreserveAspectFit
854 source: imageSource
855 MouseArea {
856 id: mouseImgArea
857 anchors.fill: parent
858 hoverEnabled: true
859 onClicked: {
860 soListView.currentIndex = index
861 soListView.soListItemClicked(soListView.currentIndex)
862 }
863 }//Mousearea
864 }
865 Text {
866 id: dispText
867 objectName: dispName
868 text: dispName
869 renderType: Text.QtRendering
870 color: (nightVision.state === "active" && soListItem.ListView.isCurrentItem) ? "#F89404" : (nightVision.state === "active") ? "red" : (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "yellow" : "white"
871
872 font.bold: true
873 }
874 }//soListItem
875 }//soListView
876 }//Flickable
877 }//soListViewContainer
878 }//Front, soListContainer
879
880 back: Item {
881 id: detailsViewContainer
882 width: parent.width
883 height: parent.height
884 enabled: parent.flipped
885
886
887 Rectangle {
888 id: detailsViewBackground
889 anchors.fill: detailsView
890 color: "#00060b"
891 radius: 12
892 opacity: 0.500
893 }
894
895 Rectangle {
896 id: detailsView
897 objectName: "detailsViewObj"
898 x: parent.x + 15
899 height: parent.height
900 width: parent.width - 30
901 color: "transparent"
902 radius: 12
903 border {
904 width: 4
905 color: "#000000"
906 }
907
908 Text {
909 id: soname
910 objectName: "sonameObj"
911 y: 8
912 width: parent.width
913 height: 22
914 color: "#ffffff"
915 text: xi18n("text")
916 renderType: Text.QtRendering
917 anchors{
918 left: parent.left
919 leftMargin: 8
920 }
921 font{
922 bold: true
923 pixelSize: 16
924 }
925 verticalAlignment: Text.AlignVCenter
926 }
927
928 Text {
929 id: posText
930 objectName: "posTextObj"
931 y: parent.height - 50
932 anchors{
933 right: parent.right
934 rightMargin: 10
935 }
936 textFormat: Text.RichText
937 width: parent.width
938 height: 16
939 text: xi18n("text")
940 renderType: Text.QtRendering
941 horizontalAlignment: Text.AlignRight
942 font{
943 family: "Arial"
944 bold: true
945 pixelSize:11
946 }
947
948 }
949 Column {
950 id: detailItemsCol
951 x: 150
952 y: 80
953 width: parent.width
954 height: 93
955 spacing: 14
956
957 DetailsItem {
958 id: detailsText
959 textFormat: Text.RichText
960 objectName: "detailsTextObj"
961
962 }
963
964 }
965
966 Column {
967 id: detailsViewButtonsCol
968 y: 50
969 anchors {
970 left: parent.left
971 leftMargin: 10
972 }
973
974 spacing: 14
975
976 Text {
977 id: detailsButton
978 objectName: "detailsButtonObj"
979
980 verticalAlignment: Text.AlignVCenter
981 color: "white"
982 text: xi18n("More Details")
983 renderType: Text.QtRendering
984 font {
985 underline: true
986 family: "Cantarell"
987 pixelSize: 14
988 }
989
990 signal detailsButtonClicked
991
992 MouseArea {
993 id: detailsMouseArea
994 hoverEnabled: true
995 cursorShape: Qt.PointingHandCursor
996 anchors.fill: parent
997 onEntered: detailsButton.color = (nightVision.state === "active") ? "red" : "yellow"
998 onExited: detailsButton.color = (nightVision.state === "active") ? "red" : "white"
999 onClicked: detailsButton.detailsButtonClicked()
1000 }
1001 }
1002
1003 Text {
1004 id: centerButton
1005 objectName: "centerButtonObj"
1006
1007 verticalAlignment: Text.AlignVCenter
1008 color: "white"
1009 text: xi18n("Center in Map \n")
1010 renderType: Text.QtRendering
1011 font {
1012 underline: true
1013 family: "Arial"
1014 pixelSize: 14
1015 }
1016
1017 signal centerButtonClicked
1018
1019 MouseArea {
1020 id: centerObjMouseArea
1021 hoverEnabled: true
1022 cursorShape: Qt.PointingHandCursor
1023 anchors.fill: parent
1024 onEntered: centerButton.color = (nightVision.state === "active") ? "red" : "yellow"
1025 onExited: centerButton.color = (nightVision.state === "active") ? "red" : "white"
1026 onClicked: centerButton.centerButtonClicked()
1027 }
1028
1029 Text {
1030 text: xi18n(" Auto Track ")
1031 renderType: Text.QtRendering
1032 color: "white"
1033 font {
1034 family: "Arial"
1035 pixelSize: 14
1036 }
1037 y: 15
1038 }
1039
1040 CheckBox {
1041 id: autoCenter
1042 objectName: "autoCenterCheckbox"
1043 x: 37
1044 y: 15
1045 checked: true
1046 }
1047
1048 CheckBox {
1049 id: autoTrack
1050 objectName: "autoTrackCheckbox"
1051 x: 97
1052 y: 15
1053 checked: false
1054 onClicked: centerButton.centerButtonClicked()
1055 }
1056
1057 }
1058
1059
1060 Text {
1061 id: slewTelescopeButton
1062 objectName: "slewTelescopeButtonObj"
1063
1064 verticalAlignment: Text.AlignVCenter
1065 color: "white"
1066 text: xi18n("Slew Telescope")
1067 renderType: Text.QtRendering
1068 font {
1069 underline: true
1070 family: "Cantarell"
1071 pixelSize: 14
1072 }
1073
1074 signal slewTelescopeButtonClicked
1075
1076 MouseArea {
1077 id: slewTelescopeObjMouseArea
1078 hoverEnabled: true
1079 cursorShape: Qt.PointingHandCursor
1080 anchors.fill: parent
1081 onEntered: slewTelescopeButton.color = (nightVision.state === "active") ? "red" : "yellow"
1082 onExited: slewTelescopeButton.color = (nightVision.state === "active") ? "red" : "white"
1083 onClicked: slewTelescopeButton.slewTelescopeButtonClicked()
1084 }
1085 }
1086 }
1087 TabBar{
1088 id: tabBarObjectInfo
1089 visible: true
1090 width: parent.width
1091 currentIndex: tabBarObjectInfo.currentIndex
1092 TabButton {
1093 text: xi18n("Object Information")
1094 }
1095 TabButton {
1096 text: xi18n("Wikipedia Infotext")
1097 }
1098 }
1099 StackLayout {
1100 id: tabbedView
1101 y: 170
1102 width: parent.width
1103 currentIndex: tabBarObjectInfo.currentIndex
1104 height: parent.height - 170 - 50
1105 visible: true
1106 /*
1107
1108 property Component nightTabs: StackedLayoutStyle {
1109 tabsAlignment: Qt.AlignHCenter
1110 frameOverlap: 1
1111 tab: Rectangle {
1112 border.color: "black"
1113 implicitWidth: 150
1114 implicitHeight: 30
1115 color: "red"
1116 Text {
1117 id: text
1118 anchors.centerIn: parent
1119 text: styleData.title
1120 renderType: Text.QtRendering
1121 color: styleData.selected ? "white" : "black"
1122 }
1123 }
1124 }
1125*/
1126 Item {
1127 Rectangle {
1128 id: descTextBox
1129 height: parent.height
1130 width: parent.width
1131 color: "#010a14"
1132 radius: 10
1133 border.width: 0
1134 anchors{
1135 top: parent.top
1136 left: parent.left
1137 leftMargin: 4
1138 right: parent.right
1139 rightMargin: 4
1140 }
1141 border.color: "#585454"
1142
1143 Flickable {
1144 id: flickableDescText
1145 clip: true
1146 flickableDirection: Flickable.VerticalFlick
1147 width: parent.width
1148 height: parent.height - 10
1149 anchors{
1150 top: parent.top
1151 topMargin: 20
1152 bottom: parent.bottom
1153 bottomMargin: 4
1154 left: parent.left
1155 leftMargin: 10
1156 right: parent.right
1157 rightMargin: 10
1158 }
1159 contentWidth: parent.width
1160 contentHeight: col.height + 4
1161 Item {
1162 id: descTextItem
1163 anchors.fill: parent
1164 Column {
1165 id: col
1166 width: parent.width
1167 Image {
1168 id: detailImg
1169 width: parent.width - 20
1170 anchors{
1171 right: parent.right
1172 }
1173 objectName: "detailImage"
1174 property string refreshableSource
1175 fillMode: Image.PreserveAspectFit
1176 source: refreshableSource
1177 }
1178 Text {
1179 id: descText
1180 objectName: "descTextObj"
1181 color: "white"
1182 text: xi18n("text")
1183 renderType: Text.QtRendering
1184 clip: true
1185 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1186 width: parent.width - 20
1187 textFormat: Text.RichText
1188 font{
1189 family: "Arial"
1190 pixelSize: 13
1191 }
1192 onLinkActivated: Qt.openUrlExternally(link)
1193 MouseArea {
1194 anchors.fill: parent
1195 acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
1196 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
1197 }
1198 }
1199 } //column
1200 } //item
1201 } //flickable
1202 } //rectangle
1203 } //tab
1204
1205 Item {
1206 id: infoBoxTab
1207
1208 visible: true
1209 Rectangle {
1210 id: descTextBox2
1211 color: "#010a14"
1212 radius: 10
1213 border.width: 0
1214 states: [
1215 State {
1216 name: "outOfTab"
1217 when: ( (container.state === "singleItemSelected" && detailsView.width >= 600)||(container.state !== "singleItemSelected" && detailsView.width >= 600 && detailsView.width < 900))
1218 PropertyChanges{target:descTextBox2; parent: detailsView}
1219 PropertyChanges{target:descTextBox2; width: detailsView.width / 2}
1220 PropertyChanges{target:descTextBox2; anchors{
1221 top: detailsView.top
1222 topMargin: 4
1223 bottom: posText.top
1224 left: tabbedView.right
1225 right: detailsView.right
1226 }
1227 }
1228 PropertyChanges{target:tabbedView; currentIndex: 0}
1229 PropertyChanges{target:tabBarObjectInfo; visible: false}
1230 PropertyChanges{target:tabbedView; width: detailsView.width / 2}
1231 },
1232 State {
1233 name: "includeList"
1234 when: (detailsView.width >= 900 && container.state!=="singleItemSelected")
1235 PropertyChanges{target: soListViewContainer; parent: detailsView}
1236 PropertyChanges{target: soListViewContainer; anchors{
1237 top: detailsView.top
1238 bottom: posText.top
1239 left: detailsView.left
1240 right: tabbedView.left
1241 }
1242 }
1243 PropertyChanges{target:descTextBox2; parent: detailsView}
1244 PropertyChanges{target:descTextBox2; width: detailsView.width / 3}
1245 PropertyChanges{target:descTextBox2; anchors{
1246 top: detailsView.top
1247 topMargin: 4
1248 bottom: posText.top
1249 left: tabbedView.right
1250 right: detailsView.right
1251 }
1252 }
1253 PropertyChanges{target:soListViewContainer; width: detailsView.width / 3}
1254 PropertyChanges{target:tabbedView; x: detailsView.width / 3}
1255 PropertyChanges{target:detailsViewButtonsCol; anchors.left: soListViewContainer.right}
1256 PropertyChanges{target:soname; anchors.left: soListViewContainer.right}
1257 PropertyChanges{target:detailItemsCol; x: 150 + detailsView.width / 3}
1258 PropertyChanges{target:tabbedView; width: detailsView.width / 3}
1259 PropertyChanges{target:tabbedView; currentIndex: 0}
1260 PropertyChanges{target:tabBarObjectInfo; visible: false}
1261 PropertyChanges{target:skyObjView; flipped: true}
1262 }
1263 ]
1264
1265 anchors{
1266 top: infoBoxTab.top
1267 bottom: infoBoxTab.bottom
1268 left: infoBoxTab.left
1269 right: infoBoxTab.right
1270 rightMargin: 4
1271 leftMargin: 4
1272 }
1273 border.color: "#585454"
1274
1275 Flickable {
1276 id: flickableInfoText
1277 clip: true
1278 flickableDirection: Flickable.VerticalFlick
1279 width: parent.width
1280 height: parent.height - 10
1281 anchors{
1282 top: parent.top
1283 topMargin: 10
1284 bottom: parent.bottom
1285 bottomMargin: 4
1286 left: parent.left
1287 right: parent.right
1288 }
1289 contentWidth: parent.width
1290 contentHeight: col2.height + 4
1291 Item {
1292 id: descInfoTextItem
1293 anchors{
1294 top: parent.top
1295 topMargin: 0
1296 left: parent.left
1297 leftMargin: 4
1298 right: parent.right
1299 rightMargin: 4
1300 }
1301 Column {
1302 id: col2
1303 width: parent.width
1304 Text {
1305 id: infoText
1306 objectName: "infoBoxText"
1307 textFormat: Text.RichText
1308 color: "white"
1309 onLinkActivated: Qt.openUrlExternally(link)
1310 MouseArea {
1311 anchors.fill: parent
1312 acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
1313 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
1314 }
1315
1316 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1317 verticalAlignment: Text.AlignVCenter
1318 horizontalAlignment: Text.AlignHCenter
1319 text: xi18n("Info Text")
1320 renderType: Text.QtRendering
1321 clip: true
1322 width: parent.width
1323 font{
1324 family: "Arial"
1325 pixelSize: 13
1326 } //font
1327 } //text
1328 } //column
1329 } //item
1330 } //flickable
1331 } //rectangle
1332 } //tab
1333 } //tabview
1334
1335
1336
1337 Item {
1338 id: nextObjRect
1339 objectName: "nextObj"
1340 width: nextObjText.width + nextObjIcon.width + 10
1341 height: 28
1342 anchors {
1343 right: parent.right
1344 rightMargin: 10
1345 bottom: parent.bottom
1346 bottomMargin: 0
1347 }
1348
1349 signal nextObjClicked
1350
1351 Rectangle {
1352 id: nextObjForeground
1353 radius: 5
1354 anchors.fill: parent
1355 opacity: 0
1356 }
1357
1358 MouseArea {
1359 id: nextObjMouseArea
1360
1361 anchors.fill: nextObjRect
1362 hoverEnabled: true
1363 onEntered: {
1364 nextObjForeground.opacity = 0.1
1365 nextObjText.color = (nightVision.state === "active") ? "red" : "yellow"
1366 }
1367 onExited: {
1368 nextObjForeground.opacity = 0.0
1369 nextObjText.color = (nightVision.state === "active") ? "red" : "white"
1370 }
1371 onClicked: {
1372 nextObjRect.nextObjClicked()
1373 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1374 }
1375 }
1376
1377 Text {
1378 id: nextObjText
1379 objectName: "nextTextObj"
1380
1381 height: 22
1382 color: "white"
1383 text: xi18n("Next")
1384 renderType: Text.QtRendering
1385 anchors{
1386 right: nextObjIcon.left
1387 rightMargin: 5
1388 verticalCenter: parent.verticalCenter
1389 }
1390 visible: true
1391 verticalAlignment: Text.AlignVCenter
1392 horizontalAlignment: Text.AlignRight
1393 font{
1394 bold: true
1395 pixelSize:11
1396 }
1397 }
1398
1399 Image {
1400 id: nextObjIcon
1401
1402 anchors{
1403 right: parent.right
1404 verticalCenter: parent.verticalCenter
1405 }
1406 sourceSize {
1407 height: 24
1408 width: 24
1409 }
1410 source: "next.png"
1411 }
1412 }
1413
1414 Item {
1415 id: prevObjRect
1416 objectName: "prevObj"
1417
1418 width: prevObjText.width + prevObjIcon.width + 10
1419 height: 28
1420 anchors {
1421 left: parent.left
1422 leftMargin: 10
1423 bottom: parent.bottom
1424 bottomMargin: 0
1425 }
1426
1427 signal prevObjClicked
1428
1429 Rectangle {
1430 id: prevObjForeground
1431 radius: 5
1432 anchors.fill: parent
1433 opacity: 0
1434 }
1435
1436 MouseArea {
1437 id: prevObjMouseArea
1438 anchors.fill: parent
1439 hoverEnabled: true
1440 onEntered: {
1441 prevObjForeground.opacity = 0.1
1442 prevObjText.color = (nightVision.state === "active") ? "red" : "yellow"
1443 }
1444 onExited: {
1445 prevObjForeground.opacity = 0.0
1446 prevObjText.color = (nightVision.state === "active") ? "red" : "white"
1447 }
1448 onClicked: {
1449 prevObjRect.prevObjClicked()
1450 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1451 }
1452 }
1453
1454 Text {
1455 id: prevObjText
1456 objectName: "prevTextObj"
1457
1458 height: 22
1459 color: "#ffffff"
1460 text: xi18n("Previous")
1461 renderType: Text.QtRendering
1462 anchors{
1463 left: prevObjIcon.right
1464 leftMargin: 5
1465 verticalCenter: parent.verticalCenter
1466 }
1467 visible: true
1468 horizontalAlignment: Text.AlignLeft
1469 verticalAlignment: Text.AlignVCenter
1470 font{
1471 pixelSize: 11
1472 bold: true
1473 }
1474 }
1475
1476 Image {
1477 id: prevObjIcon
1478 anchors.verticalCenter: parent.verticalCenter
1479 sourceSize{
1480 height: 24
1481 width: 24
1482 }
1483 source: "previous.png"
1484 }
1485 }
1486
1487
1488 } //end of detailsView
1489
1490 Rectangle{
1491 id: soItemEmptyMessage
1492 objectName: "soItemEmptyMessage"
1493 color: "#00060b"
1494 anchors.fill: parent
1495 Text{
1496 anchors.fill: parent
1497 text: xi18n("No Items to display")
1498 renderType: Text.QtRendering
1499 verticalAlignment: Text.AlignVCenter
1500 horizontalAlignment: Text.AlignHCenter
1501 color: "white"
1502 font{
1503 family: "Arial"
1504 pointSize: 20
1505 }
1506 }
1507 visible: (soListView.count > 0 || container.state === "singleItemSelected") ? false : true
1508 }
1509
1510 } //end of detailsViewContainer
1511
1512 focus:true
1513
1514 Keys.onPressed: {
1515 if (event.key === Qt.Key_Left||event.key === Qt.Key_Up) {
1516 prevObjRect.prevObjClicked();
1517 event.accepted = true;
1518 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1519 }
1520 if (event.key === Qt.Key_Right||event.key === Qt.Key_Down) {
1521 nextObjRect.nextObjClicked();
1522 event.accepted = true;
1523 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1524 }
1525 }
1526
1527 states: [
1528 State {
1529 name: "back"
1530 PropertyChanges {
1531 target: listToDetailsRotation
1532 angle: 180
1533 }
1534
1535 when: skyObjView.flipped
1536 }
1537 ]
1538
1539 transitions: [
1540 Transition {
1541 NumberAnimation {
1542 target: listToDetailsRotation
1543 property: "angle"
1544 duration: 400
1545 }
1546 }
1547 ]
1548
1550 id: listToDetailsRotation
1551 origin.x: container.width / 2
1552 axis.y: 1
1553 axis.z: 0
1554 }
1555
1556 Rectangle{
1557 id: loadingMessage
1558 objectName: "loadingMessage"
1559 color: "#00060b"
1560 anchors.fill: parent
1561 visible: false
1562 Text{
1563 anchors.fill: parent
1564 text: xi18n("Loading...")
1565 renderType: Text.QtRendering
1566 verticalAlignment: Text.AlignVCenter
1567 horizontalAlignment: Text.AlignHCenter
1568 color: "white"
1569 font{
1570 family: "Arial"
1571 pointSize: 30
1572 }
1573 }
1574 states: [
1575 State {
1576 name: "loading"
1577 PropertyChanges {target: loadingMessage; visible: true }
1578 PropertyChanges {target: skyObjView; flipped:false }
1579 }
1580 ]
1581 }
1582 } //end of skyObjView
1583 } //end of viewsContainer
1584 Rectangle{
1585 id: helpMessage
1586 objectName: "helpMessage"
1587 color: "#00060b"
1588 anchors.fill: parent
1589 visible: false
1590 Text{
1591 id: helpText
1592 anchors.left: helpMessage.left
1593 anchors.right: helpMessage.right
1594 anchors.margins: 10
1595 text: xi18n("Explanation of the What's Interesting Panel")
1596 renderType: Text.QtRendering
1597 horizontalAlignment: Text.AlignHCenter
1598 color: "white"
1599 font{
1600 family: "Arial"
1601 pointSize: 15
1602 }
1603 }
1604 Text{
1605 id: helpExplainText
1606 anchors.margins: 10
1607 anchors.top: helpText.bottom
1608 anchors.left: helpMessage.left
1609 anchors.right: helpMessage.right
1610 text: xi18n("The What's Interesting Panel is intended to allow you to explore many different interesting objects in the night sky. It includes objects visible to the naked eye as well as objects that require telescopes. It is intended to appeal to both beginners and advanced astronomers. If you click on a category or catalog, a list of objects will appear. Clicking on an object in the list will bring up the details view where you can find out more information about the object. If you have thumbnail images or wikipedia information for this object, these will be displayed as well. If not, you can download them using the download icon. If you make What's Interesting wider, the display will dynamically change to display the information more conveniently. Please see the descriptions below for details on what the buttons at the bottom do.")
1611 renderType: Text.QtRendering
1612 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1613 color: "white"
1614 font{
1615 family: "Arial"
1616 pointSize: 11
1617 }
1618 }
1619 Image {
1620 id: helpSettingsImage
1621 anchors.top: helpExplainText.bottom
1622 source: "settingsIcon.png"
1623 width: 28
1624 height: 28
1625 }
1626 Text{
1627 id: helpSettingsText
1628 anchors.top: helpExplainText.bottom
1629 anchors.left: helpSettingsImage.right
1630 anchors.right: helpMessage.right
1631 anchors.margins: 10
1632 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1633 text: xi18n("This button will bring up the What's Interesting Settings. It will let you configure what is displayed in What's Interesting based upon which equipment you are using and the observing conditions.")
1634 renderType: Text.QtRendering
1635 color: "white"
1636 font{
1637 family: "Arial"
1638 pointSize: 11
1639 }
1640 }
1641 Image {
1642 id: helpInspectImage
1643 anchors.top: helpSettingsText.bottom
1644 source: "inspectIcon.png"
1645 width: 28
1646 height: 28
1647 }
1648 Text{
1649 id: helpInspectText
1650 anchors.top: helpSettingsText.bottom
1651 anchors.left: helpInspectImage.right
1652 anchors.right: helpMessage.right
1653 anchors.margins: 10
1654 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1655 text: xi18n("This button will turn on and off the Inspector Mode. In this mode you can click on any object in the map and What's Interesting will display the information about it.")
1656 renderType: Text.QtRendering
1657 color: "white"
1658 font{
1659 family: "Arial"
1660 pointSize: 11
1661 }
1662 }
1663 Image {
1664 id: helpReloadImage
1665 anchors.top: helpInspectText.bottom
1666 source: "reloadIcon.png"
1667 width: 28
1668 height: 28
1669 }
1670 Text{
1671 id: helpReloadText
1672 anchors.top: helpInspectText.bottom
1673 anchors.left: helpReloadImage.right
1674 anchors.right: helpMessage.right
1675 anchors.margins: 10
1676 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1677 text: xi18n("This button will reload the current object list, update all displayed information, update any images, and update the information and images for the currently selected object.")
1678 renderType: Text.QtRendering
1679 color: "white"
1680 font{
1681 family: "Arial"
1682 pointSize: 11
1683 }
1684 }
1685 Image {
1686 id: helpVisibleImage
1687 anchors.top: helpReloadText.bottom
1688 source: "visibleIcon.png"
1689 width: 28
1690 height: 28
1691 }
1692 Text{
1693 id: helpVisibleText
1694 anchors.top: helpReloadText.bottom
1695 anchors.left: helpVisibleImage.right
1696 anchors.right: helpMessage.right
1697 anchors.margins: 10
1698 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1699 text: xi18n("This button will toggle whether to filter the list to display only currently visible objects in a list or to display all of the objects in the list. The visibility is determined based on the current KStars date and time, the current observing equipment, and the current sky conditions based on the What's Interesting Settings.")
1700 renderType: Text.QtRendering
1701 color: "white"
1702 font{
1703 family: "Arial"
1704 pointSize: 11
1705 }
1706 }
1707 Image {
1708 id: helpFavoriteImage
1709 anchors.top: helpVisibleText.bottom
1710 source: "favoriteIcon.png"
1711 width: 28
1712 height: 28
1713 }
1714 Text{
1715 id: helpFavoriteText
1716 anchors.top: helpVisibleText.bottom
1717 anchors.left: helpFavoriteImage.right
1718 anchors.right: helpMessage.right
1719 anchors.margins: 10
1720 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1721 text: xi18n("This button will toggle whether to filter the list to display only 'interesting' objects or to display any of the objects in the list. This setting only applies to the Galaxies, Nebulas, and Clusters lists. The objects are considered 'interesting' if they appear on the KStars 'interesting' list.")
1722 renderType: Text.QtRendering
1723 color: "white"
1724 font{
1725 family: "Arial"
1726 pointSize: 11
1727 }
1728 }
1729 Image {
1730 id: helpDownloadImage
1731 anchors.top: helpFavoriteText.bottom
1732 source: "downloadIcon.png"
1733 width: 28
1734 height: 28
1735 }
1736 Text{
1737 id: helpDownloadText
1738 anchors.top: helpFavoriteText.bottom
1739 anchors.left: helpDownloadImage.right
1740 anchors.right: helpMessage.right
1741 anchors.margins: 10
1742 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1743 text: xi18n("This button will attempt to download information and pictures about the object(s) from Wikipedia. You can select whether to download the information about just one object, all of the objects in a list, or only the objects in a list for which no data was downloaded yet. Please note: If the list is currently filtered for visible objects or 'interesting' objects, only the filtered objects will be downloaded. If you actually want all the objects in the list, turn off the filters.")
1744 renderType: Text.QtRendering
1745 color: "white"
1746 font{
1747 family: "Arial"
1748 pointSize: 11
1749 }
1750 }
1751 states: [
1752 State {
1753 name: "helpDisplayed"
1754 PropertyChanges {target: helpMessage; visible: true }
1755 PropertyChanges {target: backButton; x: container.width - 105}
1756 }
1757 ]
1758 }
1759 } //end of base
1760
1761 Rectangle {
1762 id: backButton
1763 x: container.width + 10
1764 y: container.height - 50
1765 width: leftArrow.width + goBackText.width + 18
1766 height: 49
1767 color: "#00000000"
1768 radius: 5
1769
1770 Rectangle {
1771 id: goBackForeground
1772 anchors.fill: parent
1773 radius: 5
1774 opacity: 0.0
1775 }
1776
1777 Text {
1778 id: goBackText
1779 y: 12
1780 color: "#f7e808"
1781 text: xi18n("Back")
1782 renderType: Text.QtRendering
1783 anchors {
1784 left: leftArrow.right
1785 leftMargin: 7
1786 verticalCenterOffset: 0
1787 verticalCenter: leftArrow.verticalCenter
1788 }
1789 font{
1790 family: "Cantarell"
1791 pointSize: 13
1792 }
1793 verticalAlignment: Text.AlignVCenter
1794 horizontalAlignment: Text.AlignHCenter
1795 }
1796
1797 Image {
1798 id: leftArrow
1799 y: 9
1800 anchors{
1801 left: parent.left
1802 leftMargin: 4
1803 verticalCenterOffset: 0
1804 verticalCenter: parent.verticalCenter
1805 }
1806 source: "leftArrow.png"
1807 }
1808
1809 MouseArea {
1810 id: backButtonMouseArea
1811 anchors.fill: backButton
1812 hoverEnabled: true
1813 onEntered: goBackForeground.opacity = buttonOpacity
1814 onExited: goBackForeground.opacity = 0.0
1815 onClicked: {
1816 if(helpMessage.state === "helpDisplayed"){
1817 helpMessage.state = ""
1818 } else if (container.state === "objectFromListSelected") {
1819 if (!skyObjView.flipped||container.width>=900) {
1820 container.state = "base"
1821 catTitle.text = ""
1822 } else if (skyObjView.flipped) {
1823 skyObjView.flipped = false
1824 }
1825 } else if (container.state === "singleItemSelected") {
1826 container.state = "base"
1827 catTitle.text = ""
1828 if (container.width>=900) {
1829 skyObjView.flipped = true
1830 } else{
1831 skyObjView.flipped = false
1832 }
1833 }
1834 }
1835 }
1836 }
1837
1838 Image {
1839 id: settingsIcon
1840 objectName: "settingsIconObj"
1841 x: 10
1842 y: container.height - 50
1843 width: 28
1844 height: 28
1845 anchors{
1846 verticalCenterOffset: 0
1847 verticalCenter: backButton.verticalCenter
1848 }
1849 sourceSize{
1850 height: 40
1851 width: 40
1852 }
1853 smooth: true
1854 fillMode: Image.Stretch
1855 source: "settingsIcon.png"
1856
1857 signal settingsIconClicked
1858
1859 MouseArea {
1860 id: settingsMouseArea
1861 anchors.fill: parent
1862 hoverEnabled: true
1863 onEntered: settingsForeground.opacity = buttonOpacity
1864 onExited: settingsForeground.opacity = 0.0
1865 onClicked: settingsIcon.settingsIconClicked()
1866 }
1867
1868 Rectangle {
1869 id: settingsForeground
1870 anchors.fill: parent
1871 opacity: 0.0
1872 radius: 5
1873 }
1874 }
1875
1876 Image {
1877 id: inspectIcon
1878 objectName: "inspectIconObj"
1879 state: "checked"
1880 x: 50
1881 y: container.height - 50
1882 width: 28
1883 height: 28
1884 anchors{
1885 verticalCenterOffset: 0
1886 verticalCenter: backButton.verticalCenter
1887 }
1888 sourceSize{
1889 height: 40
1890 width: 40
1891 }
1892 smooth: true
1893 fillMode: Image.Stretch
1894 source: "inspectIcon.png"
1895
1896 signal inspectIconClicked(bool inspect)
1897
1898 MouseArea {
1899 id: inspectMouseArea
1900 anchors.fill: parent
1901 hoverEnabled: true
1902 onEntered: inspectForeground.opacity = buttonOpacity
1903 onExited: inspectForeground.opacity = 0.0
1904 onClicked: {
1905 inspectIcon.inspectIconClicked(inspectIcon.state === "checked")
1906 inspectIcon.state = (inspectIcon.state === "checked") ? "" : "checked"
1907 }
1908 }
1909
1910 Rectangle {
1911 id: inspectForeground
1912 radius: 5
1913 opacity: 0
1914 anchors.fill: parent
1915 }
1916 states: [
1917 State {
1918 name: "checked"
1919 PropertyChanges {target: inspectIcon; opacity: 0.5}
1920 }
1921 ]
1922 }
1923
1924 Image {
1925 id: reloadIcon
1926 objectName: "reloadIconObj"
1927 x: 90
1928 y: container.height - 50
1929 width: 28
1930 height: 28
1931 anchors{
1932 verticalCenterOffset: 0
1933 verticalCenter: backButton.verticalCenter
1934 }
1935 sourceSize{
1936 height: 40
1937 width: 40
1938 }
1939 smooth: true
1940 fillMode: Image.Stretch
1941 source: "reloadIcon.png"
1942
1943 signal reloadIconClicked
1944
1945 MouseArea {
1946 id: reloadMouseArea
1947 anchors.fill: parent
1948 hoverEnabled: true
1949 onEntered: reloadForeground.opacity = buttonOpacity
1950 onExited: reloadForeground.opacity = 0.0
1951 onClicked: {
1952 reloadIcon.reloadIconClicked();
1953 }
1954 }
1955
1956 Rectangle {
1957 id: reloadForeground
1958 radius: 5
1959 opacity: 0
1960 anchors.fill: parent
1961 }
1962 states: [
1963 State {
1964 name: "invisible"
1965 when: (container.state !== "objectFromListSelected" && container.state !== "singleItemSelected")
1966 PropertyChanges {target: reloadMouseArea; enabled: false}
1967 PropertyChanges {target: reloadIcon; opacity: 0}
1968 }
1969 ]
1970
1971 }
1972
1973 Image {
1974 id: visibleIcon
1975 objectName: "visibleIconObj"
1976 state: "checked"
1977 x: 130
1978 y: container.height - 50
1979 width: 28
1980 height: 28
1981 anchors{
1982 verticalCenterOffset: 0
1983 verticalCenter: backButton.verticalCenter
1984 }
1985 sourceSize{
1986 height: 40
1987 width: 40
1988 }
1989 smooth: true
1990 fillMode: Image.Stretch
1991 source: "visibleIcon.png"
1992
1993 signal visibleIconClicked(bool visible)
1994
1995 MouseArea {
1996 id: visibleMouseArea
1997 anchors.fill: parent
1998 hoverEnabled: true
1999 onEntered: visibleForeground.opacity = buttonOpacity
2000 onExited: visibleForeground.opacity = 0.0
2001 onClicked: {
2002 visibleIcon.visibleIconClicked(visibleIcon.state === "unchecked")
2003 visibleIcon.state = (visibleIcon.state === "unchecked") ? "" : "unchecked"
2004 }
2005 }
2006
2007 Rectangle {
2008 id: visibleForeground
2009 radius: 5
2010 opacity: 0
2011 anchors.fill: parent
2012 }
2013 states: [
2014 State {
2015 name: "invisible"
2016 when: container.state !== "objectFromListSelected"
2017 PropertyChanges {target: visibleMouseArea; enabled: false}
2018 PropertyChanges {target: visibleIcon; opacity: 0}
2019 },
2020 State {
2021 name: "unchecked"
2022 PropertyChanges {target: visibleIcon; opacity: 0.5}
2023 }
2024 ]
2025 }
2026
2027 Image {
2028 id: favoriteIcon
2029 objectName: "favoriteIconObj"
2030 state: "checked"
2031 x: 170
2032 y: container.height - 50
2033 width: 28
2034 height: 28
2035 anchors{
2036 verticalCenterOffset: 0
2037 verticalCenter: backButton.verticalCenter
2038 }
2039 sourceSize{
2040 height: 40
2041 width: 40
2042 }
2043 smooth: true
2044 fillMode: Image.Stretch
2045 source: "favoriteIcon.png"
2046
2047 signal favoriteIconClicked(bool favorite)
2048
2049 MouseArea {
2050 id: favoriteMouseArea
2051 anchors.fill: parent
2052 hoverEnabled: true
2053 onEntered: favoriteForeground.opacity = buttonOpacity
2054 onExited: favoriteForeground.opacity = 0.0
2055 onClicked: {
2056 favoriteIcon.favoriteIconClicked(favoriteIcon.state === "unchecked")
2057 favoriteIcon.state = (favoriteIcon.state === "unchecked") ? "" : "unchecked"
2058 }
2059 }
2060 /**
2061 ToolTip{
2062 id: toolTip
2063 text: "Toggles the display of *interesting* objects vs. all objects. \n(For Galaxies, Nebulas, and Clusters Only!)"
2064 }
2065 **/
2066
2067 Rectangle {
2068 id: favoriteForeground
2069 radius: 5
2070 opacity: 0
2071 anchors.fill: parent
2072 }
2073 states: [
2074 State {
2075 name: "invisible"
2076 when: container.state !== "objectFromListSelected"
2077 PropertyChanges {target: favoriteMouseArea; enabled: false}
2078 PropertyChanges {target: favoriteIcon; opacity: 0}
2079 },
2080 State {
2081 name: "unchecked"
2082 PropertyChanges {target: favoriteIcon; opacity: 0.5}
2083 }
2084 ]
2085 }
2086
2087 Image {
2088 id: downloadIcon
2089 objectName: "downloadIconObj"
2090 x: 210
2091 y: container.height - 50
2092 width: 28
2093 height: 28
2094 anchors{
2095 verticalCenterOffset: 0
2096 verticalCenter: backButton.verticalCenter
2097 }
2098 sourceSize{
2099 height: 40
2100 width: 40
2101 }
2102 smooth: true
2103 fillMode: Image.Stretch
2104 source: "downloadIcon.png"
2105
2106 signal downloadIconClicked
2107
2108 MouseArea {
2109 id: downloadMouseArea
2110 anchors.fill: parent
2111 hoverEnabled: true
2112 onEntered: downloadForeground.opacity = buttonOpacity
2113 onExited: downloadForeground.opacity = 0.0
2114 onClicked: downloadIcon.downloadIconClicked()
2115 }
2116
2117 Rectangle {
2118 id: downloadForeground
2119 radius: 5
2120 opacity: 0
2121 anchors.fill: parent
2122 }
2123 states: [
2124 State {
2125 name: "invisible"
2126 when: container.state === "base" || container.state === ""
2127 PropertyChanges {target: downloadMouseArea; enabled: false}
2128 PropertyChanges {target: downloadIcon; opacity: 0}
2129 }
2130 ]
2131 }
2132
2133 Image {
2134 id: helpIcon
2135 x: 250
2136 y: container.height - 50
2137 width: 28
2138 height: 28
2139 anchors{
2140 verticalCenterOffset: 0
2141 verticalCenter: backButton.verticalCenter
2142 }
2143 sourceSize{
2144 height: 40
2145 width: 40
2146 }
2147 smooth: true
2148 fillMode: Image.Stretch
2149 source: "helpIcon.png"
2150
2151 MouseArea {
2152 id: helpMouseArea
2153 anchors.fill: parent
2154 hoverEnabled: true
2155 onEntered: helpForeground.opacity = buttonOpacity
2156 onExited: helpForeground.opacity = 0.0
2157 onClicked: (helpMessage.state === "helpDisplayed") ? helpMessage.state = "" : helpMessage.state = "helpDisplayed"
2158 }
2159
2160 Rectangle {
2161 id: helpForeground
2162 radius: 5
2163 opacity: 0
2164 anchors.fill: parent
2165 }
2166 }
2167
2168 Rectangle {
2169 id: nightVision
2170 objectName: "nightVision"
2171 opacity: 0
2172 color: "#510000"
2173 anchors.fill: parent
2174
2175 states: [
2176 State {
2177 name: "active"
2178 PropertyChanges {target: nightVision; opacity: 0.2}
2179 PropertyChanges {target: tabbedView; style: tabbedView.nightTabs}
2180 PropertyChanges {target: title; color: "red"}
2181 PropertyChanges {target: catTitle; color: "red"}
2182 PropertyChanges {target: nakedEyeText; color: "red"}
2183 PropertyChanges {target: dsoText; color: "red"}
2184 PropertyChanges {target: catalogText; color: "red"}
2185 PropertyChanges {target: soListEmptyMessage; color: "red"}
2186 PropertyChanges {target: soItemEmptyMessage; color: "red"}
2187 PropertyChanges {target: scrollbar; color: "red"}
2188 PropertyChanges {target: prevObjText; color: "red"}
2189 PropertyChanges {target: nextObjText; color: "red"}
2190 PropertyChanges {target: detailsText; color: "red"}
2191 PropertyChanges {target: soname; color: "red"}
2192 PropertyChanges {target: posText; color: "red"}
2193 PropertyChanges {target: detailsButton; color: "red"}
2194 PropertyChanges {target: centerButton; color: "red"}
2195 PropertyChanges {target: slewTelescopeButton; color: "red"}
2196 PropertyChanges {target: goBackText; color: "red"}
2197 }
2198 ]
2199
2200 }
2201
2202 states: [
2203 State {
2204 name: "base"
2205
2206 },
2207 State {
2208 name: "singleItemSelected"
2209
2210 PropertyChanges {
2211 target: viewsRow
2212 x: -(2 * categoryView.width)
2213 y: 0
2214 anchors{
2215 topMargin: 0
2216 bottomMargin: 0
2217 }
2218 }
2219
2220 PropertyChanges{target:skyObjView; flipped: true}
2221
2222 PropertyChanges {
2223 target: backButton
2224 x: container.width - 105
2225 }
2226 },
2227 State {
2228 name: "objectFromListSelected"
2229
2230 PropertyChanges {
2231 target: viewsRow
2232 x: -(2 * categoryView.width)
2233 y: 0
2234 anchors{
2235 topMargin: 0
2236 bottomMargin: 0
2237 }
2238 }
2239 //PropertyChanges {target: detailsView; focus: true}
2240 PropertyChanges {
2241 target: backButton
2242 x: container.width - 105
2243 }
2244 }
2245 ]
2246
2247 transitions: [
2248
2249 Transition {
2250 from: "*"
2251 to: "objectFromListSelected"
2252 NumberAnimation {
2253 target: viewsRow
2254 property: "x"
2255 duration: 250
2256 easing.type: Easing.InOutQuad
2257 }
2258 NumberAnimation {
2259 target: backButton
2260 property: "x"
2261 duration: 250
2262 easing.type: Easing.InOutQuad
2263 }
2264 },
2265 Transition {
2266 from: "objectFromListSelected"
2267 to: "base"
2268 NumberAnimation {
2269 target: viewsRow
2270 property: "x"
2271 duration: 250
2272 easing.type: Easing.InOutQuad
2273 }
2274 NumberAnimation {
2275 target: backButton
2276 property: "x"
2277 duration: 250
2278 easing.type: Easing.InOutQuad
2279 }
2280 }
2281 ]
2282}
QString xi18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
Type type(const QSqlDatabase &db)
qreal pixelSize(qreal scale)
KDOCTOOLS_EXPORT QString transform(const QString &file, const QString &stylesheet, const QList< const char * > &params=QList< const char * >())
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
QString name(StandardAction id)
const QList< QKeySequence > & back()
QString & fill(QChar ch, qsizetype size)
AlignVCenter
PointingHandCursor
NoButton
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 Sat Dec 21 2024 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.