wiview.qml 55.9 KB
Newer Older
1
// Copyright (C) 2013 Samikshan Bairagya <samikshan@gmail.com>
2 3 4 5 6 7 8 9 10
/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

11 12 13 14 15
import QtQuick 1.0

Rectangle {
    id: container
    objectName: "containerObj"
16
    width: 376
17
    height: 575
18
    color: "#020518"
19 20 21 22 23 24
    anchors.fill: parent

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

    Rectangle {
        id: base
37
        y: 89
38
        width: parent.width
39
        height: 385
40 41
        color: "transparent"
        radius: 12
42 43 44 45 46 47 48 49 50 51 52 53 54
        anchors.left: parent.left
        anchors.leftMargin: 0
        anchors.right: parent.right
        anchors.rightMargin: 0
        Item {
            id: viewsRow
            objectName: "viewsRowObj"
            width: parent.width
            anchors.top: parent.top
            anchors.bottom: parent.bottom

            signal categorySelected(int category)

55
            Rectangle {
56
                id: categoryView
57 58
                x: 0
                y: 31
59
                width: parent.width
60 61 62 63 64 65 66 67
                height: 351
                color: "transparent"

                Rectangle {
                    id: background

                    color: "#00060b"
                    radius: 12
68 69 70 71 72 73 74 75
                    anchors.top: parent.top
                    anchors.topMargin: 15
                    anchors.bottom: parent.bottom
                    anchors.bottomMargin: 13
                    anchors.right: parent.right
                    anchors.rightMargin: 20
                    anchors.left: parent.left
                    anchors.leftMargin: 20
76
                    opacity: 0.500
77 78 79
                    border.width: 4
                    border.color: "black"
                }
80

81 82
                Rectangle {
                    id: planetRect
83 84
                    x: 128
                    y: 35
85 86
                    width: planetText.width
                    height: planetText.height
87
                    color: "#00000000"
88 89
                    anchors.verticalCenterOffset: -130
                    anchors.horizontalCenterOffset: -30
90 91
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.horizontalCenter: parent.horizontalCenter
92

93 94 95 96 97
                    Text {
                        id: planetText
                        x: 0
                        y: 0
                        color: "#e4800d"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
98
                        text: xi18n("Planets")
99 100
                        anchors.horizontalCenter: parent.horizontalCenter
                        anchors.verticalCenter: parent.verticalCenter
101 102 103 104
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        font.family: "Cantarell"
                        font.pixelSize: 16
105 106 107 108 109

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

119 120
                Rectangle {
                    id: starRect
121 122
                    x: 253
                    y: 80
123 124
                    width: starText.width
                    height: starText.height
125
                    color: "#00000000"
126 127
                    anchors.verticalCenterOffset: -85
                    anchors.horizontalCenterOffset: 87
128 129
                    anchors.horizontalCenter: parent.horizontalCenter
                    anchors.verticalCenter: parent.verticalCenter
130 131 132

                    Text {
                        id: starText
133 134
                        x: 0
                        y: 0
135
                        color: "#e4800d"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
136
                        text: xi18n("Stars")
137 138
                        anchors.horizontalCenter: parent.horizontalCenter
                        anchors.verticalCenter: parent.verticalCenter
139 140 141 142
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        font.family: "Cantarell"
                        font.pixelSize: 16
143 144 145 146

                        MouseArea {
                            id: starMouseArea
                            hoverEnabled: true
147 148
                            anchors.fill: parent
                            onEntered: container.state = "starAreaEntered"
149 150
                            onClicked: {
                                viewsRow.categorySelected(1)
151
                                container.state = "soTypeSelected"
152 153 154
                            }
                        }
                    }
155
                }
156

157 158
                Rectangle {
                    id: conRect
159 160
                    x: 71
                    y: 113
161 162
                    width: conText.width
                    height: conText.height
163
                    color: "#00000000"
164 165
                    anchors.verticalCenterOffset: -52
                    anchors.horizontalCenterOffset: -63
166 167
                    anchors.horizontalCenter: parent.horizontalCenter
                    anchors.verticalCenter: parent.verticalCenter
168 169 170 171

                    Text {
                        id: conText
                        color: "#e4800d"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
172
                        text: xi18n("Constellations")
173 174
                        anchors.verticalCenter: parent.verticalCenter
                        anchors.horizontalCenter: parent.horizontalCenter
175 176 177 178
                        font.family: "Cantarell"
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        font.pixelSize: 16
179 180 181 182 183

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

193 194 195 196 197
                Rectangle {
                    id: dsoContainer
                    y: 172
                    height: 166
                    color: "#00000000"
198 199 200 201
                    anchors.right: parent.right
                    anchors.rightMargin: 35
                    anchors.left: parent.left
                    anchors.leftMargin: 35
202 203

                    Rectangle {
204
                        id: dsoRect
205 206 207 208
                        x: 79
                        y: 18
                        width: dsoText.width
                        height: dsoText.height
209
                        color: "#00000000"
210 211 212 213
                        anchors.verticalCenterOffset: -54
                        anchors.horizontalCenterOffset: 0
                        anchors.horizontalCenter: parent.horizontalCenter
                        anchors.verticalCenter: parent.verticalCenter
214 215 216 217 218
                        Text {
                            id: dsoText
                            x: 0
                            y: 0
                            color: "#e4800d"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
219
                            text: xi18n("Deep-sky Objects")
220 221
                            anchors.horizontalCenter: parent.horizontalCenter
                            anchors.verticalCenter: parent.verticalCenter
222 223 224 225 226 227 228 229 230 231 232
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            font.pixelSize: 16
                            MouseArea {
                                id: dsoMouseArea
                                hoverEnabled: true
                                anchors.fill: parent
                                onEntered: container.state = "dsoAreaEntered"
                                onClicked: container.state = "dsoAreaClicked"
                            }
                            font.family: "Cantarell"
233 234 235 236
                        }
                    }

                    Rectangle {
237
                        id: galRect
238 239 240 241
                        x: 35
                        y: 68
                        width: galText.width
                        height: galText.height
242
                        color: "#00000000"
243 244 245 246
                        anchors.verticalCenterOffset: -4
                        anchors.horizontalCenterOffset: -77
                        anchors.horizontalCenter: parent.horizontalCenter
                        anchors.verticalCenter: parent.verticalCenter
247 248 249 250 251
                        opacity: 0.350
                        Text {
                            id: galText
                            x: 0
                            y: 0
252
                            color: "#6b6660"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
253
                            text: xi18n("Galaxies")
254 255
                            anchors.horizontalCenter: parent.horizontalCenter
                            anchors.verticalCenter: parent.verticalCenter
256 257 258 259 260 261 262 263 264 265
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            font.pixelSize: 16
                            anchors.topMargin: 0
                            MouseArea {
                                id: galMouseArea
                                enabled: false
                                hoverEnabled: false
                                anchors.fill: parent
                                onEntered: container.state = "galAreaEntered"
266 267
                                onClicked: {
                                    viewsRow.categorySelected(3)
268
                                    container.state = "dsoTypeSelected"
269
                                }
270 271 272 273 274
                            }
                            anchors.rightMargin: 0
                            anchors.bottomMargin: 0
                            font.family: "Cantarell"
                            anchors.leftMargin: 0
275 276 277 278 279
                        }
                    }

                    Rectangle {
                        id: nebRect
280 281 282 283
                        x: 96
                        y: 124
                        width: nebText.width
                        height: nebText.height
284
                        color: "#00000000"
285 286 287 288
                        anchors.verticalCenterOffset: 52
                        anchors.horizontalCenterOffset: -17
                        anchors.horizontalCenter: parent.horizontalCenter
                        anchors.verticalCenter: parent.verticalCenter
289 290 291 292 293
                        opacity: 0.340
                        Text {
                            id: nebText
                            x: 0
                            y: 0
294
                            color: "#6b6660"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
295
                            text: xi18n("Nebulae")
296 297
                            anchors.horizontalCenter: parent.horizontalCenter
                            anchors.verticalCenter: parent.verticalCenter
298 299 300 301 302 303 304 305 306
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            font.pixelSize: 16
                            MouseArea {
                                id: nebMouseArea
                                enabled: false
                                hoverEnabled: false
                                anchors.fill: parent
                                onEntered: container.state = "nebAreaEntered"
307 308
                                onClicked: {
                                    viewsRow.categorySelected(5)
309
                                    container.state = "dsoTypeSelected"
310
                                }
311 312
                            }
                            font.family: "Cantarell"
313 314 315
                        }
                    }

316 317
                    Rectangle {
                        id: clustRect
318 319 320 321
                        x: 181
                        y: 80
                        width: clustText.width
                        height: clustText.height
322
                        color: "#00000000"
323 324 325 326
                        anchors.verticalCenterOffset: 8
                        anchors.horizontalCenterOffset: 69
                        anchors.horizontalCenter: parent.horizontalCenter
                        anchors.verticalCenter: parent.verticalCenter
327 328 329 330 331
                        opacity: 0.350
                        Text {
                            id: clustText
                            x: 0
                            y: 0
332
                            color: "#6b6660"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
333
                            text: xi18n("Clusters")
334 335
                            anchors.verticalCenter: parent.verticalCenter
                            anchors.horizontalCenter: parent.horizontalCenter
336 337 338 339 340 341 342 343 344
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            font.pixelSize: 16
                            MouseArea {
                                id: clustMouseArea
                                enabled: false
                                hoverEnabled: false
                                anchors.fill: parent
                                onEntered: container.state = "clustAreaEntered"
345 346
                                onClicked: {
                                    viewsRow.categorySelected(4)
347
                                    container.state = "dsoTypeSelected"
348
                                }
349 350
                            }
                            font.family: "Cantarell"
351 352 353
                        }
                    }
                }
354
            }//end of categoryView
355 356 357 358 359

            Flipable {
                id: skyObjView
                width: parent.width
                height: parent.height
360 361
                anchors.leftMargin: categoryView.width
//                anchors.leftMargin: 370
362 363 364 365 366 367 368

                anchors.left: categoryView.right

                property bool flipped: false

                front: Rectangle {
                    id: soListContainer
369
                    color: "transparent"
370
                    anchors.fill: parent
371

372 373 374 375 376
                    Rectangle {
                        id: soListViewBackground
                        anchors.fill: soListViewContainer
                        color: "#00060b"
                        opacity: 0.5
377
                        radius: 12
378 379
                    }

380
                    Rectangle {
381

382 383 384 385 386
                        id: soListViewContainer
                        x: parent.x + 15
                        y: 31
                        width: parent.width - 30
                        height: 351
387
                        color: "transparent"
388 389 390 391 392 393 394 395
                        radius: 12
                        border.width: 4
                        border.color: "#000000"

                        ListView {
                            id: soListView
                            objectName: "soListObj"
                            anchors.fill: parent
396

397
                            signal soListItemClicked(int type, string typeName, int curIndex)
398 399
                            clip: true

400 401 402 403
                            ScrollBar {
                                flickable: soListView
                            }

404 405 406 407
                            delegate: Item {
                                id: soListItem
                                x: 5
                                height: 40
408

409 410 411 412
                                Text {
                                    id: dispText
                                    objectName: dispName
                                    text: dispName
413
                                    color: "white"
414 415 416 417
                                    anchors.verticalCenter: parent.verticalCenter
                                    font.bold: true
                                    MouseArea {
                                        anchors.fill: parent
418 419 420
                                        hoverEnabled: true
                                        onEntered: dispText.color = "yellow"
                                        onExited: dispText.color = "white"
421 422 423 424 425
                                        onClicked: {
                                            soListView.currentIndex = index
                                            soListView.soListItemClicked(type, typeName, soListView.currentIndex)
                                            skyObjView.flipped = true
                                        }
426 427 428 429
                                    }
                                }
                            }

430 431
                            model: soListModel
                        }
432 433 434 435
                    }
                }

                back: Rectangle {
436
                    id: detailsViewContainer
437
                    width: parent.width
438 439
                    height: parent.height
                    color: "transparent"
440

441 442
                    Rectangle {
                        id: detailsViewBackground
443
                        anchors.fill: detailsView
444
                        color: "#00060b"
445 446
                        radius: 12
                        opacity: 0.500
447 448
                    }

449 450 451 452
                    Rectangle {
                        id: detailsView
                        objectName: "detailsViewObj"
                        x: parent.x + 15
453
                        height: 415
454
                        width: parent.width - 30
455
                        color: "transparent"
456 457 458 459 460 461 462
                        radius: 12
                        border.width: 4
                        border.color: "#000000"

                        Text {
                            id: soname
                            objectName: "sonameObj"
463
                            y: 8
464
                            width: 273
465
                            height: 22
466
                            color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
467
                            text: xi18n("text")
468 469
                            anchors.left: parent.left
                            anchors.leftMargin: 8
470 471 472 473
                            font.bold: true
                            horizontalAlignment: Text.AlignLeft
                            verticalAlignment: Text.AlignVCenter
                            font.pixelSize: 16
474 475
                        }

476 477
                        Text {
                            id: posText
478
                            x: 10
479
                            objectName: "posTextObj"
480
                            y: 45
481 482
                            anchors.right: parent.right
                            anchors.rightMargin: 10
483 484
                            width: 320
                            height: 16
485
                            color: "#f7f7ac"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
486
                            text: xi18n("text")
487
                            font.family: "Cantarell"
488
                            horizontalAlignment: Text.AlignRight
489 490
                            font.underline: false
                            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 502 503 504 505
                            border.width: 0
                            anchors.right: parent.right
                            anchors.rightMargin: 4
                            anchors.left: parent.left
                            anchors.leftMargin: 4
506
                            border.color: "#585454"
507
                            Flickable {
508
                                id: flickableDescText
509 510 511 512 513 514 515 516
                                clip: true
                                flickableDirection: Flickable.VerticalFlick
                                width: parent.width
                                height: parent.height
                                anchors.top: parent.top
                                anchors.topMargin: 3
                                anchors.bottom: parent.bottom
                                anchors.bottomMargin: 4
517

518
                                contentWidth: parent.width
519
                                contentHeight: col.height + 4
520

521 522 523 524 525 526 527 528 529
                                Item {
                                    id: descTextItem
                                    anchors.top :parent.top
                                    anchors.topMargin: 3
                                    anchors.left: parent.left
                                    anchors.leftMargin: 6
                                    anchors.right: parent.right
                                    Column {
                                        id: col
530
                                        width: parent.width
531 532 533 534
                                        Text {
                                            id: descText
                                            objectName: "descTextObj"
                                            color: "#187988"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
535
                                            text: xi18n("text")
536
                                            font.family: "Cantarell"
537 538 539
                                            clip: true
                                            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
                                            width: parent.width
540
                                            font.pixelSize: 13
541
                                        }
542 543 544 545
                                        Text {
                                            id: descSrcText
                                            objectName: "descSrcTextObj"
                                            color: "#18885f"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
546
                                            text: xi18n("Source: ")
547 548 549 550 551 552 553
                                            font.family: "Cantarell"
                                            font.italic: true
                                            horizontalAlignment: Text.AlignRight
                                            clip: true
                                            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
                                            width: parent.width
                                            font.pixelSize: 13
Vijay Dhameliya's avatar
Vijay Dhameliya committed
554
                                            onLinkActivated: Qt.openUrlExternally(link)
555
                                        }
556
                                    }
557 558 559 560
                                }
                            }
                        }

561 562 563
                        Rectangle {
                            id: nextObjRect
                            objectName: "nextObj"
564 565
                            x: 271
                            y: 377
566
                            width: nextObjText.width + nextObjIcon.width + 5
567 568 569
                            height: 28
                            color: "#00000000"
                            radius: 5
570 571
                            anchors.right: parent.right
                            anchors.rightMargin: 10
572 573 574 575 576 577

                            signal nextObjClicked()

                            Rectangle {
                                id: nextObjForeground
                                radius: 5
578
                                anchors.fill: nextObjRect
579 580 581 582 583 584 585
                                opacity: 0
                            }

                            MouseArea {
                                id: nextObjMouseArea
                                x: 13
                                y: 62
586
                                anchors.fill: nextObjRect
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604
                                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"
                                y: 17
                                height: 22
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
605
                                text: xi18n("Next")
606 607 608 609 610 611 612 613 614 615 616 617 618 619
                                anchors.right: nextObjIcon.left
                                anchors.rightMargin: 5
                                anchors.verticalCenter: parent.verticalCenter
                                visible: true
                                verticalAlignment: Text.AlignVCenter
                                horizontalAlignment: Text.AlignRight
                                font.bold: true
                                font.pixelSize: 11

                                x: 7
                            }

                            Image {
                                id: nextObjIcon
620 621 622 623 624
                                x: 46
                                y: 2
                                anchors.right: parent.right
                                anchors.rightMargin: 0
                                anchors.verticalCenterOffset: 0
625 626 627 628 629 630 631 632 633 634
                                anchors.verticalCenter: parent.verticalCenter
                                sourceSize.height: 24
                                sourceSize.width: 24
                                source: "next.png"
                            }
                        }

                        Rectangle {
                            id: prevObjRect
                            objectName: "prevObj"
635
                            y: 377
636
                            width: prevObjText.width + prevObjIcon.width + 5
637 638 639
                            height: 28
                            color: "#00000000"
                            radius: 5
640 641
                            anchors.left: parent.left
                            anchors.leftMargin: 8
642 643

                            signal prevObjClicked()
644
                            x: 8
645 646 647 648

                            Rectangle {
                                id: prevObjForeground
                                radius: 5
649 650 651 652 653
                                anchors.top: parent.top
                                anchors.right: parent.right
                                anchors.bottom: parent.bottom
                                anchors.left: parent.left
                                anchors.topMargin: 0
654 655 656 657 658
                                opacity: 0
                            }

                            MouseArea {
                                id: prevObjMouseArea
659
                                anchors.fill: parent
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677
                                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"
                                y: 7
                                height: 22
                                color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
678
                                text: xi18n("Previous")
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699
                                anchors.left: prevObjIcon.right
                                anchors.leftMargin: 5
                                anchors.verticalCenterOffset: 0
                                font.pixelSize: 11
                                visible: true
                                anchors.verticalCenter: parent.verticalCenter
                                font.bold: true
                                horizontalAlignment: Text.AlignLeft
                                verticalAlignment: Text.AlignVCenter
                            }

                            Image {
                                id: prevObjIcon
                                x: 0
                                y: 2
                                anchors.verticalCenter: parent.verticalCenter
                                sourceSize.height: 24
                                sourceSize.width: 24
                                source: "previous.png"
                            }
                        }
700

701 702 703 704 705 706 707
                        Column {
                            id: detailItemsCol
                            x: 0
                            y: 78
                            width: 200
                            height: 93
                            spacing: 14
708

709 710 711 712 713 714
                            Text {
                                id: sbText
                                objectName: "sbTextObj"
                                width: 164
                                height: 21
                                color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
715
                                text: xi18n("Surface Brightness:")
716 717 718 719 720 721 722
                                anchors.left: parent.left
                                anchors.leftMargin: 8
                                font.pixelSize: 13
                                font.family: "Cantarell"
                                horizontalAlignment: Text.AlignLeft
                                verticalAlignment: Text.AlignVCenter
                            }
723

724 725 726 727 728 729
                            Text {
                                id: magText
                                objectName: "magTextObj"
                                width: 164
                                height: 21
                                color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
730
                                text: xi18n("Magnitude: ")
731 732 733 734 735 736 737 738 739 740 741 742 743 744
                                anchors.left: parent.left
                                anchors.leftMargin: 8
                                font.family: "Cantarell"
                                verticalAlignment: Text.AlignVCenter
                                horizontalAlignment: Text.AlignLeft
                                font.pixelSize: 13
                            }

                            Text {
                                id: sizeText
                                objectName: "sizeTextObj"
                                width: 164
                                height: 21
                                color: "#ffffff"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
745
                                text: xi18n("Size: ")
746 747 748 749 750 751 752
                                anchors.left: parent.left
                                anchors.leftMargin: 8
                                font.pixelSize: 13
                                font.family: "Cantarell"
                                horizontalAlignment: Text.AlignLeft
                                verticalAlignment: Text.AlignVCenter
                            }
753 754
                        }

755 756 757 758 759 760
                        Column {
                            id: detailsViewButtonsCol
                            x: 208
                            y: 134
                            width: 132
                            height: 52
761
                            anchors.right: parent.right
762 763
                            anchors.rightMargin: 0
                            spacing: 14
764

765 766 767 768 769 770 771 772 773 774
                            Text {
                                id: detailsButton
                                objectName: "detailsButtonObj"
                                width: 119
                                height: 16
                                font.underline: true
                                anchors.rightMargin: 10
                                anchors.right: parent.right
                                verticalAlignment: Text.AlignVCenter
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
775
                                text: xi18n("More object details")
776 777
                                font.family: "Cantarell"
                                font.pixelSize: 14
778

779 780 781 782 783 784 785 786 787 788 789
                                signal detailsButtonClicked()
                                x: 0

                                MouseArea {
                                    id: detailsMouseArea
                                    hoverEnabled: true
                                    anchors.fill: parent
                                    onEntered: detailsButton.color = "yellow"
                                    onExited: detailsButton.color = "white"
                                    onClicked: detailsButton.detailsButtonClicked()
                                }
790 791
                            }

792 793 794 795 796 797
                            Text {
                                id: slewButton
                                objectName: "slewButtonObj"
                                width: 119
                                height: 16
                                color: "white"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
798
                                text: xi18n("Slew map to object")
799 800 801 802 803 804
                                font.family: "Cantarell"
                                anchors.right: parent.right
                                anchors.rightMargin: 10
                                font.underline: true
                                verticalAlignment: Text.AlignVCenter
                                font.pixelSize: 14
805

806
                                signal slewButtonClicked()
807

808 809 810 811 812 813 814 815
                                MouseArea {
                                    id: slewObjMouseArea
                                    hoverEnabled: true
                                    anchors.fill: parent
                                    onEntered: slewButton.color = "yellow"
                                    onExited: slewButton.color = "white"
                                    onClicked: slewButton.slewButtonClicked()
                                }
816 817
                            }
                        }
818 819
                    } //end of detailsView
                } //end of detailsViewContainer
820 821 822 823 824 825 826 827

                states: [
                    State {
                        name: "back"
                        PropertyChanges {
                            target: listToDetailsRotation
                            angle: 180
                        }
828 829 830 831 832 833 834 835

                        PropertyChanges {
                            target: settingsMouseArea
                            enabled: false
                        }

                        PropertyChanges {
                            target: settingsIcon
836
                            opacity: 0
837
                        }
838 839 840 841 842 843 844 845

                        PropertyChanges {
                            target: reloadMouseArea
                            enabled: false
                        }

                        PropertyChanges {
                            target: reloadIcon
846
                            opacity: 0
847 848
                        }

849 850 851 852 853 854 855 856 857 858 859 860 861 862 863
                        when: skyObjView.flipped
                    }
                ]

                transitions: [
                    Transition {
                        NumberAnimation { target: listToDetailsRotation; property: "angle"; duration: 400 }
                    }
                ]

                transform: Rotation {
                    id: listToDetailsRotation
                    origin.x: container.width / 2;
                    axis.y: 1; axis.z: 0
                }
864
            } //end of skyObjView
865 866
        }//end of viewsContainer
    }//end of base
867

868
    Rectangle {
869 870
        id: backButton
        x: container.width + 10
871
        y: 518
872
        width: leftArrow.width + goBackText.width + 18
873 874 875
        height: 49
        color: "#00000000"
        radius: 5
876 877 878 879 880 881 882 883

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

884 885
        Text {
            id: goBackText
886
            y: 12
887
            color: "#f7e808"
Jasem Mutlaq's avatar
Jasem Mutlaq committed
888
            text: xi18n("Back")
889 890
            anchors.left: leftArrow.right
            anchors.leftMargin: 7
891 892
            anchors.verticalCenterOffset: 0
            anchors.verticalCenter: leftArrow.verticalCenter
893 894 895 896 897 898 899 900
            font.family: "Cantarell"
            font.pointSize: 13
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
        }

        Image {
            id: leftArrow
901
            y: 9
902 903
            anchors.left: parent.left
            anchors.leftMargin: 4
904 905
            anchors.verticalCenterOffset: 0
            anchors.verticalCenter: parent.verticalCenter
906 907 908 909
            source: "leftArrow.png"
        }

        MouseArea {
910
            id: backButtonMouseArea
911 912 913
            x: 45
            y: 0
            anchors.fill: backButton
914 915 916
            hoverEnabled: true
            onEntered: goBackForeground.opacity = 0.2
            onExited: goBackForeground.opacity = 0.0
917
            onClicked: {
918 919
                if ( container.state == "soTypeSelected" ) {
                    if ( !skyObjView.flipped ) {
920
                        container.state = "base"
921
                    } else if ( skyObjView.flipped ) {
922 923
                        skyObjView.flipped = false
                    }
924 925
                } else if ( container.state == "dsoTypeSelected" ) {
                    if ( !skyObjView.flipped ) {
926
                        container.state = "dsoAreaClicked"
927
                    } else if ( skyObjView.flipped ) {
928 929 930
                        skyObjView.flipped = false
                    }
                }
931
            }
932
        }
933 934 935 936
    }

    Image {
        id: settingsIcon
937
        objectName: "settingsIconObj"
938
        x: 9
939
        y: 529
940 941
        width: 28
        height: 28
942
        anchors.verticalCenterOffset: 0
943
        anchors.verticalCenter: backButton.verticalCenter
944 945 946 947 948 949
        sourceSize.height: 40
        sourceSize.width: 40
        smooth: true
        fillMode: Image.Stretch
        source: "settingsIcon.png"

950 951
        signal settingsIconClicked()

952 953 954
        MouseArea {
            id: settingsMouseArea
            anchors.fill: parent
955 956 957
            hoverEnabled: true
            onEntered: settingsForeground.opacity = 0.2
            onExited: settingsForeground.opacity = 0.0
958
            onClicked: settingsIcon.settingsIconClicked()
959 960 961 962 963 964 965
        }

        Rectangle {
            id: settingsForeground
            anchors.fill: parent
            opacity: 0.0
            radius: 5
966 967
        }
    }
968

969 970
    Image {
        id: reloadIcon
971
        objectName: "reloadIconObj"
972 973 974 975 976 977 978 979 980 981 982 983
        x: 50
        y: 529
        width: 28
        height: 28
        anchors.verticalCenterOffset: 0
        anchors.verticalCenter: backButton.verticalCenter
        sourceSize.height: 40
        sourceSize.width: 40
        smooth: true
        fillMode: Image.Stretch
        source: "reloadIcon.png"

984 985
        signal reloadIconClicked()

986 987 988
        MouseArea {
            id: reloadMouseArea
            anchors.fill: parent
989 990 991 992 993 994 995 996 997 998 999
            hoverEnabled: true
            onEntered: reloadForeground.opacity = 0.2
            onExited: reloadForeground.opacity = 0.0
            onClicked: reloadIcon.reloadIconClicked()
        }

        Rectangle {
            id: reloadForeground
            radius: 5
            opacity: 0
            anchors.fill: parent
1000 1001 1002
        }
    }

1003