Kstars

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

KDE's Doxygen guidelines are available online.