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.5
9import QtQuick.Layouts 1.1
10import QtQuick.Controls 1.4
11import QtQuick.Controls.Styles 1.4
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{
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{
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{
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{
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 {
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{
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 {
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 {
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{
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{
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 {
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 {
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 {
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 {
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{
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 {
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 {
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 {
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 {
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 {
709 anchors.fill: parent
710 enabled: !parent.flipped // To hide content of front side on back side
711
712 Rectangle {
714 anchors.fill: soListViewContainer
715 color: "#00060b"
716 opacity: 0.5
717 radius: 12
718 }
719
720 Rectangle {
722 anchors{
723 top: soListContainer.top
724 bottom: soListContainer.bottom
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
752
753 model: soListModel
754
755 Rectangle{
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
779 width: 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
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: parent.width
801 height: (dispSummary.height >= 130) ? dispSummary.height + 20 : 160
802
803 Rectangle{
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 width: parent.width - image.width - 30
826 color: (nightVision.state == "active" && soListItem.ListView.isCurrentItem) ? "#F89404" : (nightVision.state == "active") ? "red" : (soListItem.ListView.isCurrentItem) ? "white" : (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "yellow" : "gray"
827
828 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
829 font{
830 family: "Arial"
831 pixelSize: 13
832 }
833
834 MouseArea {
835 id: mouseTextArea
836 anchors.fill: parent
837 hoverEnabled: true
838 onClicked: {
839 soListView.currentIndex = index
840 soListView.soListItemClicked(soListView.currentIndex)
841 skyObjView.flipped = true
842 }
843 }//Mousearea
844 }
845 }
846 Image {
847 id: image
848 width: 150
849 height: parent.height
850 fillMode: Image.PreserveAspectFit
851 source: imageSource
852 MouseArea {
853 id: mouseImgArea
854 anchors.fill: parent
855 hoverEnabled: true
856 onClicked: {
857 soListView.currentIndex = index
858 soListView.soListItemClicked(soListView.currentIndex)
859 }
860 }//Mousearea
861 }
862 Text {
863 id: dispText
864 objectName: dispName
865 text: dispName
866 renderType: Text.QtRendering
867 color: (nightVision.state == "active" && soListItem.ListView.isCurrentItem) ? "#F89404" : (nightVision.state == "active") ? "red" : (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "yellow" : "white"
868
869 font.bold: true
870 }
871 }//soListItem
872 }//soListView
873 }//Flickable
874 }//soListViewContainer
875 }//Front, soListContainer
876
877 back: Item {
879 width: parent.width
880 height: parent.height
881 enabled: parent.flipped
882
883
884 Rectangle {
886 anchors.fill: detailsView
887 color: "#00060b"
888 radius: 12
889 opacity: 0.500
890 }
891
892 Rectangle {
893 id: detailsView
894 objectName: "detailsViewObj"
895 x: parent.x + 15
896 height: parent.height
897 width: parent.width - 30
898 color: "transparent"
899 radius: 12
900 border {
901 width: 4
902 color: "#000000"
903 }
904
905 Text {
906 id: soname
907 objectName: "sonameObj"
908 y: 8
909 width: parent.width
910 height: 22
911 color: "#ffffff"
912 text: xi18n("text")
913 renderType: Text.QtRendering
914 anchors{
915 left: parent.left
916 leftMargin: 8
917 }
918 font{
919 bold: true
920 pixelSize: 16
921 }
922 verticalAlignment: Text.AlignVCenter
923 }
924
925 Text {
926 id: posText
927 objectName: "posTextObj"
928 y: parent.height - 50
929 anchors{
930 right: parent.right
931 rightMargin: 10
932 }
933 textFormat: Text.RichText
934 width: parent.width
935 height: 16
936 text: xi18n("text")
937 renderType: Text.QtRendering
938 horizontalAlignment: Text.AlignRight
939 font{
940 family: "Arial"
941 bold: true
942 pixelSize:11
943 }
944
945 }
946 Column {
948 x: 150
949 y: 80
950 width: parent.width
951 height: 93
952 spacing: 14
953
954 DetailsItem {
955 id: detailsText
956 textFormat: Text.RichText
957 objectName: "detailsTextObj"
958
959 }
960
961 }
962
963 Column {
965 y: 50
966 anchors {
967 left: parent.left
968 leftMargin: 10
969 }
970
971 spacing: 14
972
973 Text {
974 id: detailsButton
975 objectName: "detailsButtonObj"
976
977 verticalAlignment: Text.AlignVCenter
978 color: "white"
979 text: xi18n("More Details")
980 renderType: Text.QtRendering
981 font {
982 underline: true
983 family: "Cantarell"
984 pixelSize: 14
985 }
986
988
989 MouseArea {
991 hoverEnabled: true
992 cursorShape: Qt.PointingHandCursor
993 anchors.fill: parent
994 onEntered: detailsButton.color = (nightVision.state == "active") ? "red" : "yellow"
995 onExited: detailsButton.color = (nightVision.state == "active") ? "red" : "white"
997 }
998 }
999
1000 Text {
1001 id: centerButton
1002 objectName: "centerButtonObj"
1003
1004 verticalAlignment: Text.AlignVCenter
1005 color: "white"
1006 text: xi18n("Center in Map \n")
1007 renderType: Text.QtRendering
1008 font {
1009 underline: true
1010 family: "Arial"
1011 pixelSize: 14
1012 }
1013
1014 signal centerButtonClicked
1015
1016 MouseArea {
1018 hoverEnabled: true
1019 cursorShape: Qt.PointingHandCursor
1020 anchors.fill: parent
1021 onEntered: centerButton.color = (nightVision.state == "active") ? "red" : "yellow"
1022 onExited: centerButton.color = (nightVision.state == "active") ? "red" : "white"
1024 }
1025
1026 Text {
1027 text: xi18n(" Auto Track ")
1028 renderType: Text.QtRendering
1029 color: "white"
1030 font {
1031 family: "Arial"
1032 pixelSize: 14
1033 }
1034 y: 15
1035 }
1036
1037 CheckBox {
1038 id: autoCenter
1039 objectName: "autoCenterCheckbox"
1040 x: 37
1041 y: 15
1042 checked: true
1043 }
1044
1045 CheckBox {
1046 id: autoTrack
1047 objectName: "autoTrackCheckbox"
1048 x: 97
1049 y: 15
1050 checked: false
1052 }
1053
1054 }
1055
1056
1057 Text {
1059 objectName: "slewTelescopeButtonObj"
1060
1061 verticalAlignment: Text.AlignVCenter
1062 color: "white"
1063 text: xi18n("Slew Telescope")
1064 renderType: Text.QtRendering
1065 font {
1066 underline: true
1067 family: "Cantarell"
1068 pixelSize: 14
1069 }
1070
1072
1073 MouseArea {
1075 hoverEnabled: true
1076 cursorShape: Qt.PointingHandCursor
1077 anchors.fill: parent
1078 onEntered: slewTelescopeButton.color = (nightVision.state == "active") ? "red" : "yellow"
1079 onExited: slewTelescopeButton.color = (nightVision.state == "active") ? "red" : "white"
1081 }
1082 }
1083 }
1084 TabView {
1085 id: tabbedView
1086 y: 170
1087 width: parent.width
1088 height: parent.height - 170 - 50
1090
1091 property Component nightTabs: TabViewStyle {
1093 frameOverlap: 1
1094 tab: Rectangle {
1095 border.color: "black"
1096 implicitWidth: 150
1097 implicitHeight: 30
1098 color: "red"
1099 Text {
1100 id: text
1101 anchors.centerIn: parent
1102 text: styleData.title
1103 renderType: Text.QtRendering
1104 color: styleData.selected ? "white" : "black"
1105 }
1106 }
1107 }
1108
1109 Tab {
1110 title: xi18n("Object Information")
1111
1112
1113 Rectangle {
1114 id: descTextBox
1115 height: parent.height
1116 width: parent.width
1117 color: "#010a14"
1118 radius: 10
1119 border.width: 0
1120 anchors{
1121 top: parent.top
1122 left: parent.left
1123 leftMargin: 4
1124 right: parent.right
1125 rightMargin: 4
1126 }
1127 border.color: "#585454"
1128
1129 Flickable {
1131 clip: true
1133 width: parent.width
1134 height: parent.height - 10
1135 anchors{
1136 top: parent.top
1137 topMargin: 20
1138 bottom: parent.bottom
1139 bottomMargin: 4
1140 left: parent.left
1141 leftMargin: 10
1142 right: parent.right
1143 rightMargin: 10
1144 }
1145 contentWidth: parent.width
1146 contentHeight: col.height + 4
1147 Item {
1148 id: descTextItem
1149 anchors.fill: parent
1150 Column {
1151 id: col
1152 width: parent.width
1153 Image {
1154 id: detailImg
1155 width: parent.width - 20
1156 anchors{
1157 right: parent.right
1158 }
1159 objectName: "detailImage"
1160 property string refreshableSource
1161 fillMode: Image.PreserveAspectFit
1162 source: refreshableSource
1163 }
1164 Text {
1165 id: descText
1166 objectName: "descTextObj"
1167 color: "white"
1168 text: xi18n("text")
1169 renderType: Text.QtRendering
1170 clip: true
1171 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1172 width: parent.width - 20
1173 textFormat: Text.RichText
1174 font{
1175 family: "Arial"
1176 pixelSize: 13
1177 }
1178 onLinkActivated: Qt.openUrlExternally(link)
1179 MouseArea {
1180 anchors.fill: parent
1181 acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
1182 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
1183 }
1184 }
1185 } //column
1186 } //item
1187 } //flickable
1188 } //rectangle
1189 } //tab
1190
1191 Tab {
1192 id: infoBoxTab
1193 title: xi18n("Wikipedia Infotext")
1194
1195 active: true
1196 Rectangle {
1197 id: descTextBox2
1198 color: "#010a14"
1199 radius: 10
1200 border.width: 0
1201 states: [
1202 State {
1203 name: "outOfTab"
1204 when: ( (container.state == "singleItemSelected" && detailsView.width >= 600)||(container.state != "singleItemSelected" && detailsView.width >= 600 && detailsView.width < 900))
1206 PropertyChanges{target:descTextBox2; width: detailsView.width / 2}
1207 PropertyChanges{target:descTextBox2; anchors{
1208 top: detailsView.top
1209 topMargin: 4
1210 bottom: posText.top
1211 left: tabbedView.right
1212 right: detailsView.right
1213 }
1214 }
1215 PropertyChanges{target:tabbedView; currentIndex: 0}
1216 PropertyChanges{target:tabbedView; tabsVisible: false}
1217 PropertyChanges{target:tabbedView; width: detailsView.width / 2}
1218 },
1219 State {
1220 name: "includeList"
1221 when: (detailsView.width >= 900 && container.state!="singleItemSelected")
1223 PropertyChanges{target: soListViewContainer; anchors{
1224 top: detailsView.top
1225 bottom: posText.top
1226 left: detailsView.left
1227 right: tabbedView.left
1228 }
1229 }
1231 PropertyChanges{target:descTextBox2; width: detailsView.width / 3}
1232 PropertyChanges{target:descTextBox2; anchors{
1233 top: detailsView.top
1234 topMargin: 4
1235 bottom: posText.top
1236 left: tabbedView.right
1237 right: detailsView.right
1238 }
1239 }
1240 PropertyChanges{target:soListViewContainer; width: detailsView.width / 3}
1241 PropertyChanges{target:tabbedView; x: detailsView.width / 3}
1242 PropertyChanges{target:detailsViewButtonsCol; anchors.left: soListViewContainer.right}
1243 PropertyChanges{target:soname; anchors.left: soListViewContainer.right}
1244 PropertyChanges{target:detailItemsCol; x: 150 + detailsView.width / 3}
1245 PropertyChanges{target:tabbedView; width: detailsView.width / 3}
1246 PropertyChanges{target:tabbedView; currentIndex: 0}
1247 PropertyChanges{target:tabbedView; tabsVisible: false}
1248 PropertyChanges{target:skyObjView; flipped: true}
1249 }
1250 ]
1251
1252 anchors{
1253 top: infoBoxTab.top
1254 bottom: infoBoxTab.bottom
1255 left: infoBoxTab.left
1256 right: infoBoxTab.right
1257 rightMargin: 4
1258 leftMargin: 4
1259 }
1260 border.color: "#585454"
1261
1262 Flickable {
1264 clip: true
1265 flickableDirection: Flickable.VerticalFlick
1266 width: parent.width
1267 height: parent.height - 10
1268 anchors{
1269 top: parent.top
1270 topMargin: 10
1271 bottom: parent.bottom
1272 bottomMargin: 4
1273 left: parent.left
1274 right: parent.right
1275 }
1276 contentWidth: parent.width
1277 contentHeight: col2.height + 4
1278 Item {
1280 anchors{
1281 top: parent.top
1282 topMargin: 0
1283 left: parent.left
1284 leftMargin: 4
1285 right: parent.right
1286 rightMargin: 4
1287 }
1288 Column {
1289 id: col2
1290 width: parent.width
1291 Text {
1292 id: infoText
1293 objectName: "infoBoxText"
1294 textFormat: Text.RichText
1295 color: "white"
1296 onLinkActivated: Qt.openUrlExternally(link)
1297 MouseArea {
1298 anchors.fill: parent
1299 acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
1300 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
1301 }
1302
1303 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1304 verticalAlignment: Text.AlignVCenter
1305 horizontalAlignment: Text.AlignHCenter
1306 text: xi18n("Info Text")
1307 renderType: Text.QtRendering
1308 clip: true
1309 width: parent.width
1310 font{
1311 family: "Arial"
1312 pixelSize: 13
1313 } //font
1314 } //text
1315 } //column
1316 } //item
1317 } //flickable
1318 } //rectangle
1319 } //tab
1320 } //tabview
1321
1322
1323
1324 Item {
1325 id: nextObjRect
1326 objectName: "nextObj"
1327 width: nextObjText.width + nextObjIcon.width + 10
1328 height: 28
1329 anchors {
1330 right: parent.right
1331 rightMargin: 10
1332 bottom: parent.bottom
1333 bottomMargin: 0
1334 }
1335
1336 signal nextObjClicked
1337
1338 Rectangle {
1340 radius: 5
1341 anchors.fill: parent
1342 opacity: 0
1343 }
1344
1345 MouseArea {
1347
1348 anchors.fill: nextObjRect
1349 hoverEnabled: true
1350 onEntered: {
1351 nextObjForeground.opacity = 0.1
1352 nextObjText.color = (nightVision.state == "active") ? "red" : "yellow"
1353 }
1354 onExited: {
1355 nextObjForeground.opacity = 0.0
1356 nextObjText.color = (nightVision.state == "active") ? "red" : "white"
1357 }
1358 onClicked: {
1359 nextObjRect.nextObjClicked()
1360 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1361 }
1362 }
1363
1364 Text {
1365 id: nextObjText
1366 objectName: "nextTextObj"
1367
1368 height: 22
1369 color: "white"
1370 text: xi18n("Next")
1371 renderType: Text.QtRendering
1372 anchors{
1373 right: nextObjIcon.left
1374 rightMargin: 5
1375 verticalCenter: parent.verticalCenter
1376 }
1377 visible: true
1378 verticalAlignment: Text.AlignVCenter
1379 horizontalAlignment: Text.AlignRight
1380 font{
1381 bold: true
1382 pixelSize:11
1383 }
1384 }
1385
1386 Image {
1387 id: nextObjIcon
1388
1389 anchors{
1390 right: parent.right
1391 verticalCenter: parent.verticalCenter
1392 }
1393 sourceSize {
1394 height: 24
1395 width: 24
1396 }
1397 source: "next.png"
1398 }
1399 }
1400
1401 Item {
1402 id: prevObjRect
1403 objectName: "prevObj"
1404
1405 width: prevObjText.width + prevObjIcon.width + 10
1406 height: 28
1407 anchors {
1408 left: parent.left
1409 leftMargin: 10
1410 bottom: parent.bottom
1411 bottomMargin: 0
1412 }
1413
1414 signal prevObjClicked
1415
1416 Rectangle {
1418 radius: 5
1419 anchors.fill: parent
1420 opacity: 0
1421 }
1422
1423 MouseArea {
1425 anchors.fill: parent
1426 hoverEnabled: true
1427 onEntered: {
1428 prevObjForeground.opacity = 0.1
1429 prevObjText.color = (nightVision.state == "active") ? "red" : "yellow"
1430 }
1431 onExited: {
1432 prevObjForeground.opacity = 0.0
1433 prevObjText.color = (nightVision.state == "active") ? "red" : "white"
1434 }
1435 onClicked: {
1436 prevObjRect.prevObjClicked()
1437 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1438 }
1439 }
1440
1441 Text {
1442 id: prevObjText
1443 objectName: "prevTextObj"
1444
1445 height: 22
1446 color: "#ffffff"
1447 text: xi18n("Previous")
1448 renderType: Text.QtRendering
1449 anchors{
1450 left: prevObjIcon.right
1451 leftMargin: 5
1452 verticalCenter: parent.verticalCenter
1453 }
1454 visible: true
1455 horizontalAlignment: Text.AlignLeft
1456 verticalAlignment: Text.AlignVCenter
1457 font{
1458 pixelSize: 11
1459 bold: true
1460 }
1461 }
1462
1463 Image {
1464 id: prevObjIcon
1465 anchors.verticalCenter: parent.verticalCenter
1466 sourceSize{
1467 height: 24
1468 width: 24
1469 }
1470 source: "previous.png"
1471 }
1472 }
1473
1474
1475 } //end of detailsView
1476
1477 Rectangle{
1479 objectName: "soItemEmptyMessage"
1480 color: "#00060b"
1481 anchors.fill: parent
1482 Text{
1483 anchors.fill: parent
1484 text: xi18n("No Items to display")
1485 renderType: Text.QtRendering
1486 verticalAlignment: Text.AlignVCenter
1487 horizontalAlignment: Text.AlignHCenter
1488 color: "white"
1489 font{
1490 family: "Arial"
1491 pointSize: 20
1492 }
1493 }
1494 visible: (soListView.count > 0 || container.state == "singleItemSelected") ? false : true
1495 }
1496
1497 } //end of detailsViewContainer
1498
1499 focus:true
1500
1501 Keys.onPressed: {
1502 if (event.key == Qt.Key_Left||event.key == Qt.Key_Up) {
1503 prevObjRect.prevObjClicked();
1504 event.accepted = true;
1505 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1506 }
1507 if (event.key == Qt.Key_Right||event.key == Qt.Key_Down) {
1508 nextObjRect.nextObjClicked();
1509 event.accepted = true;
1510 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning)
1511 }
1512 }
1513
1514 states: [
1515 State {
1516 name: "back"
1518 target: listToDetailsRotation
1519 angle: 180
1520 }
1521
1522 when: skyObjView.flipped
1523 }
1524 ]
1525
1526 transitions: [
1527 Transition {
1529 target: listToDetailsRotation
1530 property: "angle"
1531 duration: 400
1532 }
1533 }
1534 ]
1535
1538 origin.x: container.width / 2
1539 axis.y: 1
1540 axis.z: 0
1541 }
1542
1543 Rectangle{
1544 id: loadingMessage
1545 objectName: "loadingMessage"
1546 color: "#00060b"
1547 anchors.fill: parent
1548 visible: false
1549 Text{
1550 anchors.fill: parent
1551 text: xi18n("Loading...")
1552 renderType: Text.QtRendering
1553 verticalAlignment: Text.AlignVCenter
1554 horizontalAlignment: Text.AlignHCenter
1555 color: "white"
1556 font{
1557 family: "Arial"
1558 pointSize: 30
1559 }
1560 }
1561 states: [
1562 State {
1563 name: "loading"
1564 PropertyChanges {target: loadingMessage; visible: true }
1565 PropertyChanges {target: skyObjView; flipped:false }
1566 }
1567 ]
1568 }
1569 } //end of skyObjView
1570 } //end of viewsContainer
1571 Rectangle{
1572 id: helpMessage
1573 objectName: "helpMessage"
1574 color: "#00060b"
1575 anchors.fill: parent
1576 visible: false
1577 Text{
1578 id: helpText
1579 anchors.left: helpMessage.left
1580 anchors.right: helpMessage.right
1581 anchors.margins: 10
1582 text: xi18n("Explanation of the What's Interesting Panel")
1583 renderType: Text.QtRendering
1584 horizontalAlignment: Text.AlignHCenter
1585 color: "white"
1586 font{
1587 family: "Arial"
1588 pointSize: 15
1589 }
1590 }
1591 Text{
1592 id: helpExplainText
1593 anchors.margins: 10
1594 anchors.top: helpText.bottom
1595 anchors.left: helpMessage.left
1596 anchors.right: helpMessage.right
1597 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.")
1598 renderType: Text.QtRendering
1599 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1600 color: "white"
1601 font{
1602 family: "Arial"
1603 pointSize: 11
1604 }
1605 }
1606 Image {
1607 id: helpSettingsImage
1608 anchors.top: helpExplainText.bottom
1609 source: "settingsIcon.png"
1610 width: 28
1611 height: 28
1612 }
1613 Text{
1614 id: helpSettingsText
1615 anchors.top: helpExplainText.bottom
1616 anchors.left: helpSettingsImage.right
1617 anchors.right: helpMessage.right
1618 anchors.margins: 10
1619 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1620 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.")
1621 renderType: Text.QtRendering
1622 color: "white"
1623 font{
1624 family: "Arial"
1625 pointSize: 11
1626 }
1627 }
1628 Image {
1629 id: helpInspectImage
1630 anchors.top: helpSettingsText.bottom
1631 source: "inspectIcon.png"
1632 width: 28
1633 height: 28
1634 }
1635 Text{
1636 id: helpInspectText
1637 anchors.top: helpSettingsText.bottom
1638 anchors.left: helpInspectImage.right
1639 anchors.right: helpMessage.right
1640 anchors.margins: 10
1641 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1642 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.")
1643 renderType: Text.QtRendering
1644 color: "white"
1645 font{
1646 family: "Arial"
1647 pointSize: 11
1648 }
1649 }
1650 Image {
1651 id: helpReloadImage
1652 anchors.top: helpInspectText.bottom
1653 source: "reloadIcon.png"
1654 width: 28
1655 height: 28
1656 }
1657 Text{
1658 id: helpReloadText
1659 anchors.top: helpInspectText.bottom
1660 anchors.left: helpReloadImage.right
1661 anchors.right: helpMessage.right
1662 anchors.margins: 10
1663 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1664 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.")
1665 renderType: Text.QtRendering
1666 color: "white"
1667 font{
1668 family: "Arial"
1669 pointSize: 11
1670 }
1671 }
1672 Image {
1673 id: helpVisibleImage
1674 anchors.top: helpReloadText.bottom
1675 source: "visibleIcon.png"
1676 width: 28
1677 height: 28
1678 }
1679 Text{
1680 id: helpVisibleText
1681 anchors.top: helpReloadText.bottom
1682 anchors.left: helpVisibleImage.right
1683 anchors.right: helpMessage.right
1684 anchors.margins: 10
1685 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1686 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.")
1687 renderType: Text.QtRendering
1688 color: "white"
1689 font{
1690 family: "Arial"
1691 pointSize: 11
1692 }
1693 }
1694 Image {
1695 id: helpFavoriteImage
1696 anchors.top: helpVisibleText.bottom
1697 source: "favoriteIcon.png"
1698 width: 28
1699 height: 28
1700 }
1701 Text{
1702 id: helpFavoriteText
1703 anchors.top: helpVisibleText.bottom
1704 anchors.left: helpFavoriteImage.right
1705 anchors.right: helpMessage.right
1706 anchors.margins: 10
1707 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1708 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.")
1709 renderType: Text.QtRendering
1710 color: "white"
1711 font{
1712 family: "Arial"
1713 pointSize: 11
1714 }
1715 }
1716 Image {
1717 id: helpDownloadImage
1718 anchors.top: helpFavoriteText.bottom
1719 source: "downloadIcon.png"
1720 width: 28
1721 height: 28
1722 }
1723 Text{
1724 id: helpDownloadText
1725 anchors.top: helpFavoriteText.bottom
1726 anchors.left: helpDownloadImage.right
1727 anchors.right: helpMessage.right
1728 anchors.margins: 10
1729 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1730 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.")
1731 renderType: Text.QtRendering
1732 color: "white"
1733 font{
1734 family: "Arial"
1735 pointSize: 11
1736 }
1737 }
1738 states: [
1739 State {
1740 name: "helpDisplayed"
1741 PropertyChanges {target: helpMessage; visible: true }
1742 PropertyChanges {target: backButton; x: container.width - 105}
1743 }
1744 ]
1745 }
1746 } //end of base
1747
1748 Rectangle {
1749 id: backButton
1750 x: container.width + 10
1751 y: container.height - 50
1752 width: leftArrow.width + goBackText.width + 18
1753 height: 49
1754 color: "#00000000"
1755 radius: 5
1756
1757 Rectangle {
1758 id: goBackForeground
1759 anchors.fill: parent
1760 radius: 5
1761 opacity: 0.0
1762 }
1763
1764 Text {
1765 id: goBackText
1766 y: 12
1767 color: "#f7e808"
1768 text: xi18n("Back")
1769 renderType: Text.QtRendering
1770 anchors {
1771 left: leftArrow.right
1772 leftMargin: 7
1774 verticalCenter: leftArrow.verticalCenter
1775 }
1776 font{
1777 family: "Cantarell"
1778 pointSize: 13
1779 }
1780 verticalAlignment: Text.AlignVCenter
1781 horizontalAlignment: Text.AlignHCenter
1782 }
1783
1784 Image {
1785 id: leftArrow
1786 y: 9
1787 anchors{
1788 left: parent.left
1789 leftMargin: 4
1791 verticalCenter: parent.verticalCenter
1792 }
1793 source: "leftArrow.png"
1794 }
1795
1796 MouseArea {
1797 id: backButtonMouseArea
1798 anchors.fill: backButton
1799 hoverEnabled: true
1800 onEntered: goBackForeground.opacity = buttonOpacity
1801 onExited: goBackForeground.opacity = 0.0
1802 onClicked: {
1803 if(helpMessage.state == "helpDisplayed"){
1804 helpMessage.state = ""
1805 } else if (container.state == "objectFromListSelected") {
1806 if (!skyObjView.flipped||container.width>=900) {
1807 container.state = "base"
1808 catTitle.text = ""
1809 } else if (skyObjView.flipped) {
1810 skyObjView.flipped = false
1811 }
1812 } else if (container.state == "singleItemSelected") {
1813 container.state = "base"
1814 catTitle.text = ""
1815 if (container.width>=900) {
1816 skyObjView.flipped = true
1817 } else{
1818 skyObjView.flipped = false
1819 }
1820 }
1821 }
1822 }
1823 }
1824
1825 Image {
1826 id: settingsIcon
1827 objectName: "settingsIconObj"
1828 x: 10
1829 y: container.height - 50
1830 width: 28
1831 height: 28
1832 anchors{
1834 verticalCenter: backButton.verticalCenter
1835 }
1836 sourceSize{
1837 height: 40
1838 width: 40
1839 }
1840 smooth: true
1841 fillMode: Image.Stretch
1842 source: "settingsIcon.png"
1843
1844 signal settingsIconClicked
1845
1846 MouseArea {
1847 id: settingsMouseArea
1848 anchors.fill: parent
1849 hoverEnabled: true
1850 onEntered: settingsForeground.opacity = buttonOpacity
1851 onExited: settingsForeground.opacity = 0.0
1852 onClicked: settingsIcon.settingsIconClicked()
1853 }
1854
1855 Rectangle {
1856 id: settingsForeground
1857 anchors.fill: parent
1858 opacity: 0.0
1859 radius: 5
1860 }
1861 }
1862
1863 Image {
1864 id: inspectIcon
1865 objectName: "inspectIconObj"
1866 state: "checked"
1867 x: 50
1868 y: container.height - 50
1869 width: 28
1870 height: 28
1871 anchors{
1873 verticalCenter: backButton.verticalCenter
1874 }
1875 sourceSize{
1876 height: 40
1877 width: 40
1878 }
1879 smooth: true
1880 fillMode: Image.Stretch
1881 source: "inspectIcon.png"
1882
1883 signal inspectIconClicked(bool inspect)
1884
1885 MouseArea {
1886 id: inspectMouseArea
1887 anchors.fill: parent
1888 hoverEnabled: true
1889 onEntered: inspectForeground.opacity = buttonOpacity
1890 onExited: inspectForeground.opacity = 0.0
1891 onClicked: {
1892 inspectIcon.inspectIconClicked(inspectIcon.state == "checked")
1893 inspectIcon.state = (inspectIcon.state == "checked") ? "" : "checked"
1894 }
1895 }
1896
1897 Rectangle {
1898 id: inspectForeground
1899 radius: 5
1900 opacity: 0
1901 anchors.fill: parent
1902 }
1903 states: [
1904 State {
1905 name: "checked"
1906 PropertyChanges {target: inspectIcon; opacity: 0.5}
1907 }
1908 ]
1909 }
1910
1911 Image {
1912 id: reloadIcon
1913 objectName: "reloadIconObj"
1914 x: 90
1915 y: container.height - 50
1916 width: 28
1917 height: 28
1918 anchors{
1920 verticalCenter: backButton.verticalCenter
1921 }
1922 sourceSize{
1923 height: 40
1924 width: 40
1925 }
1926 smooth: true
1927 fillMode: Image.Stretch
1928 source: "reloadIcon.png"
1929
1930 signal reloadIconClicked
1931
1932 MouseArea {
1933 id: reloadMouseArea
1934 anchors.fill: parent
1935 hoverEnabled: true
1936 onEntered: reloadForeground.opacity = buttonOpacity
1937 onExited: reloadForeground.opacity = 0.0
1938 onClicked: {
1939 reloadIcon.reloadIconClicked();
1940 }
1941 }
1942
1943 Rectangle {
1944 id: reloadForeground
1945 radius: 5
1946 opacity: 0
1947 anchors.fill: parent
1948 }
1949 states: [
1950 State {
1951 name: "invisible"
1952 when: (container.state != "objectFromListSelected" && container.state != "singleItemSelected")
1953 PropertyChanges {target: reloadMouseArea; enabled: false}
1954 PropertyChanges {target: reloadIcon; opacity: 0}
1955 }
1956 ]
1957
1958 }
1959
1960 Image {
1961 id: visibleIcon
1962 objectName: "visibleIconObj"
1963 state: "checked"
1964 x: 130
1965 y: container.height - 50
1966 width: 28
1967 height: 28
1968 anchors{
1970 verticalCenter: backButton.verticalCenter
1971 }
1972 sourceSize{
1973 height: 40
1974 width: 40
1975 }
1976 smooth: true
1977 fillMode: Image.Stretch
1978 source: "visibleIcon.png"
1979
1980 signal visibleIconClicked(bool visible)
1981
1982 MouseArea {
1983 id: visibleMouseArea
1984 anchors.fill: parent
1985 hoverEnabled: true
1986 onEntered: visibleForeground.opacity = buttonOpacity
1987 onExited: visibleForeground.opacity = 0.0
1988 onClicked: {
1989 visibleIcon.visibleIconClicked(visibleIcon.state == "unchecked")
1990 visibleIcon.state = (visibleIcon.state == "unchecked") ? "" : "unchecked"
1991 }
1992 }
1993
1994 Rectangle {
1995 id: visibleForeground
1996 radius: 5
1997 opacity: 0
1998 anchors.fill: parent
1999 }
2000 states: [
2001 State {
2002 name: "invisible"
2003 when: container.state != "objectFromListSelected"
2004 PropertyChanges {target: visibleMouseArea; enabled: false}
2005 PropertyChanges {target: visibleIcon; opacity: 0}
2006 },
2007 State {
2008 name: "unchecked"
2009 PropertyChanges {target: visibleIcon; opacity: 0.5}
2010 }
2011 ]
2012 }
2013
2014 Image {
2015 id: favoriteIcon
2016 objectName: "favoriteIconObj"
2017 state: "checked"
2018 x: 170
2019 y: container.height - 50
2020 width: 28
2021 height: 28
2022 anchors{
2024 verticalCenter: backButton.verticalCenter
2025 }
2026 sourceSize{
2027 height: 40
2028 width: 40
2029 }
2030 smooth: true
2031 fillMode: Image.Stretch
2032 source: "favoriteIcon.png"
2033
2034 signal favoriteIconClicked(bool favorite)
2035
2036 MouseArea {
2037 id: favoriteMouseArea
2038 anchors.fill: parent
2039 hoverEnabled: true
2040 onEntered: favoriteForeground.opacity = buttonOpacity
2041 onExited: favoriteForeground.opacity = 0.0
2042 onClicked: {
2043 favoriteIcon.favoriteIconClicked(favoriteIcon.state == "unchecked")
2044 favoriteIcon.state = (favoriteIcon.state == "unchecked") ? "" : "unchecked"
2045 }
2046 }
2047 /**
2048 ToolTip{
2049 id: toolTip
2050 text: "Toggles the display of *interesting* objects vs. all objects. \n(For Galaxies, Nebulas, and Clusters Only!)"
2051 }
2052 **/
2053
2054 Rectangle {
2055 id: favoriteForeground
2056 radius: 5
2057 opacity: 0
2058 anchors.fill: parent
2059 }
2060 states: [
2061 State {
2062 name: "invisible"
2063 when: container.state != "objectFromListSelected"
2064 PropertyChanges {target: favoriteMouseArea; enabled: false}
2065 PropertyChanges {target: favoriteIcon; opacity: 0}
2066 },
2067 State {
2068 name: "unchecked"
2069 PropertyChanges {target: favoriteIcon; opacity: 0.5}
2070 }
2071 ]
2072 }
2073
2074 Image {
2075 id: downloadIcon
2076 objectName: "downloadIconObj"
2077 x: 210
2078 y: container.height - 50
2079 width: 28
2080 height: 28
2081 anchors{
2083 verticalCenter: backButton.verticalCenter
2084 }
2085 sourceSize{
2086 height: 40
2087 width: 40
2088 }
2089 smooth: true
2090 fillMode: Image.Stretch
2091 source: "downloadIcon.png"
2092
2093 signal downloadIconClicked
2094
2095 MouseArea {
2096 id: downloadMouseArea
2097 anchors.fill: parent
2098 hoverEnabled: true
2099 onEntered: downloadForeground.opacity = buttonOpacity
2100 onExited: downloadForeground.opacity = 0.0
2101 onClicked: downloadIcon.downloadIconClicked()
2102 }
2103
2104 Rectangle {
2105 id: downloadForeground
2106 radius: 5
2107 opacity: 0
2108 anchors.fill: parent
2109 }
2110 states: [
2111 State {
2112 name: "invisible"
2113 when: container.state == "base" || container.state == ""
2114 PropertyChanges {target: downloadMouseArea; enabled: false}
2115 PropertyChanges {target: downloadIcon; opacity: 0}
2116 }
2117 ]
2118 }
2119
2120 Image {
2121 id: helpIcon
2122 x: 250
2123 y: container.height - 50
2124 width: 28
2125 height: 28
2126 anchors{
2128 verticalCenter: backButton.verticalCenter
2129 }
2130 sourceSize{
2131 height: 40
2132 width: 40
2133 }
2134 smooth: true
2135 fillMode: Image.Stretch
2136 source: "helpIcon.png"
2137
2138 MouseArea {
2139 id: helpMouseArea
2140 anchors.fill: parent
2141 hoverEnabled: true
2142 onEntered: helpForeground.opacity = buttonOpacity
2143 onExited: helpForeground.opacity = 0.0
2144 onClicked: (helpMessage.state == "helpDisplayed") ? helpMessage.state = "" : helpMessage.state = "helpDisplayed"
2145 }
2146
2147 Rectangle {
2148 id: helpForeground
2149 radius: 5
2150 opacity: 0
2151 anchors.fill: parent
2152 }
2153 }
2154
2155 Rectangle {
2156 id: nightVision
2157 objectName: "nightVision"
2158 opacity: 0
2159 color: "#510000"
2160 anchors.fill: parent
2161
2162 states: [
2163 State {
2164 name: "active"
2165 PropertyChanges {target: nightVision; opacity: 0.2}
2166 PropertyChanges {target: tabbedView; style: tabbedView.nightTabs}
2167 PropertyChanges {target: title; color: "red"}
2168 PropertyChanges {target: catTitle; color: "red"}
2169 PropertyChanges {target: nakedEyeText; color: "red"}
2170 PropertyChanges {target: dsoText; color: "red"}
2171 PropertyChanges {target: catalogText; color: "red"}
2172 PropertyChanges {target: soListEmptyMessage; color: "red"}
2173 PropertyChanges {target: soItemEmptyMessage; color: "red"}
2174 PropertyChanges {target: scrollbar; color: "red"}
2175 PropertyChanges {target: prevObjText; color: "red"}
2176 PropertyChanges {target: nextObjText; color: "red"}
2177 PropertyChanges {target: detailsText; color: "red"}
2178 PropertyChanges {target: soname; color: "red"}
2179 PropertyChanges {target: posText; color: "red"}
2180 PropertyChanges {target: detailsButton; color: "red"}
2181 PropertyChanges {target: centerButton; color: "red"}
2182 PropertyChanges {target: slewTelescopeButton; color: "red"}
2183 PropertyChanges {target: goBackText; color: "red"}
2184 }
2185 ]
2186
2187 }
2188
2189 states: [
2190 State {
2191 name: "base"
2192
2193 },
2194 State {
2195 name: "singleItemSelected"
2196
2198 target: viewsRow
2199 x: -(2 * categoryView.width)
2200 y: 0
2201 anchors{
2202 topMargin: 0
2203 bottomMargin: 0
2204 }
2205 }
2206
2207 PropertyChanges{target:skyObjView; flipped: true}
2208
2210 target: backButton
2211 x: container.width - 105
2212 }
2213 },
2214 State {
2215 name: "objectFromListSelected"
2216
2218 target: viewsRow
2219 x: -(2 * categoryView.width)
2220 y: 0
2221 anchors{
2222 topMargin: 0
2223 bottomMargin: 0
2224 }
2225 }
2226 //PropertyChanges {target: detailsView; focus: true}
2228 target: backButton
2229 x: container.width - 105
2230 }
2231 }
2232 ]
2233
2234 transitions: [
2235
2236 Transition {
2237 from: "*"
2238 to: "objectFromListSelected"
2240 target: viewsRow
2241 property: "x"
2242 duration: 250
2243 easing.type: Easing.InOutQuad
2244 }
2246 target: backButton
2247 property: "x"
2248 duration: 250
2249 easing.type: Easing.InOutQuad
2250 }
2251 },
2252 Transition {
2253 from: "objectFromListSelected"
2254 to: "base"
2256 target: viewsRow
2257 property: "x"
2258 duration: 250
2259 easing.type: Easing.InOutQuad
2260 }
2262 target: backButton
2263 property: "x"
2264 duration: 250
2265 easing.type: Easing.InOutQuad
2266 }
2267 }
2268 ]
2269}
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)
QAction * back(const QObject *recvr, const char *slot, QObject *parent)
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 Fri May 17 2024 11:48:25 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.