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

KDE's Doxygen guidelines are available online.