• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • tools
  • whatsinteresting
  • qml
wiview.qml
Go to the documentation of this file.
1 // Copyright (C) 2013 Samikshan Bairagya <samikshan@gmail.com>
2 /***************************************************************************
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  ***************************************************************************/
10 
11 import QtQuick 1.0
12 
13 Rectangle {
14  id: container
15  objectName: "containerObj"
16  width: 376
17  height: 575
18  color: "#020518"
19  anchors.fill: parent
20 
21  Text {
22  id: title
23  x: 9
24  y: 34
25  width: 209
26  height: 46
27  color: "#59ad0e"
28  text: i18n("What's Interesting...")
29  verticalAlignment: Text.AlignVCenter
30  font.family: "Cantarell"
31  font.bold: false
32  font.pixelSize: 22
33  }
34 
35  Rectangle {
36  id: base
37  y: 89
38  width: parent.width
39  height: 385
40  color: "transparent"
41  radius: 12
42  anchors.left: parent.left
43  anchors.leftMargin: 0
44  anchors.right: parent.right
45  anchors.rightMargin: 0
46  Item {
47  id: viewsRow
48  objectName: "viewsRowObj"
49  width: parent.width
50  anchors.top: parent.top
51  anchors.bottom: parent.bottom
52 
53  signal categorySelected(int category)
54 
55  Rectangle {
56  id: categoryView
57  x: 0
58  y: 31
59  width: parent.width
60  height: 351
61  color: "transparent"
62 
63  Rectangle {
64  id: background
65 
66  color: "#00060b"
67  radius: 12
68  anchors.top: parent.top
69  anchors.topMargin: 15
70  anchors.bottom: parent.bottom
71  anchors.bottomMargin: 13
72  anchors.right: parent.right
73  anchors.rightMargin: 20
74  anchors.left: parent.left
75  anchors.leftMargin: 20
76  opacity: 0.500
77  border.width: 4
78  border.color: "black"
79  }
80 
81  Rectangle {
82  id: planetRect
83  x: 128
84  y: 35
85  width: planetText.width
86  height: planetText.height
87  color: "#00000000"
88  anchors.verticalCenterOffset: -130
89  anchors.horizontalCenterOffset: -30
90  anchors.verticalCenter: parent.verticalCenter
91  anchors.horizontalCenter: parent.horizontalCenter
92 
93  Text {
94  id: planetText
95  x: 0
96  y: 0
97  color: "#e4800d"
98  text: i18n("Planets")
99  anchors.horizontalCenter: parent.horizontalCenter
100  anchors.verticalCenter: parent.verticalCenter
101  verticalAlignment: Text.AlignVCenter
102  horizontalAlignment: Text.AlignHCenter
103  font.family: "Cantarell"
104  font.pixelSize: 16
105 
106  MouseArea {
107  id: planetMouseArea
108  anchors.fill: parent
109  hoverEnabled: true
110  onEntered: container.state = "planetAreaEntered"
111  onClicked: {
112  viewsRow.categorySelected(0)
113  container.state = "soTypeSelected"
114  }
115  }
116  }
117  }
118 
119  Rectangle {
120  id: starRect
121  x: 253
122  y: 80
123  width: starText.width
124  height: starText.height
125  color: "#00000000"
126  anchors.verticalCenterOffset: -85
127  anchors.horizontalCenterOffset: 87
128  anchors.horizontalCenter: parent.horizontalCenter
129  anchors.verticalCenter: parent.verticalCenter
130 
131  Text {
132  id: starText
133  x: 0
134  y: 0
135  color: "#e4800d"
136  text: i18n("Stars")
137  anchors.horizontalCenter: parent.horizontalCenter
138  anchors.verticalCenter: parent.verticalCenter
139  verticalAlignment: Text.AlignVCenter
140  horizontalAlignment: Text.AlignHCenter
141  font.family: "Cantarell"
142  font.pixelSize: 16
143 
144  MouseArea {
145  id: starMouseArea
146  hoverEnabled: true
147  anchors.fill: parent
148  onEntered: container.state = "starAreaEntered"
149  onClicked: {
150  viewsRow.categorySelected(1)
151  container.state = "soTypeSelected"
152  }
153  }
154  }
155  }
156 
157  Rectangle {
158  id: conRect
159  x: 71
160  y: 113
161  width: conText.width
162  height: conText.height
163  color: "#00000000"
164  anchors.verticalCenterOffset: -52
165  anchors.horizontalCenterOffset: -63
166  anchors.horizontalCenter: parent.horizontalCenter
167  anchors.verticalCenter: parent.verticalCenter
168 
169  Text {
170  id: conText
171  color: "#e4800d"
172  text: i18n("Constellations")
173  anchors.verticalCenter: parent.verticalCenter
174  anchors.horizontalCenter: parent.horizontalCenter
175  font.family: "Cantarell"
176  verticalAlignment: Text.AlignVCenter
177  horizontalAlignment: Text.AlignHCenter
178  font.pixelSize: 16
179 
180  MouseArea {
181  id: conMouseArea
182  anchors.fill: parent
183  hoverEnabled: true
184  onEntered: container.state = "conAreaEntered"
185  onClicked: {
186  viewsRow.categorySelected(2)
187  container.state = "soTypeSelected"
188  }
189  }
190  }
191  }
192 
193  Rectangle {
194  id: dsoContainer
195  y: 172
196  height: 166
197  color: "#00000000"
198  anchors.right: parent.right
199  anchors.rightMargin: 35
200  anchors.left: parent.left
201  anchors.leftMargin: 35
202 
203  Rectangle {
204  id: dsoRect
205  x: 79
206  y: 18
207  width: dsoText.width
208  height: dsoText.height
209  color: "#00000000"
210  anchors.verticalCenterOffset: -54
211  anchors.horizontalCenterOffset: 0
212  anchors.horizontalCenter: parent.horizontalCenter
213  anchors.verticalCenter: parent.verticalCenter
214  Text {
215  id: dsoText
216  x: 0
217  y: 0
218  color: "#e4800d"
219  text: i18n("Deep-sky Objects")
220  anchors.horizontalCenter: parent.horizontalCenter
221  anchors.verticalCenter: parent.verticalCenter
222  verticalAlignment: Text.AlignVCenter
223  horizontalAlignment: Text.AlignHCenter
224  font.pixelSize: 16
225  MouseArea {
226  id: dsoMouseArea
227  hoverEnabled: true
228  anchors.fill: parent
229  onEntered: container.state = "dsoAreaEntered"
230  onClicked: container.state = "dsoAreaClicked"
231  }
232  font.family: "Cantarell"
233  }
234  }
235 
236  Rectangle {
237  id: galRect
238  x: 35
239  y: 68
240  width: galText.width
241  height: galText.height
242  color: "#00000000"
243  anchors.verticalCenterOffset: -4
244  anchors.horizontalCenterOffset: -77
245  anchors.horizontalCenter: parent.horizontalCenter
246  anchors.verticalCenter: parent.verticalCenter
247  opacity: 0.350
248  Text {
249  id: galText
250  x: 0
251  y: 0
252  color: "#6b6660"
253  text: i18n("Galaxies")
254  anchors.horizontalCenter: parent.horizontalCenter
255  anchors.verticalCenter: parent.verticalCenter
256  verticalAlignment: Text.AlignVCenter
257  horizontalAlignment: Text.AlignHCenter
258  font.pixelSize: 16
259  anchors.topMargin: 0
260  MouseArea {
261  id: galMouseArea
262  enabled: false
263  hoverEnabled: false
264  anchors.fill: parent
265  onEntered: container.state = "galAreaEntered"
266  onClicked: {
267  viewsRow.categorySelected(3)
268  container.state = "dsoTypeSelected"
269  }
270  }
271  anchors.rightMargin: 0
272  anchors.bottomMargin: 0
273  font.family: "Cantarell"
274  anchors.leftMargin: 0
275  }
276  }
277 
278  Rectangle {
279  id: nebRect
280  x: 96
281  y: 124
282  width: nebText.width
283  height: nebText.height
284  color: "#00000000"
285  anchors.verticalCenterOffset: 52
286  anchors.horizontalCenterOffset: -17
287  anchors.horizontalCenter: parent.horizontalCenter
288  anchors.verticalCenter: parent.verticalCenter
289  opacity: 0.340
290  Text {
291  id: nebText
292  x: 0
293  y: 0
294  color: "#6b6660"
295  text: i18n("Nebulae")
296  anchors.horizontalCenter: parent.horizontalCenter
297  anchors.verticalCenter: parent.verticalCenter
298  verticalAlignment: Text.AlignVCenter
299  horizontalAlignment: Text.AlignHCenter
300  font.pixelSize: 16
301  MouseArea {
302  id: nebMouseArea
303  enabled: false
304  hoverEnabled: false
305  anchors.fill: parent
306  onEntered: container.state = "nebAreaEntered"
307  onClicked: {
308  viewsRow.categorySelected(5)
309  container.state = "dsoTypeSelected"
310  }
311  }
312  font.family: "Cantarell"
313  }
314  }
315 
316  Rectangle {
317  id: clustRect
318  x: 181
319  y: 80
320  width: clustText.width
321  height: clustText.height
322  color: "#00000000"
323  anchors.verticalCenterOffset: 8
324  anchors.horizontalCenterOffset: 69
325  anchors.horizontalCenter: parent.horizontalCenter
326  anchors.verticalCenter: parent.verticalCenter
327  opacity: 0.350
328  Text {
329  id: clustText
330  x: 0
331  y: 0
332  color: "#6b6660"
333  text: i18n("Clusters")
334  anchors.verticalCenter: parent.verticalCenter
335  anchors.horizontalCenter: parent.horizontalCenter
336  verticalAlignment: Text.AlignVCenter
337  horizontalAlignment: Text.AlignHCenter
338  font.pixelSize: 16
339  MouseArea {
340  id: clustMouseArea
341  enabled: false
342  hoverEnabled: false
343  anchors.fill: parent
344  onEntered: container.state = "clustAreaEntered"
345  onClicked: {
346  viewsRow.categorySelected(4)
347  container.state = "dsoTypeSelected"
348  }
349  }
350  font.family: "Cantarell"
351  }
352  }
353  }
354  }//end of categoryView
355 
356  Flipable {
357  id: skyObjView
358  width: parent.width
359  height: parent.height
360  anchors.leftMargin: categoryView.width
361 // anchors.leftMargin: 370
362 
363  anchors.left: categoryView.right
364 
365  property bool flipped: false
366 
367  front: Rectangle {
368  id: soListContainer
369  color: "transparent"
370  anchors.fill: parent
371 
372  Rectangle {
373  id: soListViewBackground
374  anchors.fill: soListViewContainer
375  color: "#00060b"
376  opacity: 0.5
377  radius: 12
378  }
379 
380  Rectangle {
381 
382  id: soListViewContainer
383  x: parent.x + 15
384  y: 31
385  width: parent.width - 30
386  height: 351
387  color: "transparent"
388  radius: 12
389  border.width: 4
390  border.color: "#000000"
391 
392  ListView {
393  id: soListView
394  objectName: "soListObj"
395  anchors.fill: parent
396 
397  signal soListItemClicked(int type, string typeName, int curIndex)
398  clip: true
399 
400  ScrollBar {
401  flickable: soListView
402  }
403 
404  delegate: Item {
405  id: soListItem
406  x: 5
407  height: 40
408 
409  Text {
410  id: dispText
411  objectName: dispName
412  text: dispName
413  color: "white"
414  anchors.verticalCenter: parent.verticalCenter
415  font.bold: true
416  MouseArea {
417  anchors.fill: parent
418  hoverEnabled: true
419  onEntered: dispText.color = "yellow"
420  onExited: dispText.color = "white"
421  onClicked: {
422  soListView.currentIndex = index
423  soListView.soListItemClicked(type, typeName, soListView.currentIndex)
424  skyObjView.flipped = true
425  }
426  }
427  }
428  }
429 
430  model: soListModel
431  }
432  }
433  }
434 
435  back: Rectangle {
436  id: detailsViewContainer
437  width: parent.width
438  height: parent.height
439  color: "transparent"
440 
441  Rectangle {
442  id: detailsViewBackground
443  anchors.fill: detailsView
444  color: "#00060b"
445  radius: 12
446  opacity: 0.500
447  }
448 
449  Rectangle {
450  id: detailsView
451  objectName: "detailsViewObj"
452  x: parent.x + 15
453  height: 415
454  width: parent.width - 30
455  color: "transparent"
456  radius: 12
457  border.width: 4
458  border.color: "#000000"
459 
460  Text {
461  id: soname
462  objectName: "sonameObj"
463  y: 8
464  width: 273
465  height: 22
466  color: "#ffffff"
467  text: i18n("text")
468  anchors.left: parent.left
469  anchors.leftMargin: 8
470  font.bold: true
471  horizontalAlignment: Text.AlignLeft
472  verticalAlignment: Text.AlignVCenter
473  font.pixelSize: 16
474  }
475 
476  Text {
477  id: posText
478  x: 10
479  objectName: "posTextObj"
480  y: 45
481  anchors.right: parent.right
482  anchors.rightMargin: 10
483  width: 320
484  height: 16
485  color: "#f7f7ac"
486  text: i18n("text")
487  font.family: "Cantarell"
488  horizontalAlignment: Text.AlignRight
489  font.underline: false
490  font.italic: false
491  font.bold: true
492  font.pixelSize: 11
493  }
494 
495  Rectangle {
496  id: descTextBox
497  y: 197
498  height: 175
499  color: "#010a14"
500  radius: 10
501  border.width: 0
502  anchors.right: parent.right
503  anchors.rightMargin: 4
504  anchors.left: parent.left
505  anchors.leftMargin: 4
506  border.color: "#585454"
507  Flickable {
508  id: flickableDescText
509  clip: true
510  flickableDirection: Flickable.VerticalFlick
511  width: parent.width
512  height: parent.height
513  anchors.top: parent.top
514  anchors.topMargin: 3
515  anchors.bottom: parent.bottom
516  anchors.bottomMargin: 4
517 
518  contentWidth: parent.width
519  contentHeight: col.height + 4
520 
521  Item {
522  id: descTextItem
523  anchors.top :parent.top
524  anchors.topMargin: 3
525  anchors.left: parent.left
526  anchors.leftMargin: 6
527  anchors.right: parent.right
528  Column {
529  id: col
530  width: parent.width
531  Text {
532  id: descText
533  objectName: "descTextObj"
534  color: "#187988"
535  text: i18n("text")
536  font.family: "Cantarell"
537  clip: true
538  wrapMode: Text.WrapAtWordBoundaryOrAnywhere
539  width: parent.width
540  font.pixelSize: 13
541  }
542  Text {
543  id: descSrcText
544  objectName: "descSrcTextObj"
545  color: "#18885f"
546  text: i18n("Source: ")
547  font.family: "Cantarell"
548  font.italic: true
549  horizontalAlignment: Text.AlignRight
550  clip: true
551  wrapMode: Text.WrapAtWordBoundaryOrAnywhere
552  width: parent.width
553  font.pixelSize: 13
554  }
555  }
556  }
557  }
558  }
559 
560  Rectangle {
561  id: nextObjRect
562  objectName: "nextObj"
563  x: 271
564  y: 377
565  width: nextObjText.width + nextObjIcon.width + 5
566  height: 28
567  color: "#00000000"
568  radius: 5
569  anchors.right: parent.right
570  anchors.rightMargin: 10
571 
572  signal nextObjClicked()
573 
574  Rectangle {
575  id: nextObjForeground
576  radius: 5
577  anchors.fill: nextObjRect
578  opacity: 0
579  }
580 
581  MouseArea {
582  id: nextObjMouseArea
583  x: 13
584  y: 62
585  anchors.fill: nextObjRect
586  hoverEnabled: true
587  onEntered: {
588  nextObjForeground.opacity = 0.1
589  nextObjText.color = "yellow"
590  }
591  onExited: {
592  nextObjForeground.opacity = 0.0
593  nextObjText.color = "white"
594  }
595  onClicked: nextObjRect.nextObjClicked()
596  }
597 
598  Text {
599  id: nextObjText
600  objectName: "nextTextObj"
601  y: 17
602  height: 22
603  color: "white"
604  text: i18n("Next")
605  anchors.right: nextObjIcon.left
606  anchors.rightMargin: 5
607  anchors.verticalCenter: parent.verticalCenter
608  visible: true
609  verticalAlignment: Text.AlignVCenter
610  horizontalAlignment: Text.AlignRight
611  font.bold: true
612  font.pixelSize: 11
613 
614  x: 7
615  }
616 
617  Image {
618  id: nextObjIcon
619  x: 46
620  y: 2
621  anchors.right: parent.right
622  anchors.rightMargin: 0
623  anchors.verticalCenterOffset: 0
624  anchors.verticalCenter: parent.verticalCenter
625  sourceSize.height: 24
626  sourceSize.width: 24
627  source: "next.png"
628  }
629  }
630 
631  Rectangle {
632  id: prevObjRect
633  objectName: "prevObj"
634  y: 377
635  width: prevObjText.width + prevObjIcon.width + 5
636  height: 28
637  color: "#00000000"
638  radius: 5
639  anchors.left: parent.left
640  anchors.leftMargin: 8
641 
642  signal prevObjClicked()
643  x: 8
644 
645  Rectangle {
646  id: prevObjForeground
647  radius: 5
648  anchors.top: parent.top
649  anchors.right: parent.right
650  anchors.bottom: parent.bottom
651  anchors.left: parent.left
652  anchors.topMargin: 0
653  opacity: 0
654  }
655 
656  MouseArea {
657  id: prevObjMouseArea
658  anchors.fill: parent
659  hoverEnabled: true
660  onEntered: {
661  prevObjForeground.opacity = 0.1
662  prevObjText.color = "yellow"
663  }
664  onExited: {
665  prevObjForeground.opacity = 0.0
666  prevObjText.color = "white"
667  }
668  onClicked: prevObjRect.prevObjClicked()
669  }
670 
671  Text {
672  id: prevObjText
673  objectName: "prevTextObj"
674  y: 7
675  height: 22
676  color: "#ffffff"
677  text: i18n("Previous")
678  anchors.left: prevObjIcon.right
679  anchors.leftMargin: 5
680  anchors.verticalCenterOffset: 0
681  font.pixelSize: 11
682  visible: true
683  anchors.verticalCenter: parent.verticalCenter
684  font.bold: true
685  horizontalAlignment: Text.AlignLeft
686  verticalAlignment: Text.AlignVCenter
687  }
688 
689  Image {
690  id: prevObjIcon
691  x: 0
692  y: 2
693  anchors.verticalCenter: parent.verticalCenter
694  sourceSize.height: 24
695  sourceSize.width: 24
696  source: "previous.png"
697  }
698  }
699 
700  Column {
701  id: detailItemsCol
702  x: 0
703  y: 78
704  width: 200
705  height: 93
706  spacing: 14
707 
708  Text {
709  id: sbText
710  objectName: "sbTextObj"
711  width: 164
712  height: 21
713  color: "#ffffff"
714  text: i18n("Surface Brightness:")
715  anchors.left: parent.left
716  anchors.leftMargin: 8
717  font.pixelSize: 13
718  font.family: "Cantarell"
719  horizontalAlignment: Text.AlignLeft
720  verticalAlignment: Text.AlignVCenter
721  }
722 
723  Text {
724  id: magText
725  objectName: "magTextObj"
726  width: 164
727  height: 21
728  color: "#ffffff"
729  text: i18n("Magnitude: ")
730  anchors.left: parent.left
731  anchors.leftMargin: 8
732  font.family: "Cantarell"
733  verticalAlignment: Text.AlignVCenter
734  horizontalAlignment: Text.AlignLeft
735  font.pixelSize: 13
736  }
737 
738  Text {
739  id: sizeText
740  objectName: "sizeTextObj"
741  width: 164
742  height: 21
743  color: "#ffffff"
744  text: i18n("Size: ")
745  anchors.left: parent.left
746  anchors.leftMargin: 8
747  font.pixelSize: 13
748  font.family: "Cantarell"
749  horizontalAlignment: Text.AlignLeft
750  verticalAlignment: Text.AlignVCenter
751  }
752  }
753 
754  Column {
755  id: detailsViewButtonsCol
756  x: 208
757  y: 134
758  width: 132
759  height: 52
760  anchors.right: parent.right
761  anchors.rightMargin: 0
762  spacing: 14
763 
764  Text {
765  id: detailsButton
766  objectName: "detailsButtonObj"
767  width: 119
768  height: 16
769  font.underline: true
770  anchors.rightMargin: 10
771  anchors.right: parent.right
772  verticalAlignment: Text.AlignVCenter
773  color: "white"
774  text: i18n("More object details")
775  font.family: "Cantarell"
776  font.pixelSize: 14
777 
778  signal detailsButtonClicked()
779  x: 0
780 
781  MouseArea {
782  id: detailsMouseArea
783  hoverEnabled: true
784  anchors.fill: parent
785  onEntered: detailsButton.color = "yellow"
786  onExited: detailsButton.color = "white"
787  onClicked: detailsButton.detailsButtonClicked()
788  }
789  }
790 
791  Text {
792  id: slewButton
793  objectName: "slewButtonObj"
794  width: 119
795  height: 16
796  color: "white"
797  text: i18n("Slew map to object")
798  font.family: "Cantarell"
799  anchors.right: parent.right
800  anchors.rightMargin: 10
801  font.underline: true
802  verticalAlignment: Text.AlignVCenter
803  font.pixelSize: 14
804 
805  signal slewButtonClicked()
806 
807  MouseArea {
808  id: slewObjMouseArea
809  hoverEnabled: true
810  anchors.fill: parent
811  onEntered: slewButton.color = "yellow"
812  onExited: slewButton.color = "white"
813  onClicked: slewButton.slewButtonClicked()
814  }
815  }
816  }
817  } //end of detailsView
818  } //end of detailsViewContainer
819 
820  states: [
821  State {
822  name: "back"
823  PropertyChanges {
824  target: listToDetailsRotation
825  angle: 180
826  }
827 
828  PropertyChanges {
829  target: settingsMouseArea
830  enabled: false
831  }
832 
833  PropertyChanges {
834  target: settingsIcon
835  opacity: 0
836  }
837 
838  PropertyChanges {
839  target: reloadMouseArea
840  enabled: false
841  }
842 
843  PropertyChanges {
844  target: reloadIcon
845  opacity: 0
846  }
847 
848  when: skyObjView.flipped
849  }
850  ]
851 
852  transitions: [
853  Transition {
854  NumberAnimation { target: listToDetailsRotation; property: "angle"; duration: 400 }
855  }
856  ]
857 
858  transform: Rotation {
859  id: listToDetailsRotation
860  origin.x: container.width / 2;
861  axis.y: 1; axis.z: 0
862  }
863  } //end of skyObjView
864  }//end of viewsContainer
865  }//end of base
866 
867  Rectangle {
868  id: backButton
869  x: container.width + 10
870  y: 518
871  width: leftArrow.width + goBackText.width + 18
872  height: 49
873  color: "#00000000"
874  radius: 5
875 
876  Rectangle {
877  id: goBackForeground
878  anchors.fill: parent
879  radius: 5
880  opacity: 0.0
881  }
882 
883  Text {
884  id: goBackText
885  y: 12
886  color: "#f7e808"
887  text: i18n("Back")
888  anchors.left: leftArrow.right
889  anchors.leftMargin: 7
890  anchors.verticalCenterOffset: 0
891  anchors.verticalCenter: leftArrow.verticalCenter
892  font.family: "Cantarell"
893  font.pointSize: 13
894  verticalAlignment: Text.AlignVCenter
895  horizontalAlignment: Text.AlignHCenter
896  }
897 
898  Image {
899  id: leftArrow
900  y: 9
901  anchors.left: parent.left
902  anchors.leftMargin: 4
903  anchors.verticalCenterOffset: 0
904  anchors.verticalCenter: parent.verticalCenter
905  source: "leftArrow.png"
906  }
907 
908  MouseArea {
909  id: backButtonMouseArea
910  x: 45
911  y: 0
912  anchors.fill: backButton
913  hoverEnabled: true
914  onEntered: goBackForeground.opacity = 0.2
915  onExited: goBackForeground.opacity = 0.0
916  onClicked: {
917  if ( container.state == "soTypeSelected" ) {
918  if ( !skyObjView.flipped ) {
919  container.state = "base"
920  } else if ( skyObjView.flipped ) {
921  skyObjView.flipped = false
922  }
923  } else if ( container.state == "dsoTypeSelected" ) {
924  if ( !skyObjView.flipped ) {
925  container.state = "dsoAreaClicked"
926  } else if ( skyObjView.flipped ) {
927  skyObjView.flipped = false
928  }
929  }
930  }
931  }
932  }
933 
934  Image {
935  id: settingsIcon
936  objectName: "settingsIconObj"
937  x: 9
938  y: 529
939  width: 28
940  height: 28
941  anchors.verticalCenterOffset: 0
942  anchors.verticalCenter: backButton.verticalCenter
943  sourceSize.height: 40
944  sourceSize.width: 40
945  smooth: true
946  fillMode: Image.Stretch
947  source: "settingsIcon.png"
948 
949  signal settingsIconClicked()
950 
951  MouseArea {
952  id: settingsMouseArea
953  anchors.fill: parent
954  hoverEnabled: true
955  onEntered: settingsForeground.opacity = 0.2
956  onExited: settingsForeground.opacity = 0.0
957  onClicked: settingsIcon.settingsIconClicked()
958  }
959 
960  Rectangle {
961  id: settingsForeground
962  anchors.fill: parent
963  opacity: 0.0
964  radius: 5
965  }
966  }
967 
968  Image {
969  id: reloadIcon
970  objectName: "reloadIconObj"
971  x: 50
972  y: 529
973  width: 28
974  height: 28
975  anchors.verticalCenterOffset: 0
976  anchors.verticalCenter: backButton.verticalCenter
977  sourceSize.height: 40
978  sourceSize.width: 40
979  smooth: true
980  fillMode: Image.Stretch
981  source: "reloadIcon.png"
982 
983  signal reloadIconClicked()
984 
985  MouseArea {
986  id: reloadMouseArea
987  anchors.fill: parent
988  hoverEnabled: true
989  onEntered: reloadForeground.opacity = 0.2
990  onExited: reloadForeground.opacity = 0.0
991  onClicked: reloadIcon.reloadIconClicked()
992  }
993 
994  Rectangle {
995  id: reloadForeground
996  radius: 5
997  opacity: 0
998  anchors.fill: parent
999  }
1000  }
1001 
1002  states: [
1003  State {
1004  name: "base"
1005 
1006  PropertyChanges {
1007  target: galText
1008  color: "#6b6660"
1009  }
1010 
1011  PropertyChanges {
1012  target: nebText
1013  color: "#6b6660"
1014  }
1015 
1016  PropertyChanges {
1017  target: clustText
1018  color: "#6b6660"
1019  }
1020  },
1021  State {
1022  name: "planetAreaEntered"
1023 
1024  PropertyChanges {
1025  target: planetText
1026  font.pixelSize: 21
1027  font.bold: true
1028  }
1029  },
1030  State {
1031  name: "starAreaEntered"
1032 
1033  PropertyChanges {
1034  target: starText
1035  font.bold: true
1036  font.pixelSize: 21
1037  }
1038  },
1039  State {
1040  name: "conAreaEntered"
1041 
1042  PropertyChanges {
1043  target: conText
1044  font.bold: true
1045  font.pixelSize: 21
1046  }
1047  },
1048  State {
1049  name: "dsoAreaEntered"
1050 
1051  PropertyChanges {
1052  target: dsoText
1053  font.bold: true
1054  font.pixelSize: 21
1055  }
1056  },
1057  State {
1058  name: "dsoAreaClicked"
1059  PropertyChanges {
1060  target: dsoText
1061  font.pixelSize: "21"
1062  font.bold: true
1063  }
1064 
1065  PropertyChanges {
1066  target: galRect
1067  opacity: 1
1068  }
1069 
1070  PropertyChanges {
1071  target: nebRect
1072  opacity: 1
1073  }
1074 
1075  PropertyChanges {
1076  target: clustRect
1077  opacity: 1
1078  }
1079 
1080  PropertyChanges {
1081  target: planetRect
1082  opacity: 0.350
1083  }
1084 
1085  PropertyChanges {
1086  target: conRect
1087  opacity: 0.350
1088  }
1089 
1090  PropertyChanges {
1091  target: starRect
1092  opacity: 0.350
1093  }
1094 
1095  PropertyChanges {
1096  target: clustMouseArea
1097  hoverEnabled: true
1098  enabled: true
1099  }
1100 
1101  PropertyChanges {
1102  target: galMouseArea
1103  hoverEnabled: true
1104  enabled: true
1105  }
1106 
1107  PropertyChanges {
1108  target: nebMouseArea
1109  hoverEnabled: true
1110  enabled: true
1111  }
1112 
1113  PropertyChanges {
1114  target: dsoMouseArea
1115  hoverEnabled: false
1116  }
1117 
1118  PropertyChanges {
1119  target: dsoContainer
1120  y: 160
1121  }
1122 
1123  PropertyChanges {
1124  target: galText
1125  color: "#e4800d"
1126  }
1127 
1128  PropertyChanges {
1129  target: clustText
1130  color: "#e4800d"
1131  }
1132 
1133  PropertyChanges {
1134  target: nebText
1135  color: "#e4800d"
1136  }
1137  },
1138  State {
1139  name: "galAreaEntered"
1140  PropertyChanges {
1141  target: dsoText
1142  font.pixelSize: "21"
1143  font.bold: false
1144  }
1145 
1146  PropertyChanges {
1147  target: galRect
1148  opacity: 1
1149  }
1150 
1151  PropertyChanges {
1152  target: nebRect
1153  opacity: 1
1154  }
1155 
1156  PropertyChanges {
1157  target: clustRect
1158  opacity: 1
1159  }
1160 
1161  PropertyChanges {
1162  target: planetRect
1163  opacity: 0.350
1164  }
1165 
1166  PropertyChanges {
1167  target: conRect
1168  opacity: 0.350
1169  }
1170 
1171  PropertyChanges {
1172  target: starRect
1173  opacity: 0.350
1174  }
1175 
1176  PropertyChanges {
1177  target: dsoMouseArea
1178  hoverEnabled: false
1179  }
1180 
1181  PropertyChanges {
1182  target: galText
1183  color: "#e4800d"
1184  font.bold: true
1185  font.pixelSize: 21
1186  }
1187 
1188  PropertyChanges {
1189  target: dsoContainer
1190  y: 160
1191  }
1192 
1193  PropertyChanges {
1194  target: clustMouseArea
1195  hoverEnabled: true
1196  enabled: true
1197  }
1198 
1199  PropertyChanges {
1200  target: galMouseArea
1201  hoverEnabled: true
1202  enabled: true
1203  }
1204 
1205  PropertyChanges {
1206  target: nebMouseArea
1207  hoverEnabled: true
1208  enabled: true
1209  }
1210 
1211  PropertyChanges {
1212  target: nebText
1213  color: "#e4800d"
1214  }
1215 
1216  PropertyChanges {
1217  target: clustText
1218  color: "#e4800d"
1219  }
1220  },
1221  State {
1222  name: "nebAreaEntered"
1223  PropertyChanges {
1224  target: dsoText
1225  font.pixelSize: "21"
1226  font.bold: false
1227  }
1228 
1229  PropertyChanges {
1230  target: galRect
1231  opacity: 1
1232  }
1233 
1234  PropertyChanges {
1235  target: nebRect
1236  opacity: 1
1237  }
1238 
1239  PropertyChanges {
1240  target: clustRect
1241  opacity: 1
1242  }
1243 
1244  PropertyChanges {
1245  target: planetRect
1246  opacity: 0.350
1247  }
1248 
1249  PropertyChanges {
1250  target: conRect
1251  opacity: 0.350
1252  }
1253 
1254  PropertyChanges {
1255  target: starRect
1256  opacity: 0.350
1257  }
1258 
1259  PropertyChanges {
1260  target: dsoMouseArea
1261  hoverEnabled: false
1262  }
1263 
1264  PropertyChanges {
1265  target: nebText
1266  color: "#e4800d"
1267  font.bold: true
1268  font.pixelSize: 21
1269  }
1270 
1271  PropertyChanges {
1272  target: dsoContainer
1273  y: 160
1274  }
1275 
1276  PropertyChanges {
1277  target: clustMouseArea
1278  hoverEnabled: true
1279  enabled: true
1280  }
1281 
1282  PropertyChanges {
1283  target: nebMouseArea
1284  hoverEnabled: true
1285  enabled: true
1286  }
1287 
1288  PropertyChanges {
1289  target: galMouseArea
1290  hoverEnabled: true
1291  enabled: true
1292  }
1293 
1294  PropertyChanges {
1295  target: galText
1296  color: "#e4800d"
1297  }
1298 
1299  PropertyChanges {
1300  target: clustText
1301  color: "#e4800d"
1302  }
1303  },
1304  State {
1305  name: "clustAreaEntered"
1306  PropertyChanges {
1307  target: dsoText
1308  font.pixelSize: "21"
1309  font.bold: false
1310  }
1311 
1312  PropertyChanges {
1313  target: galRect
1314  opacity: 1
1315  }
1316 
1317  PropertyChanges {
1318  target: nebRect
1319  opacity: 1
1320  }
1321 
1322  PropertyChanges {
1323  target: clustRect
1324  opacity: 1
1325  }
1326 
1327  PropertyChanges {
1328  target: planetRect
1329  opacity: 0.350
1330  }
1331 
1332  PropertyChanges {
1333  target: conRect
1334  opacity: 0.350
1335  }
1336 
1337  PropertyChanges {
1338  target: starRect
1339  opacity: 0.350
1340  }
1341 
1342  PropertyChanges {
1343  target: dsoMouseArea
1344  hoverEnabled: false
1345  }
1346 
1347  PropertyChanges {
1348  target: clustText
1349  color: "#e4800d"
1350  font.bold: true
1351  font.pixelSize: 21
1352  }
1353 
1354  PropertyChanges {
1355  target: dsoContainer
1356  y: 160
1357  }
1358 
1359  PropertyChanges {
1360  target: clustMouseArea
1361  hoverEnabled: true
1362  enabled: true
1363  }
1364 
1365  PropertyChanges {
1366  target: galMouseArea
1367  hoverEnabled: true
1368  enabled: true
1369  }
1370 
1371  PropertyChanges {
1372  target: nebMouseArea
1373  hoverEnabled: true
1374  enabled: true
1375  }
1376 
1377  PropertyChanges {
1378  target: nebText
1379  color: "#e4800d"
1380  }
1381 
1382  PropertyChanges {
1383  target: galText
1384  color: "#e4800d"
1385  }
1386  },
1387  State {
1388  name: "soTypeSelected"
1389 
1390  PropertyChanges {
1391  target: viewsRow
1392  x: -(2*categoryView.width)
1393  y: 0
1394  anchors.topMargin: 0
1395  anchors.bottomMargin: 0
1396  }
1397 
1398  PropertyChanges {
1399  target: backButton
1400  x: container.width - 105
1401  }
1402  },
1403  State {
1404  name: "dsoTypeSelected"
1405 
1406  PropertyChanges {
1407  target: viewsRow
1408  x: -(2*categoryView.width)
1409  y: 0
1410  anchors.topMargin: 0
1411  anchors.bottomMargin: 0
1412  }
1413 
1414  PropertyChanges {
1415  target: backButton
1416  x: container.width - 105
1417  }
1418 
1419  PropertyChanges {
1420  target: dsoText
1421  font.pixelSize: "21"
1422  font.bold: true
1423  }
1424 
1425  PropertyChanges {
1426  target: galRect
1427  opacity: 1
1428  }
1429 
1430  PropertyChanges {
1431  target: nebRect
1432  opacity: 1
1433  }
1434 
1435  PropertyChanges {
1436  target: clustRect
1437  opacity: 1
1438  }
1439 
1440  PropertyChanges {
1441  target: planetRect
1442  opacity: 0.350
1443  }
1444 
1445  PropertyChanges {
1446  target: conRect
1447  opacity: 0.350
1448  }
1449 
1450  PropertyChanges {
1451  target: starRect
1452  opacity: 0.350
1453  }
1454 
1455  PropertyChanges {
1456  target: clustMouseArea
1457  hoverEnabled: true
1458  enabled: true
1459  }
1460 
1461  PropertyChanges {
1462  target: galMouseArea
1463  hoverEnabled: true
1464  enabled: true
1465  }
1466 
1467  PropertyChanges {
1468  target: nebMouseArea
1469  hoverEnabled: true
1470  enabled: true
1471  }
1472 
1473  PropertyChanges {
1474  target: dsoMouseArea
1475  hoverEnabled: false
1476  }
1477 
1478  PropertyChanges {
1479  target: dsoContainer
1480  y: 160
1481  }
1482 
1483  PropertyChanges {
1484  target: galText
1485  color: "#e4800d"
1486  }
1487 
1488  PropertyChanges {
1489  target: clustText
1490  color: "#e4800d"
1491  }
1492 
1493  PropertyChanges {
1494  target: nebText
1495  color: "#e4800d"
1496  }
1497  }
1498  ]
1499 
1500  transitions: [
1501  Transition {
1502  from: "*"
1503  to: "planetAreaEntered"
1504  NumberAnimation { target: planetText; property: "font.pixelSize"; to: 21; duration: 150 }
1505  NumberAnimation { target: dsoText; property: "font.pixelSize"; duration: 150 }
1506  NumberAnimation { target: conText; property: "font.pixelSize"; duration: 150 }
1507  NumberAnimation { target: galText; property: "font.pixelSize"; duration: 150 }
1508  NumberAnimation { target: nebText; property: "font.pixelSize"; duration: 150 }
1509  NumberAnimation { target: dsoContainer; property: "y"; duration: 500 }
1510  NumberAnimation { target: galRect; property: "opacity"; duration: 500 }
1511  NumberAnimation { target: nebRect; property: "opacity"; duration: 500 }
1512  NumberAnimation { target: clustRect; property: "opacity"; duration: 500 }
1513  },
1514  Transition {
1515  from: "*"
1516  to: "starAreaEntered"
1517  NumberAnimation { target: starText; property: "font.pixelSize"; to: 21; duration: 150 }
1518  NumberAnimation { target: dsoText; property: "font.pixelSize"; duration: 150 }
1519  NumberAnimation { target: conText; property: "font.pixelSize"; duration: 150 }
1520  NumberAnimation { target: galText; property: "font.pixelSize"; duration: 150 }
1521  NumberAnimation { target: nebText; property: "font.pixelSize"; duration: 150 }
1522  NumberAnimation { target: dsoContainer; property: "y"; duration: 500 }
1523  NumberAnimation { target: galRect; property: "opacity"; duration: 500 }
1524  NumberAnimation { target: nebRect; property: "opacity"; duration: 500 }
1525  NumberAnimation { target: clustRect; property: "opacity"; duration: 500 }
1526  },
1527  Transition {
1528  from: "*"
1529  to: "conAreaEntered"
1530  NumberAnimation { target: conText; property: "font.pixelSize"; to: 21; duration: 150 }
1531  NumberAnimation { target: dsoText; property: "font.pixelSize"; duration: 150 }
1532  NumberAnimation { target: conText; property: "font.pixelSize"; duration: 150 }
1533  NumberAnimation { target: galText; property: "font.pixelSize"; duration: 150 }
1534  NumberAnimation { target: nebText; property: "font.pixelSize"; duration: 150 }
1535  NumberAnimation { target: dsoContainer; property: "y"; duration: 500 }
1536  NumberAnimation { target: galRect; property: "opacity"; duration: 500 }
1537  NumberAnimation { target: nebRect; property: "opacity"; duration: 500 }
1538  NumberAnimation { target: clustRect; property: "opacity"; duration: 500 }
1539  },
1540  Transition {
1541  from: "*"
1542  to: "dsoAreaEntered"
1543  NumberAnimation { target: dsoText; property: "font.pixelSize"; to: 21; duration: 150 }
1544  },
1545  Transition {
1546  from: "*"
1547  to: "galAreaEntered"
1548  NumberAnimation { target: galText; property: "font.pixelSize"; to: 21; duration: 150 }
1549  },
1550  Transition {
1551  from: "*"
1552  to: "nebAreaEntered"
1553  NumberAnimation { target: nebText; property: "font.pixelSize"; to: 21; duration: 150 }
1554  },
1555  Transition {
1556  from: "*"
1557  to: "clustAreaEntered"
1558  NumberAnimation { target: clustText; property: "font.pixelSize"; to: 21; duration: 150 }
1559  },
1560  Transition {
1561  from: "*"
1562  to: "dsoAreaClicked"
1563  NumberAnimation { target: dsoContainer; property: "y"; duration: 200 }
1564  NumberAnimation { target: galRect; property: "opacity"; duration: 500 }
1565  NumberAnimation { target: nebRect; property: "opacity"; duration: 500 }
1566  NumberAnimation { target: clustRect; property: "opacity"; duration: 500 }
1567  },
1568  Transition {
1569  from: "*"
1570  to: "soTypeSelected"
1571  NumberAnimation { target: viewsRow; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1572  NumberAnimation { target: backButton; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1573  },
1574  Transition {
1575  from: "*"
1576  to: "dsoTypeSelected"
1577  NumberAnimation { target: viewsRow; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1578  NumberAnimation { target: backButton; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1579  },
1580  Transition {
1581  from: "soTypeSelected"
1582  to: "base"
1583  NumberAnimation { target: viewsRow; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1584  NumberAnimation { target: backButton; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1585  },
1586  Transition {
1587  from: "dsoTypeSelected"
1588  to: "dsoAreaClicked"
1589  NumberAnimation { target: viewsRow; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1590  NumberAnimation { target: backButton; property: "x"; duration: 250; easing.type: Easing.InOutQuad }
1591  }
1592  ]
1593 }
ScrollBar
This qml code implements a vertical scrollbar which shall be displayed in listview of sky-objects...
Definition: ScrollBar.qml:14
Rectangle
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal