wiview.qml 53.5 KB
Newer Older
1

2
// Copyright (C) 2013 Samikshan Bairagya <samikshan@gmail.com>
3 4
/***************************************************************************
 *                                                                         *
5 6 7 8 9 10 11 12 13
  *   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
import QtQuick.Controls 1.2
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 67 68 69 70 71 72
                height: 351

                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
                Item {
                    id: planetItem
93 94
                    width: planetText.width
                    height: planetText.height
95 96 97 98 99
                    anchors{
                        verticalCenterOffset: -130
                        horizontalCenterOffset: -30
                        centerIn: parent
                    }
100

101
                    CategoryTitle {
102
                        id: planetText
103 104 105

                        title: xi18n("Planets")
                        anchors.centerIn: parent
106 107 108 109 110

                        MouseArea {
                            id: planetMouseArea
                            anchors.fill: parent
                            hoverEnabled: true
111
                            onEntered: container.state = "planetAreaEntered"
112 113
                            onClicked: {
                                viewsRow.categorySelected(0)
114
                                container.state = "soTypeSelected"
115 116 117
                            }
                        }
                    }
118
                }
119

120 121 122
                Item {
                    id: starItem

123 124
                    width: starText.width
                    height: starText.height
125 126 127 128 129
                    anchors{
                        verticalCenterOffset: -85
                        horizontalCenterOffset: 87
                        centerIn: parent
                    }
130

131
                    CategoryTitle {
132
                        id: starText
133 134 135

                        title: xi18n("Stars")
                        anchors.centerIn: parent
136 137 138 139

                        MouseArea {
                            id: starMouseArea
                            hoverEnabled: true
140 141
                            anchors.fill: parent
                            onEntered: container.state = "starAreaEntered"
142 143
                            onClicked: {
                                viewsRow.categorySelected(1)
144
                                container.state = "soTypeSelected"
145 146 147
                            }
                        }
                    }
148
                }
149

150 151
                Item {
                    id: conItem
152 153
                    width: conText.width
                    height: conText.height
154 155 156 157 158
                    anchors {
                        verticalCenterOffset: -52
                        horizontalCenterOffset: -63
                        centerIn: parent
                    }
159

160
                    CategoryTitle {
161
                        id: conText
162 163
                        title: xi18n("Constellations")
                        anchors.centerIn: parent
164 165 166 167 168

                        MouseArea {
                            id: conMouseArea
                            anchors.fill: parent
                            hoverEnabled: true
169
                            onEntered: container.state = "conAreaEntered"
170 171
                            onClicked: {
                                viewsRow.categorySelected(2)
172
                                container.state = "soTypeSelected"
173
                            }
174 175 176 177
                        }
                    }
                }

178
                Item {
179 180 181
                    id: dsoContainer
                    y: 172
                    height: 166
182 183 184 185 186 187
                    anchors {
                        right: parent.right
                        rightMargin: 35
                        left: parent.left
                        leftMargin: 35
                    }
188

189 190
                    Item {
                        id: dsoItem
191 192
                        width: dsoText.width
                        height: dsoText.height
193 194 195 196 197 198 199 200

                        anchors {
                            verticalCenterOffset: -54
                            horizontalCenterOffset: 0
                            centerIn: parent
                        }

                        CategoryTitle {
201
                            id: dsoText
202 203 204 205

                            title: xi18n("Deep-sky Objects")
                            anchors.centerIn: parent

206 207 208 209 210 211 212
                            MouseArea {
                                id: dsoMouseArea
                                hoverEnabled: true
                                anchors.fill: parent
                                onEntered: container.state = "dsoAreaEntered"
                                onClicked: container.state = "dsoAreaClicked"
                            }
213 214 215
                        }
                    }

216 217 218
                    Item {
                        id: galItem

219 220
                        width: galText.width
                        height: galText.height
221 222 223 224 225 226 227 228 229

                        anchors {
                            verticalCenterOffset: -4
                            horizontalCenterOffset: -77
                            centerIn: parent
                        }
                        opacity: categoryTitleOpacity

                        CategoryTitle {
230
                            id: galText
231 232 233 234 235 236 237
                            color: disabledColor
                            title: xi18n("Galaxies")
                            anchors {
                                centerIn: parent
                                margins: 0
                            }

238 239 240 241 242 243
                            MouseArea {
                                id: galMouseArea
                                enabled: false
                                hoverEnabled: false
                                anchors.fill: parent
                                onEntered: container.state = "galAreaEntered"
244 245
                                onClicked: {
                                    viewsRow.categorySelected(3)
246
                                    container.state = "dsoTypeSelected"
247
                                }
248
                            }
249 250 251
                        }
                    }

252 253 254
                    Item {
                        id: nebItem

255 256
                        width: nebText.width
                        height: nebText.height
257 258 259 260 261 262

                        anchors {
                            verticalCenterOffset: 52
                            horizontalCenterOffset: -17
                            centerIn: parent
                        }
263
                        opacity: 0.340
264 265

                        CategoryTitle {
266
                            id: nebText
267 268 269 270
                            color: disabledColor
                            title: xi18n("Nebulae")
                            anchors.centerIn: parent

271 272 273 274 275 276
                            MouseArea {
                                id: nebMouseArea
                                enabled: false
                                hoverEnabled: false
                                anchors.fill: parent
                                onEntered: container.state = "nebAreaEntered"
277 278
                                onClicked: {
                                    viewsRow.categorySelected(5)
279
                                    container.state = "dsoTypeSelected"
280
                                }
281
                            }
282 283 284
                        }
                    }

285 286 287
                    Item {
                        id: clustItem

288 289
                        width: clustText.width
                        height: clustText.height
290 291 292 293 294 295 296 297 298

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

                        CategoryTitle {
299
                            id: clustText
300 301 302 303
                            color: disabledColor
                            title: xi18n("Clusters")
                            anchors.centerIn: parent

304 305 306 307 308 309
                            MouseArea {
                                id: clustMouseArea
                                enabled: false
                                hoverEnabled: false
                                anchors.fill: parent
                                onEntered: container.state = "clustAreaEntered"
310 311
                                onClicked: {
                                    viewsRow.categorySelected(4)
312
                                    container.state = "dsoTypeSelected"
313
                                }
314
                            }
315 316 317
                        }
                    }
                }
318
            } //end of categoryView
319 320 321 322

            Flipable {
                id: skyObjView
                width: parent.width
323
                height: parent.height - 150
324
                anchors.leftMargin: categoryView.width
325 326 327
                anchors.left: categoryView.right
                property bool flipped: false

328
                front: Item {
329
                    id: soListContainer
330
                    anchors.fill: parent
331
                    enabled: !parent.flipped // To hide content of front side on back side
332

333 334 335 336 337
                    Rectangle {
                        id: soListViewBackground
                        anchors.fill: soListViewContainer
                        color: "#00060b"
                        opacity: 0.5
338
                        radius: 12
339 340
                    }

341 342 343 344 345
                    Rectangle {
                        id: soListViewContainer
                        x: parent.x + 15
                        y: 31
                        width: parent.width - 30
346
                        height: parent.height -30
347
                        color: "transparent"
348
                        radius: 12
349 350 351 352
                        border {
                            width: 4
                            color: "#000000"
                        }
353 354 355

                        ListView {
                            id: soListView
356
                            z: 0
357 358
                            objectName: "soListObj"
                            anchors.fill: parent
359

360
                            signal soListItemClicked(int type, string typeName, int curIndex)
361 362
                            clip: true

363 364 365
                            ScrollView {
                                anchors.fill: parent
                                contentItem: soListView
366 367
                            }

368 369
                            delegate: Item {
                                id: soListItem
370
                                x: 8
371 372 373 374 375 376 377 378 379 380
                                width: parent.width
                                height: (dispSummary.height >= 130) ? dispSummary.height + 20 : 160
                                
                                Image { 
                                	id: image
                                	width: 150
                                	fillMode: Image.PreserveAspectFit
                                	source: imageSource 
                                }

381

382 383 384 385
                                Text {
                                    id: dispText
                                    objectName: dispName
                                    text: dispName
386
                                    color: "white"
387

388 389 390
                                    font.bold: true
                                    MouseArea {
                                        anchors.fill: parent
391 392 393
                                        hoverEnabled: true
                                        onEntered: dispText.color = "yellow"
                                        onExited: dispText.color = "white"
394 395
                                        onClicked: {
                                            soListView.currentIndex = index
396 397 398
                                            soListView.soListItemClicked(
                                                        type, typeName,
                                                        soListView.currentIndex)
399 400
                                            skyObjView.flipped = true
                                        }
401 402
                                    }
                                }
403 404 405 406 407 408 409 410 411 412 413 414 415 416
                                Text {
                                    id: dispSummary
                                    objectName: dispObjSummary
                                    text: dispObjSummary
                                    x: image.width + 5
                                    width: parent.width - image.width - 30
                                    color: "#187988"
       
                                    wrapMode: Text.WrapAtWordBoundaryOrAnywhere
                                    font{
                                        family: "Cantarell"
                                        pixelSize: 13
                                    }
                                }
417 418
                            }

419 420
                            model: soListModel
                        }
421 422 423
                    }
                }

424
                back: Item {
425
                    id: detailsViewContainer
426
                    width: parent.width
427
                    height: parent.height
428
                    enabled: parent.flipped
429

430

431 432
                    Rectangle {
                        id: detailsViewBackground
433
                        anchors.fill: detailsView
434
                        color: "#00060b"
435 436
                        radius: 12
                        opacity: 0.500
437 438
                    }

439 440 441 442
                    Rectangle {
                        id: detailsView
                        objectName: "detailsViewObj"
                        x: parent.x + 15
443
                        height: parent.height
444
                        width: parent.width - 30
445
                        color: "transparent"
446
                        radius: 12
447 448 449 450
                        border {
                            width: 4
                            color: "#000000"
                        }
451 452 453 454

                        Text {
                            id: soname
                            objectName: "sonameObj"
455
                            y: 8
456
                            width: 273
457
                            height: 22
458
                            color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
459
                            text: xi18n("text")
460 461 462 463 464 465 466 467
                            anchors{
                                left: parent.left
                                leftMargin: 8
                            }
                            font{
                                bold: true
                                pixelSize: 16
                            }
468
                            verticalAlignment: Text.AlignVCenter
469
                        }
470 471 472 473 474 475 476 477 478 479 480 481
                        
                        Image { 
                             id: detailImg
                             anchors{
                                right: parent.right
                             }
                             objectName: "detailImage"
                             property string refreshableSource
                             height: 300
                             fillMode: Image.PreserveAspectFit
                             source: refreshableSource
                        }
482

483 484 485
                        Text {
                            id: posText
                            objectName: "posTextObj"
486
                            y: 300
487 488 489 490
                            anchors{
                                right: parent.right
                                rightMargin: 10
                            }
491 492
                            width: 320
                            height: 16
493
                            color: "#f7f7ac"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
494
                            text: xi18n("text")
495
                            horizontalAlignment: Text.AlignRight
496 497 498 499 500 501
                            font{
                                family: "Cantarell"
                                bold: true
                                pixelSize:11
                            }

502
                        }
503

504
                        Rectangle {
505
                            id: descTextBox
506
                            y: 347
507
                            height: 175
508
                            color: "#010a14"
509
                            radius: 10
510
                            border.width: 0
511 512 513 514 515 516
                            anchors{
                                right: parent.right
                                rightMargin: 4
                                left: parent.left
                                leftMargin: 4
                            }
517
                            border.color: "#585454"
518

519
                            Flickable {
520
                                id: flickableDescText
521 522 523 524
                                clip: true
                                flickableDirection: Flickable.VerticalFlick
                                width: parent.width
                                height: parent.height
525 526 527 528 529 530
                                anchors{
                                    top: parent.top
                                    topMargin: 3
                                    bottom: parent.bottom
                                    bottomMargin: 4
                                }
531

532
                                contentWidth: parent.width
533
                                contentHeight: col.height + 4
534

535 536
                                Item {
                                    id: descTextItem
537 538 539 540 541 542 543
                                    anchors{
                                        top: parent.top
                                        topMargin: 3
                                        left: parent.left
                                        leftMargin: 6
                                        right: parent.right
                                    }
544 545
                                    Column {
                                        id: col
546
                                        width: parent.width
547 548 549 550
                                        Text {
                                            id: descText
                                            objectName: "descTextObj"
                                            color: "#187988"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
551
                                            text: xi18n("text")
552 553 554
                                            clip: true
                                            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
                                            width: parent.width
555 556 557 558
                                            font{
                                                family: "Cantarell"
                                                pixelSize: 13
                                            }
559
                                        }
560 561 562 563
                                        Text {
                                            id: descSrcText
                                            objectName: "descSrcTextObj"
                                            color: "#18885f"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
564
                                            text: xi18n("Source: ")
565
                                            clip: true
566
                                            horizontalAlignment: Text.AlignRight
567 568
                                            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
                                            width: parent.width
Vijay Dhameliya's avatar
Vijay Dhameliya committed
569
                                            onLinkActivated: Qt.openUrlExternally(link)
570 571 572 573 574
                                            font{
                                                family: "Cantarell"
                                                pixelSize: 13
                                                italic: true
                                            }
575
                                        }
576
                                    }
577 578 579 580
                                }
                            }
                        }

581
                        Item {
582 583
                            id: nextObjRect
                            objectName: "nextObj"
584
                            width: nextObjText.width + nextObjIcon.width + 10
585
                            height: 28
586 587 588 589 590 591
                            anchors {
                                right: parent.right
                                rightMargin: 10
                                bottom: parent.bottom
                                bottomMargin: 10
                            }
592

593
                            signal nextObjClicked
594 595 596 597

                            Rectangle {
                                id: nextObjForeground
                                radius: 5
598
                                anchors.fill: parent
599 600 601 602 603
                                opacity: 0
                            }

                            MouseArea {
                                id: nextObjMouseArea
604

605
                                anchors.fill: nextObjRect
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
                                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"
621

622 623
                                height: 22
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
624
                                text: xi18n("Next")
625 626 627 628 629
                                anchors{
                                    right: nextObjIcon.left
                                    rightMargin: 5
                                    verticalCenter: parent.verticalCenter
                                }
630 631 632
                                visible: true
                                verticalAlignment: Text.AlignVCenter
                                horizontalAlignment: Text.AlignRight
633 634 635 636
                                font{
                                    bold: true
                                    pixelSize:11
                                }
637 638 639 640
                            }

                            Image {
                                id: nextObjIcon
641 642 643 644 645 646 647 648 649

                                anchors{
                                    right: parent.right
                                    verticalCenter: parent.verticalCenter
                                }
                                sourceSize {
                                    height: 24
                                    width: 24
                                }
650 651 652 653
                                source: "next.png"
                            }
                        }

654
                        Item {
655 656
                            id: prevObjRect
                            objectName: "prevObj"
657 658

                            width: prevObjText.width + prevObjIcon.width + 10
659
                            height: 28
660 661 662 663 664 665
                            anchors {
                                left: parent.left
                                leftMargin: 10
                                bottom: parent.bottom
                                bottomMargin: 10
                            }
666

667
                            signal prevObjClicked
668 669 670 671

                            Rectangle {
                                id: prevObjForeground
                                radius: 5
672
                                anchors.fill: parent
673 674 675 676 677
                                opacity: 0
                            }

                            MouseArea {
                                id: prevObjMouseArea
678
                                anchors.fill: parent
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
                                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"
694

695 696
                                height: 22
                                color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
697
                                text: xi18n("Previous")
698 699 700 701 702
                                anchors{
                                    left: prevObjIcon.right
                                    leftMargin: 5
                                    verticalCenter: parent.verticalCenter
                                }
703 704 705
                                visible: true
                                horizontalAlignment: Text.AlignLeft
                                verticalAlignment: Text.AlignVCenter
706 707 708 709
                                font{
                                    pixelSize: 11
                                    bold: true
                                }
710 711 712 713 714
                            }

                            Image {
                                id: prevObjIcon
                                anchors.verticalCenter: parent.verticalCenter
715 716 717 718
                                sourceSize{
                                    height: 24
                                    width: 24
                                }
719 720 721
                                source: "previous.png"
                            }
                        }
722

723 724 725
                        Column {
                            id: detailItemsCol
                            x: 0
726
                            y: 75
727 728 729
                            width: 200
                            height: 93
                            spacing: 14
730

731
                            DetailsItem {
732 733
                                id: sbText
                                objectName: "sbTextObj"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
734
                                text: xi18n("Surface Brightness:")
735
                            }
736

737
                            DetailsItem {
738 739
                                id: magText
                                objectName: "magTextObj"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
740
                                text: xi18n("Magnitude: ")
741 742
                            }

743
                            DetailsItem {
744 745
                                id: sizeText
                                objectName: "sizeTextObj"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
746
                                text: xi18n("Size: ")
747
                            }
748 749
                        }

750 751
                        Column {
                            id: detailsViewButtonsCol
752 753 754 755
                            y: 200
                            anchors {
                                left: parent.left
                                leftMargin: 10
756
                            }
757
                            
758
                            spacing: 14
759

760 761 762
                            Text {
                                id: detailsButton
                                objectName: "detailsButtonObj"
763

764 765
                                verticalAlignment: Text.AlignVCenter
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
766
                                text: xi18n("More object details")
767 768 769 770 771
                                font {
                                    underline: true
                                    family: "Cantarell"
                                    pixelSize: 14
                                }
772

773
                                signal detailsButtonClicked
774 775 776 777

                                MouseArea {
                                    id: detailsMouseArea
                                    hoverEnabled: true
778
                                    cursorShape: Qt.PointingHandCursor
779 780 781 782 783
                                    anchors.fill: parent
                                    onEntered: detailsButton.color = "yellow"
                                    onExited: detailsButton.color = "white"
                                    onClicked: detailsButton.detailsButtonClicked()
                                }
784 785
                            }

786 787 788
                            Text {
                                id: slewButton
                                objectName: "slewButtonObj"
789 790

                                verticalAlignment: Text.AlignVCenter
791
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
792
                                text: xi18n("Slew map to object")
793 794 795 796 797
                                font {
                                    underline: true
                                    family: "Cantarell"
                                    pixelSize: 14
                                }
798

799
                                signal slewButtonClicked
800

801 802 803
                                MouseArea {
                                    id: slewObjMouseArea
                                    hoverEnabled: true
804
                                    cursorShape: Qt.PointingHandCursor
805 806 807 808 809
                                    anchors.fill: parent
                                    onEntered: slewButton.color = "yellow"
                                    onExited: slewButton.color = "white"
                                    onClicked: slewButton.slewButtonClicked()
                                }
810
                            }
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836
                            
                            Text {
                                id: slewTelescopeButton
                                objectName: "slewTelescopeButtonObj"

                                verticalAlignment: Text.AlignVCenter
                                color: "white"
                                text: xi18n("Slew telescope to object")
                                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()
                                }
                            }
837
                        }
838 839
                    } //end of detailsView
                } //end of detailsViewContainer
840 841 842 843 844 845 846 847

                states: [
                    State {
                        name: "back"
                        PropertyChanges {
                            target: listToDetailsRotation
                            angle: 180
                        }
848 849 850 851 852 853 854 855

                        PropertyChanges {
                            target: settingsMouseArea
                            enabled: false
                        }

                        PropertyChanges {
                            target: settingsIcon
856
                            opacity: 0
857
                        }
858 859 860 861 862 863 864 865

                        PropertyChanges {
                            target: reloadMouseArea
                            enabled: false
                        }

                        PropertyChanges {
                            target: reloadIcon
866
                            opacity: 0
867 868
                        }

869 870 871 872 873 874
                        when: skyObjView.flipped
                    }
                ]

                transitions: [
                    Transition {
875 876 877 878 879
                        NumberAnimation {
                            target: listToDetailsRotation
                            property: "angle"
                            duration: 400
                        }
880 881 882 883 884
                    }
                ]

                transform: Rotation {
                    id: listToDetailsRotation
885 886 887
                    origin.x: container.width / 2
                    axis.y: 1
                    axis.z: 0
888
                }
889
            } //end of skyObjView
890 891
        } //end of viewsContainer
    } //end of base
892

893
    Rectangle {
894 895
        id: backButton
        x: container.width + 10
896
        y: container.height - 50
897
        width: leftArrow.width + goBackText.width + 18
898 899 900
        height: 49
        color: "#00000000"
        radius: 5
901 902 903 904 905 906 907 908

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

909 910
        Text {
            id: goBackText
911
            y: 12
912
            color: "#f7e808"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
913
            text: xi18n("Back")
914 915 916 917 918 919 920 921 922 923
            anchors {
                left: leftArrow.right
                leftMargin: 7
                verticalCenterOffset: 0
                verticalCenter: leftArrow.verticalCenter
            }
            font{
                family: "Cantarell"
                pointSize: 13
            }
924 925 926 927 928 929
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
        }

        Image {
            id: leftArrow
930
            y: 9
931 932 933 934 935 936
            anchors{
                left: parent.left
                leftMargin: 4
                verticalCenterOffset: 0
                verticalCenter: parent.verticalCenter
            }
937 938 939 940
            source: "leftArrow.png"
        }

        MouseArea {
941
            id: backButtonMouseArea
942
            anchors.fill: backButton
943
            hoverEnabled: true
944
            onEntered: goBackForeground.opacity = buttonOpacity
945
            onExited: goBackForeground.opacity = 0.0
946
            onClicked: {
947 948
                if (container.state == "soTypeSelected") {
                    if (!skyObjView.flipped) {
949
                        container.state = "base"
950
                    } else if (skyObjView.flipped) {
951 952
                        skyObjView.flipped = false
                    }
953 954
                } else if (container.state == "dsoTypeSelected") {
                    if (!skyObjView.flipped) {
955
                        container.state = "dsoAreaClicked"
956
                    } else if (skyObjView.flipped) {
957 958 959
                        skyObjView.flipped = false
                    }
                }
960
            }
961
        }
962 963 964 965
    }

    Image {
        id: settingsIcon
966
        objectName: "settingsIconObj"
967
        x: 9
968
        y: container.height - 50
969 970
        width: 28
        height: 28
971 972 973 974 975 976 977 978
        anchors{
            verticalCenterOffset: 0
            verticalCenter: backButton.verticalCenter
        }
        sourceSize{
            height: 40
            width: 40
        }
979 980 981 982
        smooth: true
        fillMode: Image.Stretch
        source: "settingsIcon.png"

983
        signal settingsIconClicked
984

985 986 987
        MouseArea {
            id: settingsMouseArea
            anchors.fill: parent
988
            hoverEnabled: true