wiview.qml 57.2 KB
Newer Older
1

2
// Copyright (C) 2013 Samikshan Bairagya <samikshan@gmail.com>
3 4
/***************************************************************************
 *                                                                         *
5 6 7 8 9 10 11 12
  *   This program is free software; you can redistribute it and/or modify  *
   *   it under the terms of the GNU General Public License as published by  *
    *   the Free Software Foundation; either version 2 of the License, or     *
     *   (at your option) any later version.                                   *
      *                                                                         *
       ***************************************************************************/
import QtQuick 2.5
import QtQuick.Layouts 1.1
13
import QtQuick.Controls 1.4
14 15 16 17

Rectangle {
    id: container
    objectName: "containerObj"
18
    color: "#020518"
19 20
    anchors.fill: parent

21 22 23
    property double buttonOpacity: 0.2
    property double categoryTitleOpacity: 0.350

24 25 26 27 28
    Text {
        id: title
        x: 9
        y: 34
        color: "#59ad0e"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
29
        text: xi18n("What's Interesting...")
30
        verticalAlignment: Text.AlignVCenter
31 32 33 34 35
        font {
            family: "Cantarell"
            bold: false
            pixelSize:22
        }
36 37
    }

38
    Item {
39
        id: base
40
        y: 89
41
        width: parent.width
42
        height: parent.height
43 44 45 46 47 48 49
        anchors {
            left: parent.left
            leftMargin: 0
            right: parent.right
            rightMargin: 0
        }

50 51 52 53
        Item {
            id: viewsRow
            objectName: "viewsRowObj"
            width: parent.width
54 55 56 57
            anchors {
                top: parent.top
                bottom: parent.bottom
            }
58 59 60

            signal categorySelected(int category)

61
            Item {
62
                id: categoryView
63 64
                x: 0
                y: 31
65
                width: parent.width
66
                height: 500
67 68 69 70 71 72

                Rectangle {
                    id: background

                    color: "#00060b"
                    radius: 12
73 74 75 76 77 78 79 80 81 82 83
                    anchors {
                        top: parent.top
                        topMargin: 15
                        bottom: parent.bottom
                        bottomMargin: 13
                        right: parent.right
                        rightMargin: 20
                        left: parent.left
                        leftMargin: 20
                    }

84
                    opacity: 0.500
85 86 87 88
                    border {
                        width: 4
                        color: "black"
                    }
89
                }
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
				Item {
                    id: nakedEyeItem
                    width: nakedEyeText.width
                    height: nakedEyeText.height
                    anchors{
                        verticalCenterOffset: -180
                        horizontalCenterOffset: 0
                        centerIn: parent
                    }

                    CategoryTitle {
                        id: nakedEyeText
                        color: "yellow"
                        title: xi18n("Naked-Eye Objects")
                        anchors.centerIn: parent
                    }
                }

108

109 110
                Item {
                    id: planetItem
111 112
                    width: planetText.width
                    height: planetText.height
113 114 115 116 117
                    anchors{
                        verticalCenterOffset: -130
                        horizontalCenterOffset: -30
                        centerIn: parent
                    }
118

119
                    CategoryTitle {
120
                        id: planetText
121 122 123

                        title: xi18n("Planets")
                        anchors.centerIn: parent
124 125 126 127 128

                        MouseArea {
                            id: planetMouseArea
                            anchors.fill: parent
                            hoverEnabled: true
129
                            onEntered: container.state = "planetAreaEntered"
130 131
                            onClicked: {
                                viewsRow.categorySelected(0)
132
                                container.state = "soTypeSelected"
133 134 135
                            }
                        }
                    }
136
                }
137

138 139 140
                Item {
                    id: starItem

141 142
                    width: starText.width
                    height: starText.height
143 144 145 146 147
                    anchors{
                        verticalCenterOffset: -85
                        horizontalCenterOffset: 87
                        centerIn: parent
                    }
148

149
                    CategoryTitle {
150
                        id: starText
151 152 153

                        title: xi18n("Stars")
                        anchors.centerIn: parent
154 155 156 157

                        MouseArea {
                            id: starMouseArea
                            hoverEnabled: true
158 159
                            anchors.fill: parent
                            onEntered: container.state = "starAreaEntered"
160 161
                            onClicked: {
                                viewsRow.categorySelected(1)
162
                                container.state = "soTypeSelected"
163 164 165
                            }
                        }
                    }
166
                }
167

168 169
                Item {
                    id: conItem
170 171
                    width: conText.width
                    height: conText.height
172 173 174 175 176
                    anchors {
                        verticalCenterOffset: -52
                        horizontalCenterOffset: -63
                        centerIn: parent
                    }
177

178
                    CategoryTitle {
179
                        id: conText
180 181
                        title: xi18n("Constellations")
                        anchors.centerIn: parent
182 183 184 185 186

                        MouseArea {
                            id: conMouseArea
                            anchors.fill: parent
                            hoverEnabled: true
187
                            onEntered: container.state = "conAreaEntered"
188 189
                            onClicked: {
                                viewsRow.categorySelected(2)
190
                                container.state = "soTypeSelected"
191
                            }
192 193 194 195
                        }
                    }
                }

196
                Item {
197 198
                    id: dsoContainer
                    y: 172
199
                    height: 200
200 201 202 203 204 205
                    anchors {
                        right: parent.right
                        rightMargin: 35
                        left: parent.left
                        leftMargin: 35
                    }
206

207 208
                    Item {
                        id: dsoItem
209 210
                        width: dsoText.width
                        height: dsoText.height
211 212

                        anchors {
213
                            verticalCenterOffset: -30
214 215 216 217 218
                            horizontalCenterOffset: 0
                            centerIn: parent
                        }

                        CategoryTitle {
219
                            id: dsoText
220
                            color: "yellow"
221 222
                            title: xi18n("Deep-sky Objects")
                            anchors.centerIn: parent
223 224 225
                        }
                    }

226 227 228
                    Item {
                        id: galItem

229 230
                        width: galText.width
                        height: galText.height
231 232

                        anchors {
233
                            verticalCenterOffset: 26
234 235 236 237 238 239
                            horizontalCenterOffset: -77
                            centerIn: parent
                        }
                        opacity: categoryTitleOpacity

                        CategoryTitle {
240
                            id: galText
241 242 243 244 245 246
                            title: xi18n("Galaxies")
                            anchors {
                                centerIn: parent
                                margins: 0
                            }

247 248
                            MouseArea {
                                id: galMouseArea
249
                                hoverEnabled: true
250 251
                                anchors.fill: parent
                                onEntered: container.state = "galAreaEntered"
252 253
                                onClicked: {
                                    viewsRow.categorySelected(3)
254
                                    container.state = "dsoTypeSelected"
255
                                }
256
                            }
257 258 259
                        }
                    }

260 261 262
                    Item {
                        id: nebItem

263 264
                        width: nebText.width
                        height: nebText.height
265 266

                        anchors {
267
                            verticalCenterOffset: 82
268 269 270
                            horizontalCenterOffset: -17
                            centerIn: parent
                        }
271
                        opacity: 0.340
272 273

                        CategoryTitle {
274
                            id: nebText
275 276 277
                            title: xi18n("Nebulae")
                            anchors.centerIn: parent

278 279
                            MouseArea {
                                id: nebMouseArea
280
                                hoverEnabled: true
281 282
                                anchors.fill: parent
                                onEntered: container.state = "nebAreaEntered"
283 284
                                onClicked: {
                                    viewsRow.categorySelected(5)
285
                                    container.state = "dsoTypeSelected"
286
                                }
287
                            }
288 289 290
                        }
                    }

291 292 293
                    Item {
                        id: clustItem

294 295
                        width: clustText.width
                        height: clustText.height
296 297

                        anchors {
298
                            verticalCenterOffset: 38
299 300 301 302 303 304
                            horizontalCenterOffset: 69
                            centerIn: parent
                        }
                        opacity: categoryTitleOpacity

                        CategoryTitle {
305
                            id: clustText
306 307 308
                            title: xi18n("Clusters")
                            anchors.centerIn: parent

309 310
                            MouseArea {
                                id: clustMouseArea
311
                                hoverEnabled: true
312 313
                                anchors.fill: parent
                                onEntered: container.state = "clustAreaEntered"
314 315
                                onClicked: {
                                    viewsRow.categorySelected(4)
316
                                    container.state = "dsoTypeSelected"
317
                                }
318
                            }
319 320
                        }
                    }
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
                    Item {
                    id: catalogsItem
                    width: catalogText.width
                    height: catalogText.height
                    anchors{
                        verticalCenterOffset: 130
                        horizontalCenterOffset: 0
                        centerIn: parent
                    }

                    CategoryTitle {
                        id: catalogText
                        color: "yellow"
                        title: xi18n("Explore Catalogs")
                        anchors.centerIn: parent
                    }
                }
                    Item {
                        id: messierItem

                        width: messierText.width
                        height: messierText.height

                        anchors {
                            verticalCenterOffset: 160
                            horizontalCenterOffset: 69
                            centerIn: parent
                        }
                        opacity: categoryTitleOpacity

                        CategoryTitle {
                            id: messierText
                            title: xi18n("Messier Objects")
                            anchors.centerIn: parent

                            MouseArea {
                                id: messierMouseArea
                                hoverEnabled: true
                                anchors.fill: parent
                                onEntered: container.state = "messierAreaEntered"
                                onClicked: {
                                    viewsRow.categorySelected(6)
                                    container.state = "dsoTypeSelected"
                                }
                            }
                        }
                    }
                 //   Item {
                 //       id: sh2Item
//
 //                       width: sh2Text.width
  //                      height: sh2Text.height
//
  //                      anchors {
    //                        verticalCenterOffset: 190
      //                      horizontalCenterOffset: 69
        //                    centerIn: parent
          //              }
            //            opacity: categoryTitleOpacity
//
  //                      CategoryTitle {
    //                        id: sh2Text
      //                      title: xi18n("Sharpless Objects")
        //                    anchors.centerIn: parent
//
  //                          MouseArea {
    //                            id: sh2MouseArea
      //                          hoverEnabled: true
        //                        anchors.fill: parent
          //                      onEntered: container.state = "sh2AreaEntered"
            //                    onClicked: {
              //                      viewsRow.categorySelected(7)
                //                    container.state = "dsoTypeSelected"
                  //              }
                    //        }
                      //  }
                 //   }
398
                }
399
            } //end of categoryView
400 401 402 403

            Flipable {
                id: skyObjView
                width: parent.width
404
                height: parent.height - 150
405
                anchors.leftMargin: categoryView.width
406 407 408
                anchors.left: categoryView.right
                property bool flipped: false

409
                front: Item {
410
                    id: soListContainer
411
                    anchors.fill: parent
412
                    enabled: !parent.flipped // To hide content of front side on back side
413

414 415 416 417 418
                    Rectangle {
                        id: soListViewBackground
                        anchors.fill: soListViewContainer
                        color: "#00060b"
                        opacity: 0.5
419
                        radius: 12
420 421
                    }

422 423 424 425 426
                    Rectangle {
                        id: soListViewContainer
                        x: parent.x + 15
                        y: 31
                        width: parent.width - 30
427
                        height: parent.height -30
428
                        color: "transparent"
429
                        radius: 12
430 431 432 433
                        border {
                            width: 4
                            color: "#000000"
                        }
434 435 436

                        ListView {
                            id: soListView
437
                            z: 0
438 439
                            objectName: "soListObj"
                            anchors.fill: parent
440

441
                            signal soListItemClicked(int type, string typeName, int curIndex)
442 443
                            clip: true

444 445 446
                            ScrollView {
                                anchors.fill: parent
                                contentItem: soListView
447 448
                            }

449 450
                            delegate: Item {
                                id: soListItem
451
                                x: 8
452
                                width: parent.width
453 454 455 456 457 458 459 460 461 462 463
                                height: (dispSummary.height >= 130) ? dispSummary.height + 20 : 160         
 
                                Rectangle{
                                	id: summaryBackground
                                	color: "transparent"
                                	width: parent.width
    								height: parent.height
									Text {
										id: dispSummary
										objectName: dispObjSummary
										text: dispObjSummary
464
										textFormat: Text.RichText
465 466 467 468 469 470 471 472 473 474 475
										x: image.width + 5
										width: parent.width - image.width - 30
										color: "#187988"
	   
										wrapMode: Text.WrapAtWordBoundaryOrAnywhere
										font{
											family: "Cantarell"
											pixelSize: 13
										}
									}
                                }
476 477 478 479 480 481 482
                                Image { 
                                	id: image
                                	width: 150
                                	fillMode: Image.PreserveAspectFit
                                	source: imageSource 
                                }

483 484 485 486
                                Text {
                                    id: dispText
                                    objectName: dispName
                                    text: dispName
487
                                    color: "white"
488

489
                                    font.bold: true
490 491
                                }
                                MouseArea {
492
                                        anchors.fill: parent
493
                                        hoverEnabled: true
494 495 496 497 498 499 500 501 502 503
                                        onEntered:{ 
                                        	dispText.color = "yellow"
                                        	dispSummary.color = "yellow"
                                        	summaryBackground.color = "#030723"
                                    	}
                                        onExited: {
                                        	dispText.color = "white"
                                        	dispSummary.color = "#187988"
                                        	summaryBackground.color ="transparent"
                                        }
504 505
                                        onClicked: {
                                            soListView.currentIndex = index
506 507 508
                                            soListView.soListItemClicked(
                                                        type, typeName,
                                                        soListView.currentIndex)
509 510
                                            skyObjView.flipped = true
                                        }
511
                            	}
512 513
                            }

514 515
                            model: soListModel
                        }
516 517 518
                    }
                }

519
                back: Item {
520
                    id: detailsViewContainer
521
                    width: parent.width
522
                    height: parent.height
523
                    enabled: parent.flipped
524

525

526 527
                    Rectangle {
                        id: detailsViewBackground
528
                        anchors.fill: detailsView
529
                        color: "#00060b"
530 531
                        radius: 12
                        opacity: 0.500
532 533
                    }

534 535 536 537
                    Rectangle {
                        id: detailsView
                        objectName: "detailsViewObj"
                        x: parent.x + 15
538
                        height: parent.height
539
                        width: parent.width - 30
540
                        color: "transparent"
541
                        radius: 12
542 543 544 545
                        border {
                            width: 4
                            color: "#000000"
                        }
546
                        
547 548 549 550

                        Text {
                            id: soname
                            objectName: "sonameObj"
551
                            y: 8
552
                            width: parent.width
553
                            height: 22
554
                            color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
555
                            text: xi18n("text")
556 557 558 559 560 561 562 563
                            anchors{
                                left: parent.left
                                leftMargin: 8
                            }
                            font{
                                bold: true
                                pixelSize: 16
                            }
564
                            verticalAlignment: Text.AlignVCenter
565
                        }
566
                           
567 568 569
                        Text {
                            id: posText
                            objectName: "posTextObj"
570
                            y: parent.height - 50
571 572 573 574
                            anchors{
                                right: parent.right
                                rightMargin: 10
                            }
575
                            textFormat: Text.RichText
576
                            width: parent.width
577
                            height: 16
Jasem Mutlaq's avatar
Jasem Mutlaq committed
578
                            text: xi18n("text")
579
                            horizontalAlignment: Text.AlignRight
580 581 582 583 584 585
                            font{
                                family: "Cantarell"
                                bold: true
                                pixelSize:11
                            }

586
                        }
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651
                        TabView {
                        	id: tabbedView
                        	y: 170
                        	width: parent.width
                        	height: parent.height - 170 - 50
							Tab {
								title: "Object Information"

								Rectangle {
									id: descTextBox				
									height: parent.height
									width:  parent.width
									color: "#010a14"
									radius: 10
									border.width: 0
									anchors{
										top: parent.top
										left: parent.left
										leftMargin: 4
										right: parent.right
										rightMargin: 4
									}
									border.color: "#585454"

									Flickable {
										id: flickableDescText
										clip: true
										flickableDirection: Flickable.VerticalFlick
										width: parent.width
										height: parent.height - 10
										anchors{
											top: parent.top
											topMargin: 10
											bottom: parent.bottom
											bottomMargin: 4
											left: parent.left
											right: parent.right
										}
										contentWidth:  parent.width
										contentHeight: col.height + 4
										Item {
											id: descTextItem
											anchors.fill: parent
											Column {
												id: col
												width: parent.width
												Image { 
													id: detailImg 
													width:parent.width
													anchors{
														right: parent.right
													}
													objectName: "detailImage"
													property string refreshableSource
													fillMode: Image.PreserveAspectFit
													source: refreshableSource
												}
												Text {
													id: descText
													objectName: "descTextObj"
													color: "#187988"
													text: xi18n("text")
													clip: true
													wrapMode: Text.WrapAtWordBoundaryOrAnywhere
													width: parent.width
652
													textFormat: Text.RichText
653 654 655 656 657 658 659 660 661 662
													font{
														family: "Cantarell"
														pixelSize: 13
													}
													onLinkActivated: Qt.openUrlExternally(link)
													MouseArea {
        												anchors.fill: parent
        												acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
        												cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
    												}
663
												}
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763
											} //column
										} //item
									} //flickable
								} //rectangle
							} //tab
						
							Tab {
								id: infoBoxTab
								title: "Wikipedia Infotext"
								active: true
								Rectangle {
									id: descTextBox2
									width: parent.width
									height: (detailsViewContainer.width >= 600) ?  parent.height - 10 - 50 : parent.height
									color: "#010a14"
									radius: 10
									border.width: 0
									states: [ 
										State {
											name: "outOfTab"
											ParentChange { target: descTextBox2; parent: detailsView; x: detailsView.width/2; y: 10 }
											PropertyChanges{target:tabbedView; currentIndex: 0}
											PropertyChanges{target:tabbedView; tabsVisible: false}
											PropertyChanges{target:tabbedView; width: detailsView.width / 2}
											PropertyChanges{target:descTextBox2; width: detailsView.width / 2}
										},
										State {
											name: "inTab"
											ParentChange { target: descTextBox2; parent: infoBoxTab; x: 0; y: 0 }
										}
									]

									onWidthChanged: (detailsViewContainer.width >= 600) ? descTextBox2.state = "outOfTab" : descTextBox2.state = "inTab"
							
									anchors{
										right: parent.right
										rightMargin: 4
										left: (detailsViewContainer.width >= 600) ? parent.horizontalCenter : parent.left
										leftMargin: 4
									}
									border.color: "#585454"

									Flickable {
										id: flickableInfoText
										clip: true
										flickableDirection: Flickable.VerticalFlick
										width: parent.width
										height: parent.height - 10
										anchors{
											top: parent.top
											topMargin: 10
											bottom: parent.bottom
											bottomMargin: 4
											left: parent.left
											right: parent.right
										}
										contentWidth:   parent.width
										contentHeight: col2.height + 4			
										Item {
											id: descInfoTextItem
											anchors{
												top: parent.top
												topMargin: 0
												left: parent.left
												leftMargin: 4
												right: parent.right
												rightMargin: 4
											}
											Column {
												id: col2
												width: parent.width
												Text {
													id: infoText
													objectName: "infoBoxText"
													textFormat: Text.RichText
													color: "white"
													onLinkActivated: Qt.openUrlExternally(link)
													MouseArea {
        												anchors.fill: parent
        												acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text
        												cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
    												}
										
													wrapMode: Text.WrapAtWordBoundaryOrAnywhere
													text: xi18n("\ntrying to Load from Wikipedia. . .")
													clip: true
													width: parent.width
													font{
														family: "Cantarell"
														pixelSize: 13
													} //font
												} //text
											} //column
										} //item
									} //flickable
								} //rectangle
							} //tab
						} //tabview
                        
                       
764

765
                        Item {
766 767
                            id: nextObjRect
                            objectName: "nextObj"
768
                            width: nextObjText.width + nextObjIcon.width + 10
769
                            height: 28
770 771 772 773
                            anchors {
                                right: parent.right
                                rightMargin: 10
                                bottom: parent.bottom
774
                                bottomMargin: 0
775
                            }
776

777
                            signal nextObjClicked
778 779 780 781

                            Rectangle {
                                id: nextObjForeground
                                radius: 5
782
                                anchors.fill: parent
783 784 785 786 787
                                opacity: 0
                            }

                            MouseArea {
                                id: nextObjMouseArea
788

789
                                anchors.fill: nextObjRect
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
                                hoverEnabled: true
                                onEntered: {
                                    nextObjForeground.opacity = 0.1
                                    nextObjText.color = "yellow"
                                }
                                onExited: {
                                    nextObjForeground.opacity = 0.0
                                    nextObjText.color = "white"
                                }
                                onClicked: nextObjRect.nextObjClicked()
                            }

                            Text {
                                id: nextObjText
                                objectName: "nextTextObj"
805

806 807
                                height: 22
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
808
                                text: xi18n("Next")
809 810 811 812 813
                                anchors{
                                    right: nextObjIcon.left
                                    rightMargin: 5
                                    verticalCenter: parent.verticalCenter
                                }
814 815 816
                                visible: true
                                verticalAlignment: Text.AlignVCenter
                                horizontalAlignment: Text.AlignRight
817 818 819 820
                                font{
                                    bold: true
                                    pixelSize:11
                                }
821 822 823 824
                            }

                            Image {
                                id: nextObjIcon
825 826 827 828 829 830 831 832 833

                                anchors{
                                    right: parent.right
                                    verticalCenter: parent.verticalCenter
                                }
                                sourceSize {
                                    height: 24
                                    width: 24
                                }
834 835 836 837
                                source: "next.png"
                            }
                        }

838
                        Item {
839 840
                            id: prevObjRect
                            objectName: "prevObj"
841 842

                            width: prevObjText.width + prevObjIcon.width + 10
843
                            height: 28
844 845 846 847
                            anchors {
                                left: parent.left
                                leftMargin: 10
                                bottom: parent.bottom
848
                                bottomMargin: 0
849
                            }
850

851
                            signal prevObjClicked
852 853 854 855

                            Rectangle {
                                id: prevObjForeground
                                radius: 5
856
                                anchors.fill: parent
857 858 859 860 861
                                opacity: 0
                            }

                            MouseArea {
                                id: prevObjMouseArea
862
                                anchors.fill: parent
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877
                                hoverEnabled: true
                                onEntered: {
                                    prevObjForeground.opacity = 0.1
                                    prevObjText.color = "yellow"
                                }
                                onExited: {
                                    prevObjForeground.opacity = 0.0
                                    prevObjText.color = "white"
                                }
                                onClicked: prevObjRect.prevObjClicked()
                            }

                            Text {
                                id: prevObjText
                                objectName: "prevTextObj"
878

879 880
                                height: 22
                                color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
881
                                text: xi18n("Previous")
882 883 884 885 886
                                anchors{
                                    left: prevObjIcon.right
                                    leftMargin: 5
                                    verticalCenter: parent.verticalCenter
                                }
887 888 889
                                visible: true
                                horizontalAlignment: Text.AlignLeft
                                verticalAlignment: Text.AlignVCenter
890 891 892 893
                                font{
                                    pixelSize: 11
                                    bold: true
                                }
894 895 896 897 898
                            }

                            Image {
                                id: prevObjIcon
                                anchors.verticalCenter: parent.verticalCenter
899 900 901 902
                                sourceSize{
                                    height: 24
                                    width: 24
                                }
903 904 905
                                source: "previous.png"
                            }
                        }
906

907 908
                        Column {
                            id: detailItemsCol
909 910
                            x: 150
                            y: 80
911
                            width: parent.width
912 913
                            height: 93
                            spacing: 14
914
                            
915
                            DetailsItem {
916
                                id: detailsText
917
                                textFormat: Text.RichText
918 919
                                objectName: "detailsTextObj"
                                
920 921
                            }

922 923
                        }

924 925
                        Column {
                            id: detailsViewButtonsCol
926
                            y: 50
927 928 929
                            anchors {
                                left: parent.left
                                leftMargin: 10
930
                            }
931
                            
932
                            spacing: 14
933

934 935 936
                            Text {
                                id: detailsButton
                                objectName: "detailsButtonObj"
937

938 939
                                verticalAlignment: Text.AlignVCenter
                                color: "white"
940
                                text: xi18n("More Details")
941 942 943 944 945
                                font {
                                    underline: true
                                    family: "Cantarell"
                                    pixelSize: 14
                                }
946

947
                                signal detailsButtonClicked
948 949 950 951

                                MouseArea {
                                    id: detailsMouseArea
                                    hoverEnabled: true
952
                                    cursorShape: Qt.PointingHandCursor
953 954 955 956 957
                                    anchors.fill: parent
                                    onEntered: detailsButton.color = "yellow"
                                    onExited: detailsButton.color = "white"
                                    onClicked: detailsButton.detailsButtonClicked()
                                }
958 959
                            }

960 961 962
                            Text {
                                id: slewButton
                                objectName: "slewButtonObj"
963 964

                                verticalAlignment: Text.AlignVCenter
965
                                color: "white"
966
                                text: xi18n("Center in Map")
967 968 969 970 971
                                font {
                                    underline: true
                                    family: "Cantarell"
                                    pixelSize: 14
                                }
972

973
                                signal slewButtonClicked
974

975 976 977
                                MouseArea {
                                    id: slewObjMouseArea
                                    hoverEnabled: true
978
                                    cursorShape: Qt.PointingHandCursor
979 980 981 982 983
                                    anchors.fill: parent
                                    onEntered: slewButton.color = "yellow"
                                    onExited: slewButton.color = "white"
                                    onClicked: slewButton.slewButtonClicked()
                                }
984 985 986 987 988 989
                                CheckBox {
                                	id: autoCenter
                                	objectName: "autoCenterCheckbox"
                                	x: 100
                                	checked: true
                                }
990
                            }
991 992 993 994 995 996 997
                            
                            Text {
                                id: slewTelescopeButton
                                objectName: "slewTelescopeButtonObj"

                                verticalAlignment: Text.AlignVCenter
                                color: "white"
998
                                text: xi18n("Slew Telescope")
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016
                                font {
                                    underline: true
                                    family: "Cantarell"
                                    pixelSize: 14
                                }

                                signal slewTelescopeButtonClicked

                                MouseArea {
                                    id: slewTelescopeObjMouseArea
                                    hoverEnabled: true
                                    cursorShape: Qt.PointingHandCursor
                                    anchors.fill: parent
                                    onEntered: slewTelescopeButton.color = "yellow"
                                    onExited: slewTelescopeButton.color = "white"
                                    onClicked: slewTelescopeButton.slewTelescopeButtonClicked()
                                }
                            }
1017
                        }
1018 1019
                    } //end of detailsView
                } //end of detailsViewContainer
1020 1021 1022 1023 1024 1025 1026 1027

                states: [
                    State {
                        name: "back"
                        PropertyChanges {
                            target: listToDetailsRotation
                            angle: 180
                        }
1028 1029 1030 1031 1032 1033 1034 1035

                        PropertyChanges {
                            target: settingsMouseArea
                            enabled: false
                        }

                        PropertyChanges {
                            target: settingsIcon
1036
                            opacity: 0
1037
                        }
1038 1039 1040 1041 1042 1043 1044 1045

                        PropertyChanges {
                            target: reloadMouseArea
                            enabled: false
                        }

                        PropertyChanges {
                            target: reloadIcon
1046
                            opacity: 0
1047 1048
                        }

1049 1050 1051 1052 1053 1054
                        when: skyObjView.flipped
                    }
                ]

                transitions: [
                    Transition {
1055 1056 1057 1058 1059
                        NumberAnimation {
                            target: listToDetailsRotation
                            property: "angle"
                            duration: 400
                        }
1060 1061 1062 1063 1064
                    }
                ]

                transform: Rotation {
                    id: listToDetailsRotation
1065 1066 1067
                    origin.x: container.width / 2
                    axis.y: 1
                    axis.z: 0
1068
                }
1069
            } //end of skyObjView
1070 1071
        } //end of viewsContainer
    } //end of base
1072

1073
    Rectangle {
1074 1075
        id: backButton
        x: container.width + 10
1076
        y: container.height - 50
1077
        width: leftArrow.width + goBackText.width + 18
1078 1079 1080
        height: 49
        color: "#00000000"
        radius: 5
1081 1082 1083 1084 1085 1086 1087 1088

        Rectangle {
            id: goBackForeground
            anchors.fill: parent
            radius: 5
            opacity: 0.0
        }

1089 1090
        Text {
            id: goBackText
1091
            y: 12
1092
            color: "#f7e808"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
1093
            text: xi18n("Back")
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
            anchors {
                left: leftArrow.right
                leftMargin: 7
                verticalCenterOffset: 0
                verticalCenter: leftArrow.verticalCenter
            }
            font{
                family: "Cantarell"
                pointSize: 13
            }
1104 1105 1106 1107 1108 1109
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
        }

        Image {
            id: leftArrow
1110
            y: 9
1111 1112 1113 1114 1115 1116
            anchors{
                left: parent.left
                leftMargin: 4
                verticalCenterOffset: 0
                verticalCenter: parent.verticalCenter
            }
1117 1118 1119 1120
            source: "leftArrow.png"
        }