Warning, /education/kstars/kstars/data/qml/whatisinteresting/wiview.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2017 Robert Lancaster <rlancaste@gmail.com> 0002 0003 // based on work of: 0004 // SPDX-FileCopyrightText: 2013 Samikshan Bairagya <samikshan@gmail.com> 0005 0006 // SPDX-License-Identifier: GPL-2.0-or-later 0007 0008 import QtQuick 2.5 0009 import QtQuick.Layouts 1.1 0010 import QtQuick.Controls 1.4 0011 import QtQuick.Controls.Styles 1.4 0012 0013 Rectangle { 0014 id: container 0015 objectName: "containerObj" 0016 color: "#020518" 0017 anchors.fill: parent 0018 0019 property double buttonOpacity: 0.2 0020 property double categoryTitleOpacity: 0.350 0021 0022 ProgressBar { 0023 id: progress 0024 objectName: "progressBar" 0025 width: container.width 0026 value: 0.10 0027 } 0028 0029 Text { 0030 id: title 0031 x: 9 0032 y: 20 0033 color: "#59ad0e" 0034 text: xi18n("What's Interesting...") 0035 renderType: Text.QtRendering 0036 verticalAlignment: Text.AlignVCenter 0037 font { 0038 family: "Cantarell" 0039 bold: false 0040 pixelSize:22 0041 } 0042 } 0043 0044 Text { 0045 id: catTitle 0046 objectName: "categoryTitle" 0047 x: 30 0048 y: 50 0049 color: "white" 0050 text: "" 0051 renderType: Text.QtRendering 0052 verticalAlignment: Text.AlignVCenter 0053 horizontalAlignment: Text.AlignHCenter 0054 font { 0055 family: "Cantarell" 0056 bold: false 0057 pixelSize:22 0058 } 0059 } 0060 0061 Item { 0062 id: base 0063 y: 89 0064 width: parent.width 0065 height: parent.height 0066 anchors { 0067 left: parent.left 0068 leftMargin: 0 0069 right: parent.right 0070 rightMargin: 0 0071 } 0072 0073 Item { 0074 id: viewsRow 0075 objectName: "viewsRowObj" 0076 width: parent.width 0077 anchors { 0078 top: parent.top 0079 bottom: parent.bottom 0080 } 0081 0082 signal categorySelected(string category) 0083 signal inspectSkyObject(string name); 0084 0085 Item { 0086 id: categoryView 0087 width: parent.width 0088 height: parent.height - 150 0089 0090 Rectangle { 0091 id: background 0092 0093 color: "#00060b" 0094 radius: 12 0095 anchors { 0096 top: parent.top 0097 topMargin: 15 0098 bottom: parent.bottom 0099 bottomMargin: 13 0100 right: parent.right 0101 rightMargin: 20 0102 left: parent.left 0103 leftMargin: 20 0104 } 0105 0106 opacity: 0.500 0107 border { 0108 width: 4 0109 color: "black" 0110 } 0111 } 0112 Item { 0113 id: nakedEyeItem 0114 width: nakedEyeText.width 0115 height: nakedEyeText.height 0116 anchors{ 0117 verticalCenterOffset: -250 0118 horizontalCenterOffset: 0 0119 centerIn: parent 0120 } 0121 0122 CategoryTitle { 0123 id: nakedEyeText 0124 color: "yellow" 0125 title: xi18n("Naked-Eye Objects") 0126 renderType: Text.QtRendering 0127 anchors.centerIn: parent 0128 } 0129 } 0130 0131 Item { 0132 id: sunItem 0133 width: sunText.width 0134 height: sunText.height 0135 anchors{ 0136 verticalCenterOffset: -210 0137 horizontalCenterOffset: -50 0138 centerIn: parent 0139 } 0140 0141 CategoryTitle { 0142 id: sunText 0143 0144 title: xi18n("Sun") 0145 renderType: Text.QtRendering 0146 anchors.centerIn: parent 0147 0148 MouseArea { 0149 id: sunMouseArea 0150 anchors.fill: parent 0151 hoverEnabled: true 0152 onEntered: sunText.state = "selected" 0153 onExited: sunText.state = "" 0154 onClicked: { 0155 viewsRow.inspectSkyObject("Sun") 0156 catTitle.text = xi18n("Sun") 0157 container.state = "singleItemSelected" 0158 } 0159 } 0160 } 0161 } 0162 0163 Item { 0164 id: moonItem 0165 width: moonText.width 0166 height: moonText.height 0167 anchors{ 0168 verticalCenterOffset: -210 0169 horizontalCenterOffset: 50 0170 centerIn: parent 0171 } 0172 0173 CategoryTitle { 0174 id: moonText 0175 0176 title: xi18n("Moon") 0177 renderType: Text.QtRendering 0178 anchors.centerIn: parent 0179 0180 MouseArea { 0181 id: moonMouseArea 0182 anchors.fill: parent 0183 hoverEnabled: true 0184 onEntered: moonText.state = "selected" 0185 onExited: moonText.state = "" 0186 onClicked: { 0187 viewsRow.inspectSkyObject("Moon") 0188 catTitle.text = xi18n("Moon") 0189 container.state = "singleItemSelected" 0190 } 0191 } 0192 } 0193 } 0194 0195 0196 0197 Item { 0198 id: planetItem 0199 width: planetText.width 0200 height: planetText.height 0201 anchors{ 0202 verticalCenterOffset: -170 0203 horizontalCenterOffset: -50 0204 centerIn: parent 0205 } 0206 0207 CategoryTitle { 0208 id: planetText 0209 0210 title: xi18n("Planets") 0211 renderType: Text.QtRendering 0212 anchors.centerIn: parent 0213 0214 MouseArea { 0215 id: planetMouseArea 0216 anchors.fill: parent 0217 hoverEnabled: true 0218 onEntered: planetText.state = "selected" 0219 onExited: planetText.state = "" 0220 onClicked: { 0221 viewsRow.categorySelected("planets") 0222 catTitle.text = xi18n("Planets") 0223 container.state = "objectFromListSelected" 0224 } 0225 } 0226 } 0227 } 0228 0229 Item { 0230 id: satelliteItem 0231 width: satelliteText.width 0232 height: satelliteText.height 0233 anchors { 0234 verticalCenterOffset: -170 0235 horizontalCenterOffset: 50 0236 centerIn: parent 0237 } 0238 0239 CategoryTitle { 0240 id: satelliteText 0241 title: xi18n("Satellites") 0242 renderType: Text.QtRendering 0243 anchors.centerIn: parent 0244 0245 MouseArea { 0246 id: satelliteMouseArea 0247 anchors.fill: parent 0248 hoverEnabled: true 0249 onEntered: satelliteText.state = "selected" 0250 onExited: satelliteText.state = "" 0251 onClicked: { 0252 viewsRow.categorySelected("satellites") 0253 catTitle.text = xi18n("Satellites") 0254 container.state = "objectFromListSelected" 0255 } 0256 } 0257 } 0258 } 0259 0260 Item { 0261 id: starItem 0262 0263 width: starText.width 0264 height: starText.height 0265 anchors{ 0266 verticalCenterOffset: -130 0267 horizontalCenterOffset: -50 0268 centerIn: parent 0269 } 0270 0271 CategoryTitle { 0272 id: starText 0273 0274 title: xi18n("Stars") 0275 renderType: Text.QtRendering 0276 anchors.centerIn: parent 0277 0278 MouseArea { 0279 id: starMouseArea 0280 hoverEnabled: true 0281 anchors.fill: parent 0282 onEntered: starText.state = "selected" 0283 onExited: starText.state = "" 0284 onClicked: { 0285 viewsRow.categorySelected("stars") 0286 catTitle.text = xi18n("Stars") 0287 container.state = "objectFromListSelected" 0288 } 0289 } 0290 } 0291 } 0292 0293 Item { 0294 id: conItem 0295 width: conText.width 0296 height: conText.height 0297 anchors { 0298 verticalCenterOffset: -130 0299 horizontalCenterOffset: 50 0300 centerIn: parent 0301 } 0302 0303 CategoryTitle { 0304 id: conText 0305 title: xi18n("Constellations") 0306 renderType: Text.QtRendering 0307 anchors.centerIn: parent 0308 0309 MouseArea { 0310 id: conMouseArea 0311 anchors.fill: parent 0312 hoverEnabled: true 0313 onEntered: conText.state = "selected" 0314 onExited: conText.state = "" 0315 onClicked: { 0316 viewsRow.categorySelected("constellations") 0317 catTitle.text = xi18n("Constellations") 0318 container.state = "objectFromListSelected" 0319 } 0320 } 0321 } 0322 } 0323 0324 Item { 0325 id: dsoItem 0326 width: dsoText.width 0327 height: dsoText.height 0328 0329 anchors { 0330 verticalCenterOffset: -90 0331 horizontalCenterOffset: 0 0332 centerIn: parent 0333 } 0334 0335 CategoryTitle { 0336 id: dsoText 0337 color: "yellow" 0338 title: xi18n("Deep-sky Objects") 0339 renderType: Text.QtRendering 0340 anchors.centerIn: parent 0341 } 0342 } 0343 0344 Item { 0345 id: asteroidItem 0346 0347 width: asteroidText.width 0348 height: asteroidText.height 0349 anchors{ 0350 verticalCenterOffset: -50 0351 horizontalCenterOffset: -50 0352 centerIn: parent 0353 } 0354 0355 CategoryTitle { 0356 id: asteroidText 0357 0358 title: xi18n("Asteroids") 0359 renderType: Text.QtRendering 0360 anchors.centerIn: parent 0361 0362 MouseArea { 0363 id: asteroidMouseArea 0364 hoverEnabled: true 0365 anchors.fill: parent 0366 onEntered: asteroidText.state = "selected" 0367 onExited: asteroidText.state = "" 0368 onClicked: { 0369 viewsRow.categorySelected("asteroids") 0370 catTitle.text = xi18n("Asteroids") 0371 container.state = "objectFromListSelected" 0372 } 0373 } 0374 } 0375 } 0376 0377 Item { 0378 id: cometItem 0379 0380 width: cometText.width 0381 height: cometText.height 0382 anchors{ 0383 verticalCenterOffset: -50 0384 horizontalCenterOffset: 50 0385 centerIn: parent 0386 } 0387 0388 CategoryTitle { 0389 id: cometText 0390 0391 title: xi18n("Comets") 0392 renderType: Text.QtRendering 0393 anchors.centerIn: parent 0394 0395 MouseArea { 0396 id: cometMouseArea 0397 hoverEnabled: true 0398 anchors.fill: parent 0399 onEntered: cometText.state = "selected" 0400 onExited: cometText.state = "" 0401 onClicked: { 0402 viewsRow.categorySelected("comets") 0403 catTitle.text = xi18n("Comets") 0404 container.state = "objectFromListSelected" 0405 } 0406 } 0407 } 0408 } 0409 0410 Item { 0411 id: galItem 0412 0413 width: galText.width 0414 height: galText.height 0415 0416 anchors { 0417 verticalCenterOffset: -10 0418 horizontalCenterOffset: -50 0419 centerIn: parent 0420 } 0421 0422 CategoryTitle { 0423 id: galText 0424 title: xi18n("Galaxies") 0425 renderType: Text.QtRendering 0426 anchors { 0427 centerIn: parent 0428 margins: 0 0429 } 0430 0431 MouseArea { 0432 id: galMouseArea 0433 hoverEnabled: true 0434 anchors.fill: parent 0435 onEntered: galText.state = "selected" 0436 onExited: galText.state = "" 0437 onClicked: { 0438 viewsRow.categorySelected("galaxies") 0439 catTitle.text = xi18n("Galaxies") 0440 container.state = "objectFromListSelected" 0441 } 0442 } 0443 } 0444 } 0445 0446 Item { 0447 id: nebItem 0448 0449 width: nebText.width 0450 height: nebText.height 0451 0452 anchors { 0453 verticalCenterOffset: -10 0454 horizontalCenterOffset: 50 0455 centerIn: parent 0456 } 0457 0458 CategoryTitle { 0459 id: nebText 0460 title: xi18n("Nebulae") 0461 renderType: Text.QtRendering 0462 anchors.centerIn: parent 0463 0464 MouseArea { 0465 id: nebMouseArea 0466 hoverEnabled: true 0467 anchors.fill: parent 0468 onEntered: nebText.state = "selected" 0469 onExited: nebText.state = "" 0470 onClicked: { 0471 viewsRow.categorySelected("nebulas") 0472 catTitle.text = xi18n("Nebulae") 0473 container.state = "objectFromListSelected" 0474 } 0475 } 0476 } 0477 } 0478 0479 Item { 0480 id: clustItem 0481 0482 width: clustText.width 0483 height: clustText.height 0484 0485 anchors { 0486 verticalCenterOffset: 30 0487 horizontalCenterOffset: -75 0488 centerIn: parent 0489 } 0490 0491 CategoryTitle { 0492 id: clustText 0493 title: xi18n("Clusters") 0494 renderType: Text.QtRendering 0495 anchors.centerIn: parent 0496 0497 MouseArea { 0498 id: clustMouseArea 0499 hoverEnabled: true 0500 anchors.fill: parent 0501 onEntered: clustText.state = "selected" 0502 onExited: clustText.state = "" 0503 onClicked: { 0504 viewsRow.categorySelected("clusters") 0505 catTitle.text = xi18n("Clusters") 0506 container.state = "objectFromListSelected" 0507 } 0508 } 0509 } 0510 } 0511 0512 Item { 0513 id: superItem 0514 0515 width: superText.width 0516 height: superText.height 0517 0518 anchors { 0519 verticalCenterOffset: 30 0520 horizontalCenterOffset: 75 0521 centerIn: parent 0522 } 0523 0524 CategoryTitle { 0525 id: superText 0526 title: xi18n("Supernovae") 0527 renderType: Text.QtRendering 0528 anchors.centerIn: parent 0529 0530 MouseArea { 0531 id: superMouseArea 0532 hoverEnabled: true 0533 anchors.fill: parent 0534 onEntered: superText.state = "selected" 0535 onExited: superText.state = "" 0536 onClicked: { 0537 viewsRow.categorySelected("supernovas") 0538 catTitle.text = xi18n("Supernovae") 0539 container.state = "objectFromListSelected" 0540 } 0541 } 0542 } 0543 } 0544 0545 Item { 0546 id: catalogsItem 0547 width: catalogText.width 0548 height: catalogText.height 0549 anchors{ 0550 verticalCenterOffset: 70 0551 horizontalCenterOffset: 0 0552 centerIn: parent 0553 } 0554 0555 CategoryTitle { 0556 id: catalogText 0557 color: "yellow" 0558 title: xi18n("Explore Catalogs") 0559 renderType: Text.QtRendering 0560 anchors.centerIn: parent 0561 } 0562 } 0563 0564 Item { 0565 id: messierItem 0566 0567 width: messierText.width 0568 height: messierText.height 0569 0570 anchors { 0571 verticalCenterOffset: 110 0572 horizontalCenterOffset: 0 0573 centerIn: parent 0574 } 0575 0576 CategoryTitle { 0577 id: messierText 0578 title: xi18n("Messier Catalog") 0579 renderType: Text.QtRendering 0580 anchors.centerIn: parent 0581 0582 MouseArea { 0583 id: messierMouseArea 0584 hoverEnabled: true 0585 anchors.fill: parent 0586 onEntered: messierText.state = "selected" 0587 onExited: messierText.state = "" 0588 onClicked: { 0589 viewsRow.categorySelected("messier") 0590 catTitle.text = "Messier Catalog" 0591 container.state = "objectFromListSelected" 0592 } 0593 } 0594 } 0595 } 0596 0597 Item { 0598 id: ngcItem 0599 0600 width: ngcText.width 0601 height: ngcText.height 0602 0603 anchors { 0604 verticalCenterOffset: 150 0605 horizontalCenterOffset: 0 0606 centerIn: parent 0607 } 0608 0609 CategoryTitle { 0610 id: ngcText 0611 title: xi18n("NGC Catalog") 0612 renderType: Text.QtRendering 0613 anchors.centerIn: parent 0614 0615 MouseArea { 0616 id: ngcMouseArea 0617 hoverEnabled: true 0618 anchors.fill: parent 0619 onEntered: ngcText.state = "selected" 0620 onExited: ngcText.state = "" 0621 onClicked: { 0622 viewsRow.categorySelected("ngc") 0623 catTitle.text = "NGC Catalog" 0624 container.state = "objectFromListSelected" 0625 } 0626 } 0627 } 0628 } 0629 0630 Item { 0631 id: icItem 0632 0633 width: icText.width 0634 height: icText.height 0635 0636 anchors { 0637 verticalCenterOffset: 190 0638 horizontalCenterOffset: 0 0639 centerIn: parent 0640 } 0641 0642 CategoryTitle { 0643 id: icText 0644 title: xi18n("IC Catalog") 0645 renderType: Text.QtRendering 0646 anchors.centerIn: parent 0647 0648 MouseArea { 0649 id: icMouseArea 0650 hoverEnabled: true 0651 anchors.fill: parent 0652 onEntered: icText.state = "selected" 0653 onExited: icText.state = "" 0654 onClicked: { 0655 viewsRow.categorySelected("ic") 0656 catTitle.text = "IC Catalog" 0657 container.state = "objectFromListSelected" 0658 } 0659 } 0660 } 0661 } 0662 0663 Item { 0664 id: sh2Item 0665 0666 width: sh2Text.width 0667 height: sh2Text.height 0668 0669 anchors { 0670 verticalCenterOffset: 230 0671 horizontalCenterOffset: 0 0672 centerIn: parent 0673 } 0674 0675 CategoryTitle { 0676 id: sh2Text 0677 title: xi18n("Sharpless Catalog") 0678 renderType: Text.QtRendering 0679 anchors.centerIn: parent 0680 0681 MouseArea { 0682 id: sh2MouseArea 0683 hoverEnabled: true 0684 anchors.fill: parent 0685 onEntered: sh2Text.state = "selected" 0686 onExited: sh2Text.state = "" 0687 onClicked: { 0688 viewsRow.categorySelected("sharpless") 0689 catTitle.text = "Sharpless Catalog" 0690 container.state = "objectFromListSelected" 0691 } 0692 } 0693 } 0694 } 0695 0696 } //end of categoryView 0697 0698 Flipable { 0699 id: skyObjView 0700 objectName: "skyObjView" 0701 width: parent.width 0702 height: parent.height - 150 0703 anchors.leftMargin: categoryView.width 0704 anchors.left: categoryView.right 0705 property bool flipped: false 0706 0707 front: Item { 0708 id: soListContainer 0709 anchors.fill: parent 0710 enabled: !parent.flipped // To hide content of front side on back side 0711 0712 Rectangle { 0713 id: soListViewBackground 0714 anchors.fill: soListViewContainer 0715 color: "#00060b" 0716 opacity: 0.5 0717 radius: 12 0718 } 0719 0720 Rectangle { 0721 id: soListViewContainer 0722 anchors{ 0723 top: soListContainer.top 0724 bottom: soListContainer.bottom 0725 left: soListContainer.left 0726 right: soListContainer.right 0727 } 0728 color: "transparent" 0729 radius: 12 0730 border { 0731 width: 4 0732 color: "#000000" 0733 } 0734 0735 Flickable { 0736 id: flickable 0737 anchors.fill: parent 0738 clip: true 0739 flickableDirection: Flickable.VerticalFlick 0740 0741 0742 ListView { 0743 id: soListView 0744 z: 0 0745 objectName: "soListObj" 0746 anchors.fill: parent 0747 0748 signal soListItemClicked(int curIndex) 0749 clip: true 0750 0751 highlightMoveDuration: 1 0752 0753 model: soListModel 0754 0755 Rectangle{ 0756 id: soListEmptyMessage 0757 objectName: "soListEmptyMessage" 0758 color: "#00060b" 0759 anchors.fill: parent 0760 Text{ 0761 anchors.fill: parent 0762 text: xi18n("No Items to display") 0763 renderType: Text.QtRendering 0764 verticalAlignment: Text.AlignVCenter 0765 horizontalAlignment: Text.AlignHCenter 0766 color: "white" 0767 font{ 0768 family: "Arial" 0769 pointSize: 20 0770 } 0771 } 0772 visible: (soListView.count > 0 || container.state == "singleItemSelected") ? false : true 0773 } 0774 0775 Rectangle { 0776 id: scrollbar 0777 anchors.right: soListView.right 0778 y: soListView.visibleArea.yPosition * soListView.height 0779 width: 10 0780 height: (soListView.visibleArea.heightRatio * soListView.height > 10) ? soListView.visibleArea.heightRatio * soListView.height : 10 0781 color: "blue" 0782 MouseArea { 0783 id: dragScrollBar 0784 drag.target: scrollbar 0785 drag.axis: Drag.YAxis 0786 drag.minimumY: 0 0787 drag.maximumY: soListView.height - scrollbar.height 0788 anchors.fill: parent 0789 enabled: true 0790 onPositionChanged: { 0791 soListView.contentY = scrollbar.y / soListView.height * soListView.contentHeight 0792 } 0793 0794 }//Mousearea 0795 } 0796 0797 delegate: Item { 0798 id: soListItem 0799 x: 8 0800 width: parent.width 0801 height: (dispSummary.height >= 130) ? dispSummary.height + 20 : 160 0802 0803 Rectangle{ 0804 id: summaryBackground 0805 color: (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "#030723" : "transparent" 0806 width: parent.width 0807 height: parent.height 0808 MouseArea { 0809 id: mouseListArea 0810 anchors.fill: parent 0811 hoverEnabled: true 0812 onClicked: { 0813 soListView.currentIndex = index 0814 soListView.soListItemClicked(soListView.currentIndex) 0815 skyObjView.flipped = true 0816 } 0817 }//Mousearea 0818 Text { 0819 id: dispSummary 0820 objectName: dispObjSummary 0821 text: dispObjSummary 0822 renderType: Text.QtRendering 0823 textFormat: Text.RichText 0824 x: image.width + 5 0825 width: parent.width - image.width - 30 0826 color: (nightVision.state == "active" && soListItem.ListView.isCurrentItem) ? "#F89404" : (nightVision.state == "active") ? "red" : (soListItem.ListView.isCurrentItem) ? "white" : (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "yellow" : "gray" 0827 0828 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 0829 font{ 0830 family: "Arial" 0831 pixelSize: 13 0832 } 0833 0834 MouseArea { 0835 id: mouseTextArea 0836 anchors.fill: parent 0837 hoverEnabled: true 0838 onClicked: { 0839 soListView.currentIndex = index 0840 soListView.soListItemClicked(soListView.currentIndex) 0841 skyObjView.flipped = true 0842 } 0843 }//Mousearea 0844 } 0845 } 0846 Image { 0847 id: image 0848 width: 150 0849 height: parent.height 0850 fillMode: Image.PreserveAspectFit 0851 source: imageSource 0852 MouseArea { 0853 id: mouseImgArea 0854 anchors.fill: parent 0855 hoverEnabled: true 0856 onClicked: { 0857 soListView.currentIndex = index 0858 soListView.soListItemClicked(soListView.currentIndex) 0859 } 0860 }//Mousearea 0861 } 0862 Text { 0863 id: dispText 0864 objectName: dispName 0865 text: dispName 0866 renderType: Text.QtRendering 0867 color: (nightVision.state == "active" && soListItem.ListView.isCurrentItem) ? "#F89404" : (nightVision.state == "active") ? "red" : (mouseListArea.containsMouse||mouseImgArea.containsMouse||mouseTextArea.containsMouse) ? "yellow" : "white" 0868 0869 font.bold: true 0870 } 0871 }//soListItem 0872 }//soListView 0873 }//Flickable 0874 }//soListViewContainer 0875 }//Front, soListContainer 0876 0877 back: Item { 0878 id: detailsViewContainer 0879 width: parent.width 0880 height: parent.height 0881 enabled: parent.flipped 0882 0883 0884 Rectangle { 0885 id: detailsViewBackground 0886 anchors.fill: detailsView 0887 color: "#00060b" 0888 radius: 12 0889 opacity: 0.500 0890 } 0891 0892 Rectangle { 0893 id: detailsView 0894 objectName: "detailsViewObj" 0895 x: parent.x + 15 0896 height: parent.height 0897 width: parent.width - 30 0898 color: "transparent" 0899 radius: 12 0900 border { 0901 width: 4 0902 color: "#000000" 0903 } 0904 0905 Text { 0906 id: soname 0907 objectName: "sonameObj" 0908 y: 8 0909 width: parent.width 0910 height: 22 0911 color: "#ffffff" 0912 text: xi18n("text") 0913 renderType: Text.QtRendering 0914 anchors{ 0915 left: parent.left 0916 leftMargin: 8 0917 } 0918 font{ 0919 bold: true 0920 pixelSize: 16 0921 } 0922 verticalAlignment: Text.AlignVCenter 0923 } 0924 0925 Text { 0926 id: posText 0927 objectName: "posTextObj" 0928 y: parent.height - 50 0929 anchors{ 0930 right: parent.right 0931 rightMargin: 10 0932 } 0933 textFormat: Text.RichText 0934 width: parent.width 0935 height: 16 0936 text: xi18n("text") 0937 renderType: Text.QtRendering 0938 horizontalAlignment: Text.AlignRight 0939 font{ 0940 family: "Arial" 0941 bold: true 0942 pixelSize:11 0943 } 0944 0945 } 0946 Column { 0947 id: detailItemsCol 0948 x: 150 0949 y: 80 0950 width: parent.width 0951 height: 93 0952 spacing: 14 0953 0954 DetailsItem { 0955 id: detailsText 0956 textFormat: Text.RichText 0957 objectName: "detailsTextObj" 0958 0959 } 0960 0961 } 0962 0963 Column { 0964 id: detailsViewButtonsCol 0965 y: 50 0966 anchors { 0967 left: parent.left 0968 leftMargin: 10 0969 } 0970 0971 spacing: 14 0972 0973 Text { 0974 id: detailsButton 0975 objectName: "detailsButtonObj" 0976 0977 verticalAlignment: Text.AlignVCenter 0978 color: "white" 0979 text: xi18n("More Details") 0980 renderType: Text.QtRendering 0981 font { 0982 underline: true 0983 family: "Cantarell" 0984 pixelSize: 14 0985 } 0986 0987 signal detailsButtonClicked 0988 0989 MouseArea { 0990 id: detailsMouseArea 0991 hoverEnabled: true 0992 cursorShape: Qt.PointingHandCursor 0993 anchors.fill: parent 0994 onEntered: detailsButton.color = (nightVision.state == "active") ? "red" : "yellow" 0995 onExited: detailsButton.color = (nightVision.state == "active") ? "red" : "white" 0996 onClicked: detailsButton.detailsButtonClicked() 0997 } 0998 } 0999 1000 Text { 1001 id: centerButton 1002 objectName: "centerButtonObj" 1003 1004 verticalAlignment: Text.AlignVCenter 1005 color: "white" 1006 text: xi18n("Center in Map \n") 1007 renderType: Text.QtRendering 1008 font { 1009 underline: true 1010 family: "Arial" 1011 pixelSize: 14 1012 } 1013 1014 signal centerButtonClicked 1015 1016 MouseArea { 1017 id: centerObjMouseArea 1018 hoverEnabled: true 1019 cursorShape: Qt.PointingHandCursor 1020 anchors.fill: parent 1021 onEntered: centerButton.color = (nightVision.state == "active") ? "red" : "yellow" 1022 onExited: centerButton.color = (nightVision.state == "active") ? "red" : "white" 1023 onClicked: centerButton.centerButtonClicked() 1024 } 1025 1026 Text { 1027 text: xi18n(" Auto Track ") 1028 renderType: Text.QtRendering 1029 color: "white" 1030 font { 1031 family: "Arial" 1032 pixelSize: 14 1033 } 1034 y: 15 1035 } 1036 1037 CheckBox { 1038 id: autoCenter 1039 objectName: "autoCenterCheckbox" 1040 x: 37 1041 y: 15 1042 checked: true 1043 } 1044 1045 CheckBox { 1046 id: autoTrack 1047 objectName: "autoTrackCheckbox" 1048 x: 97 1049 y: 15 1050 checked: false 1051 onClicked: centerButton.centerButtonClicked() 1052 } 1053 1054 } 1055 1056 1057 Text { 1058 id: slewTelescopeButton 1059 objectName: "slewTelescopeButtonObj" 1060 1061 verticalAlignment: Text.AlignVCenter 1062 color: "white" 1063 text: xi18n("Slew Telescope") 1064 renderType: Text.QtRendering 1065 font { 1066 underline: true 1067 family: "Cantarell" 1068 pixelSize: 14 1069 } 1070 1071 signal slewTelescopeButtonClicked 1072 1073 MouseArea { 1074 id: slewTelescopeObjMouseArea 1075 hoverEnabled: true 1076 cursorShape: Qt.PointingHandCursor 1077 anchors.fill: parent 1078 onEntered: slewTelescopeButton.color = (nightVision.state == "active") ? "red" : "yellow" 1079 onExited: slewTelescopeButton.color = (nightVision.state == "active") ? "red" : "white" 1080 onClicked: slewTelescopeButton.slewTelescopeButtonClicked() 1081 } 1082 } 1083 } 1084 TabView { 1085 id: tabbedView 1086 y: 170 1087 width: parent.width 1088 height: parent.height - 170 - 50 1089 frameVisible: false 1090 1091 property Component nightTabs: TabViewStyle { 1092 tabsAlignment: Qt.AlignHCenter 1093 frameOverlap: 1 1094 tab: Rectangle { 1095 border.color: "black" 1096 implicitWidth: 150 1097 implicitHeight: 30 1098 color: "red" 1099 Text { 1100 id: text 1101 anchors.centerIn: parent 1102 text: styleData.title 1103 renderType: Text.QtRendering 1104 color: styleData.selected ? "white" : "black" 1105 } 1106 } 1107 } 1108 1109 Tab { 1110 title: xi18n("Object Information") 1111 1112 1113 Rectangle { 1114 id: descTextBox 1115 height: parent.height 1116 width: parent.width 1117 color: "#010a14" 1118 radius: 10 1119 border.width: 0 1120 anchors{ 1121 top: parent.top 1122 left: parent.left 1123 leftMargin: 4 1124 right: parent.right 1125 rightMargin: 4 1126 } 1127 border.color: "#585454" 1128 1129 Flickable { 1130 id: flickableDescText 1131 clip: true 1132 flickableDirection: Flickable.VerticalFlick 1133 width: parent.width 1134 height: parent.height - 10 1135 anchors{ 1136 top: parent.top 1137 topMargin: 20 1138 bottom: parent.bottom 1139 bottomMargin: 4 1140 left: parent.left 1141 leftMargin: 10 1142 right: parent.right 1143 rightMargin: 10 1144 } 1145 contentWidth: parent.width 1146 contentHeight: col.height + 4 1147 Item { 1148 id: descTextItem 1149 anchors.fill: parent 1150 Column { 1151 id: col 1152 width: parent.width 1153 Image { 1154 id: detailImg 1155 width: parent.width - 20 1156 anchors{ 1157 right: parent.right 1158 } 1159 objectName: "detailImage" 1160 property string refreshableSource 1161 fillMode: Image.PreserveAspectFit 1162 source: refreshableSource 1163 } 1164 Text { 1165 id: descText 1166 objectName: "descTextObj" 1167 color: "white" 1168 text: xi18n("text") 1169 renderType: Text.QtRendering 1170 clip: true 1171 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1172 width: parent.width - 20 1173 textFormat: Text.RichText 1174 font{ 1175 family: "Arial" 1176 pixelSize: 13 1177 } 1178 onLinkActivated: Qt.openUrlExternally(link) 1179 MouseArea { 1180 anchors.fill: parent 1181 acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text 1182 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor 1183 } 1184 } 1185 } //column 1186 } //item 1187 } //flickable 1188 } //rectangle 1189 } //tab 1190 1191 Tab { 1192 id: infoBoxTab 1193 title: xi18n("Wikipedia Infotext") 1194 1195 active: true 1196 Rectangle { 1197 id: descTextBox2 1198 color: "#010a14" 1199 radius: 10 1200 border.width: 0 1201 states: [ 1202 State { 1203 name: "outOfTab" 1204 when: ( (container.state == "singleItemSelected" && detailsView.width >= 600)||(container.state != "singleItemSelected" && detailsView.width >= 600 && detailsView.width < 900)) 1205 PropertyChanges{target:descTextBox2; parent: detailsView} 1206 PropertyChanges{target:descTextBox2; width: detailsView.width / 2} 1207 PropertyChanges{target:descTextBox2; anchors{ 1208 top: detailsView.top 1209 topMargin: 4 1210 bottom: posText.top 1211 left: tabbedView.right 1212 right: detailsView.right 1213 } 1214 } 1215 PropertyChanges{target:tabbedView; currentIndex: 0} 1216 PropertyChanges{target:tabbedView; tabsVisible: false} 1217 PropertyChanges{target:tabbedView; width: detailsView.width / 2} 1218 }, 1219 State { 1220 name: "includeList" 1221 when: (detailsView.width >= 900 && container.state!="singleItemSelected") 1222 PropertyChanges{target: soListViewContainer; parent: detailsView} 1223 PropertyChanges{target: soListViewContainer; anchors{ 1224 top: detailsView.top 1225 bottom: posText.top 1226 left: detailsView.left 1227 right: tabbedView.left 1228 } 1229 } 1230 PropertyChanges{target:descTextBox2; parent: detailsView} 1231 PropertyChanges{target:descTextBox2; width: detailsView.width / 3} 1232 PropertyChanges{target:descTextBox2; anchors{ 1233 top: detailsView.top 1234 topMargin: 4 1235 bottom: posText.top 1236 left: tabbedView.right 1237 right: detailsView.right 1238 } 1239 } 1240 PropertyChanges{target:soListViewContainer; width: detailsView.width / 3} 1241 PropertyChanges{target:tabbedView; x: detailsView.width / 3} 1242 PropertyChanges{target:detailsViewButtonsCol; anchors.left: soListViewContainer.right} 1243 PropertyChanges{target:soname; anchors.left: soListViewContainer.right} 1244 PropertyChanges{target:detailItemsCol; x: 150 + detailsView.width / 3} 1245 PropertyChanges{target:tabbedView; width: detailsView.width / 3} 1246 PropertyChanges{target:tabbedView; currentIndex: 0} 1247 PropertyChanges{target:tabbedView; tabsVisible: false} 1248 PropertyChanges{target:skyObjView; flipped: true} 1249 } 1250 ] 1251 1252 anchors{ 1253 top: infoBoxTab.top 1254 bottom: infoBoxTab.bottom 1255 left: infoBoxTab.left 1256 right: infoBoxTab.right 1257 rightMargin: 4 1258 leftMargin: 4 1259 } 1260 border.color: "#585454" 1261 1262 Flickable { 1263 id: flickableInfoText 1264 clip: true 1265 flickableDirection: Flickable.VerticalFlick 1266 width: parent.width 1267 height: parent.height - 10 1268 anchors{ 1269 top: parent.top 1270 topMargin: 10 1271 bottom: parent.bottom 1272 bottomMargin: 4 1273 left: parent.left 1274 right: parent.right 1275 } 1276 contentWidth: parent.width 1277 contentHeight: col2.height + 4 1278 Item { 1279 id: descInfoTextItem 1280 anchors{ 1281 top: parent.top 1282 topMargin: 0 1283 left: parent.left 1284 leftMargin: 4 1285 right: parent.right 1286 rightMargin: 4 1287 } 1288 Column { 1289 id: col2 1290 width: parent.width 1291 Text { 1292 id: infoText 1293 objectName: "infoBoxText" 1294 textFormat: Text.RichText 1295 color: "white" 1296 onLinkActivated: Qt.openUrlExternally(link) 1297 MouseArea { 1298 anchors.fill: parent 1299 acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text 1300 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor 1301 } 1302 1303 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1304 verticalAlignment: Text.AlignVCenter 1305 horizontalAlignment: Text.AlignHCenter 1306 text: xi18n("Info Text") 1307 renderType: Text.QtRendering 1308 clip: true 1309 width: parent.width 1310 font{ 1311 family: "Arial" 1312 pixelSize: 13 1313 } //font 1314 } //text 1315 } //column 1316 } //item 1317 } //flickable 1318 } //rectangle 1319 } //tab 1320 } //tabview 1321 1322 1323 1324 Item { 1325 id: nextObjRect 1326 objectName: "nextObj" 1327 width: nextObjText.width + nextObjIcon.width + 10 1328 height: 28 1329 anchors { 1330 right: parent.right 1331 rightMargin: 10 1332 bottom: parent.bottom 1333 bottomMargin: 0 1334 } 1335 1336 signal nextObjClicked 1337 1338 Rectangle { 1339 id: nextObjForeground 1340 radius: 5 1341 anchors.fill: parent 1342 opacity: 0 1343 } 1344 1345 MouseArea { 1346 id: nextObjMouseArea 1347 1348 anchors.fill: nextObjRect 1349 hoverEnabled: true 1350 onEntered: { 1351 nextObjForeground.opacity = 0.1 1352 nextObjText.color = (nightVision.state == "active") ? "red" : "yellow" 1353 } 1354 onExited: { 1355 nextObjForeground.opacity = 0.0 1356 nextObjText.color = (nightVision.state == "active") ? "red" : "white" 1357 } 1358 onClicked: { 1359 nextObjRect.nextObjClicked() 1360 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning) 1361 } 1362 } 1363 1364 Text { 1365 id: nextObjText 1366 objectName: "nextTextObj" 1367 1368 height: 22 1369 color: "white" 1370 text: xi18n("Next") 1371 renderType: Text.QtRendering 1372 anchors{ 1373 right: nextObjIcon.left 1374 rightMargin: 5 1375 verticalCenter: parent.verticalCenter 1376 } 1377 visible: true 1378 verticalAlignment: Text.AlignVCenter 1379 horizontalAlignment: Text.AlignRight 1380 font{ 1381 bold: true 1382 pixelSize:11 1383 } 1384 } 1385 1386 Image { 1387 id: nextObjIcon 1388 1389 anchors{ 1390 right: parent.right 1391 verticalCenter: parent.verticalCenter 1392 } 1393 sourceSize { 1394 height: 24 1395 width: 24 1396 } 1397 source: "next.png" 1398 } 1399 } 1400 1401 Item { 1402 id: prevObjRect 1403 objectName: "prevObj" 1404 1405 width: prevObjText.width + prevObjIcon.width + 10 1406 height: 28 1407 anchors { 1408 left: parent.left 1409 leftMargin: 10 1410 bottom: parent.bottom 1411 bottomMargin: 0 1412 } 1413 1414 signal prevObjClicked 1415 1416 Rectangle { 1417 id: prevObjForeground 1418 radius: 5 1419 anchors.fill: parent 1420 opacity: 0 1421 } 1422 1423 MouseArea { 1424 id: prevObjMouseArea 1425 anchors.fill: parent 1426 hoverEnabled: true 1427 onEntered: { 1428 prevObjForeground.opacity = 0.1 1429 prevObjText.color = (nightVision.state == "active") ? "red" : "yellow" 1430 } 1431 onExited: { 1432 prevObjForeground.opacity = 0.0 1433 prevObjText.color = (nightVision.state == "active") ? "red" : "white" 1434 } 1435 onClicked: { 1436 prevObjRect.prevObjClicked() 1437 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning) 1438 } 1439 } 1440 1441 Text { 1442 id: prevObjText 1443 objectName: "prevTextObj" 1444 1445 height: 22 1446 color: "#ffffff" 1447 text: xi18n("Previous") 1448 renderType: Text.QtRendering 1449 anchors{ 1450 left: prevObjIcon.right 1451 leftMargin: 5 1452 verticalCenter: parent.verticalCenter 1453 } 1454 visible: true 1455 horizontalAlignment: Text.AlignLeft 1456 verticalAlignment: Text.AlignVCenter 1457 font{ 1458 pixelSize: 11 1459 bold: true 1460 } 1461 } 1462 1463 Image { 1464 id: prevObjIcon 1465 anchors.verticalCenter: parent.verticalCenter 1466 sourceSize{ 1467 height: 24 1468 width: 24 1469 } 1470 source: "previous.png" 1471 } 1472 } 1473 1474 1475 } //end of detailsView 1476 1477 Rectangle{ 1478 id: soItemEmptyMessage 1479 objectName: "soItemEmptyMessage" 1480 color: "#00060b" 1481 anchors.fill: parent 1482 Text{ 1483 anchors.fill: parent 1484 text: xi18n("No Items to display") 1485 renderType: Text.QtRendering 1486 verticalAlignment: Text.AlignVCenter 1487 horizontalAlignment: Text.AlignHCenter 1488 color: "white" 1489 font{ 1490 family: "Arial" 1491 pointSize: 20 1492 } 1493 } 1494 visible: (soListView.count > 0 || container.state == "singleItemSelected") ? false : true 1495 } 1496 1497 } //end of detailsViewContainer 1498 1499 focus:true 1500 1501 Keys.onPressed: { 1502 if (event.key == Qt.Key_Left||event.key == Qt.Key_Up) { 1503 prevObjRect.prevObjClicked(); 1504 event.accepted = true; 1505 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning) 1506 } 1507 if (event.key == Qt.Key_Right||event.key == Qt.Key_Down) { 1508 nextObjRect.nextObjClicked(); 1509 event.accepted = true; 1510 soListView.positionViewAtIndex(soListView.currentIndex, ListView.Beginning) 1511 } 1512 } 1513 1514 states: [ 1515 State { 1516 name: "back" 1517 PropertyChanges { 1518 target: listToDetailsRotation 1519 angle: 180 1520 } 1521 1522 when: skyObjView.flipped 1523 } 1524 ] 1525 1526 transitions: [ 1527 Transition { 1528 NumberAnimation { 1529 target: listToDetailsRotation 1530 property: "angle" 1531 duration: 400 1532 } 1533 } 1534 ] 1535 1536 transform: Rotation { 1537 id: listToDetailsRotation 1538 origin.x: container.width / 2 1539 axis.y: 1 1540 axis.z: 0 1541 } 1542 1543 Rectangle{ 1544 id: loadingMessage 1545 objectName: "loadingMessage" 1546 color: "#00060b" 1547 anchors.fill: parent 1548 visible: false 1549 Text{ 1550 anchors.fill: parent 1551 text: xi18n("Loading...") 1552 renderType: Text.QtRendering 1553 verticalAlignment: Text.AlignVCenter 1554 horizontalAlignment: Text.AlignHCenter 1555 color: "white" 1556 font{ 1557 family: "Arial" 1558 pointSize: 30 1559 } 1560 } 1561 states: [ 1562 State { 1563 name: "loading" 1564 PropertyChanges {target: loadingMessage; visible: true } 1565 PropertyChanges {target: skyObjView; flipped:false } 1566 } 1567 ] 1568 } 1569 } //end of skyObjView 1570 } //end of viewsContainer 1571 Rectangle{ 1572 id: helpMessage 1573 objectName: "helpMessage" 1574 color: "#00060b" 1575 anchors.fill: parent 1576 visible: false 1577 Text{ 1578 id: helpText 1579 anchors.left: helpMessage.left 1580 anchors.right: helpMessage.right 1581 anchors.margins: 10 1582 text: xi18n("Explanation of the What's Interesting Panel") 1583 renderType: Text.QtRendering 1584 horizontalAlignment: Text.AlignHCenter 1585 color: "white" 1586 font{ 1587 family: "Arial" 1588 pointSize: 15 1589 } 1590 } 1591 Text{ 1592 id: helpExplainText 1593 anchors.margins: 10 1594 anchors.top: helpText.bottom 1595 anchors.left: helpMessage.left 1596 anchors.right: helpMessage.right 1597 text: xi18n("The What's Interesting Panel is intended to allow you to explore many different interesting objects in the night sky. It includes objects visible to the naked eye as well as objects that require telescopes. It is intended to appeal to both beginners and advanced astronomers. If you click on a category or catalog, a list of objects will appear. Clicking on an object in the list will bring up the details view where you can find out more information about the object. If you have thumbnail images or wikipedia information for this object, these will be displayed as well. If not, you can download them using the download icon. If you make What's Interesting wider, the display will dynamically change to display the information more conveniently. Please see the descriptions below for details on what the buttons at the bottom do.") 1598 renderType: Text.QtRendering 1599 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1600 color: "white" 1601 font{ 1602 family: "Arial" 1603 pointSize: 11 1604 } 1605 } 1606 Image { 1607 id: helpSettingsImage 1608 anchors.top: helpExplainText.bottom 1609 source: "settingsIcon.png" 1610 width: 28 1611 height: 28 1612 } 1613 Text{ 1614 id: helpSettingsText 1615 anchors.top: helpExplainText.bottom 1616 anchors.left: helpSettingsImage.right 1617 anchors.right: helpMessage.right 1618 anchors.margins: 10 1619 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1620 text: xi18n("This button will bring up the What's Interesting Settings. It will let you configure what is displayed in What's Interesting based upon which equipment you are using and the observing conditions.") 1621 renderType: Text.QtRendering 1622 color: "white" 1623 font{ 1624 family: "Arial" 1625 pointSize: 11 1626 } 1627 } 1628 Image { 1629 id: helpInspectImage 1630 anchors.top: helpSettingsText.bottom 1631 source: "inspectIcon.png" 1632 width: 28 1633 height: 28 1634 } 1635 Text{ 1636 id: helpInspectText 1637 anchors.top: helpSettingsText.bottom 1638 anchors.left: helpInspectImage.right 1639 anchors.right: helpMessage.right 1640 anchors.margins: 10 1641 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1642 text: xi18n("This button will turn on and off the Inspector Mode. In this mode you can click on any object in the map and What's Interesting will display the information about it.") 1643 renderType: Text.QtRendering 1644 color: "white" 1645 font{ 1646 family: "Arial" 1647 pointSize: 11 1648 } 1649 } 1650 Image { 1651 id: helpReloadImage 1652 anchors.top: helpInspectText.bottom 1653 source: "reloadIcon.png" 1654 width: 28 1655 height: 28 1656 } 1657 Text{ 1658 id: helpReloadText 1659 anchors.top: helpInspectText.bottom 1660 anchors.left: helpReloadImage.right 1661 anchors.right: helpMessage.right 1662 anchors.margins: 10 1663 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1664 text: xi18n("This button will reload the current object list, update all displayed information, update any images, and update the information and images for the currently selected object.") 1665 renderType: Text.QtRendering 1666 color: "white" 1667 font{ 1668 family: "Arial" 1669 pointSize: 11 1670 } 1671 } 1672 Image { 1673 id: helpVisibleImage 1674 anchors.top: helpReloadText.bottom 1675 source: "visibleIcon.png" 1676 width: 28 1677 height: 28 1678 } 1679 Text{ 1680 id: helpVisibleText 1681 anchors.top: helpReloadText.bottom 1682 anchors.left: helpVisibleImage.right 1683 anchors.right: helpMessage.right 1684 anchors.margins: 10 1685 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1686 text: xi18n("This button will toggle whether to filter the list to display only currently visible objects in a list or to display all of the objects in the list. The visibility is determined based on the current KStars date and time, the current observing equipment, and the current sky conditions based on the What's Interesting Settings.") 1687 renderType: Text.QtRendering 1688 color: "white" 1689 font{ 1690 family: "Arial" 1691 pointSize: 11 1692 } 1693 } 1694 Image { 1695 id: helpFavoriteImage 1696 anchors.top: helpVisibleText.bottom 1697 source: "favoriteIcon.png" 1698 width: 28 1699 height: 28 1700 } 1701 Text{ 1702 id: helpFavoriteText 1703 anchors.top: helpVisibleText.bottom 1704 anchors.left: helpFavoriteImage.right 1705 anchors.right: helpMessage.right 1706 anchors.margins: 10 1707 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1708 text: xi18n("This button will toggle whether to filter the list to display only 'interesting' objects or to display any of the objects in the list. This setting only applies to the Galaxies, Nebulas, and Clusters lists. The objects are considered 'interesting' if they appear on the KStars 'interesting' list.") 1709 renderType: Text.QtRendering 1710 color: "white" 1711 font{ 1712 family: "Arial" 1713 pointSize: 11 1714 } 1715 } 1716 Image { 1717 id: helpDownloadImage 1718 anchors.top: helpFavoriteText.bottom 1719 source: "downloadIcon.png" 1720 width: 28 1721 height: 28 1722 } 1723 Text{ 1724 id: helpDownloadText 1725 anchors.top: helpFavoriteText.bottom 1726 anchors.left: helpDownloadImage.right 1727 anchors.right: helpMessage.right 1728 anchors.margins: 10 1729 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 1730 text: xi18n("This button will attempt to download information and pictures about the object(s) from Wikipedia. You can select whether to download the information about just one object, all of the objects in a list, or only the objects in a list for which no data was downloaded yet. Please note: If the list is currently filtered for visible objects or 'interesting' objects, only the filtered objects will be downloaded. If you actually want all the objects in the list, turn off the filters.") 1731 renderType: Text.QtRendering 1732 color: "white" 1733 font{ 1734 family: "Arial" 1735 pointSize: 11 1736 } 1737 } 1738 states: [ 1739 State { 1740 name: "helpDisplayed" 1741 PropertyChanges {target: helpMessage; visible: true } 1742 PropertyChanges {target: backButton; x: container.width - 105} 1743 } 1744 ] 1745 } 1746 } //end of base 1747 1748 Rectangle { 1749 id: backButton 1750 x: container.width + 10 1751 y: container.height - 50 1752 width: leftArrow.width + goBackText.width + 18 1753 height: 49 1754 color: "#00000000" 1755 radius: 5 1756 1757 Rectangle { 1758 id: goBackForeground 1759 anchors.fill: parent 1760 radius: 5 1761 opacity: 0.0 1762 } 1763 1764 Text { 1765 id: goBackText 1766 y: 12 1767 color: "#f7e808" 1768 text: xi18n("Back") 1769 renderType: Text.QtRendering 1770 anchors { 1771 left: leftArrow.right 1772 leftMargin: 7 1773 verticalCenterOffset: 0 1774 verticalCenter: leftArrow.verticalCenter 1775 } 1776 font{ 1777 family: "Cantarell" 1778 pointSize: 13 1779 } 1780 verticalAlignment: Text.AlignVCenter 1781 horizontalAlignment: Text.AlignHCenter 1782 } 1783 1784 Image { 1785 id: leftArrow 1786 y: 9 1787 anchors{ 1788 left: parent.left 1789 leftMargin: 4 1790 verticalCenterOffset: 0 1791 verticalCenter: parent.verticalCenter 1792 } 1793 source: "leftArrow.png" 1794 } 1795 1796 MouseArea { 1797 id: backButtonMouseArea 1798 anchors.fill: backButton 1799 hoverEnabled: true 1800 onEntered: goBackForeground.opacity = buttonOpacity 1801 onExited: goBackForeground.opacity = 0.0 1802 onClicked: { 1803 if(helpMessage.state == "helpDisplayed"){ 1804 helpMessage.state = "" 1805 } else if (container.state == "objectFromListSelected") { 1806 if (!skyObjView.flipped||container.width>=900) { 1807 container.state = "base" 1808 catTitle.text = "" 1809 } else if (skyObjView.flipped) { 1810 skyObjView.flipped = false 1811 } 1812 } else if (container.state == "singleItemSelected") { 1813 container.state = "base" 1814 catTitle.text = "" 1815 if (container.width>=900) { 1816 skyObjView.flipped = true 1817 } else{ 1818 skyObjView.flipped = false 1819 } 1820 } 1821 } 1822 } 1823 } 1824 1825 Image { 1826 id: settingsIcon 1827 objectName: "settingsIconObj" 1828 x: 10 1829 y: container.height - 50 1830 width: 28 1831 height: 28 1832 anchors{ 1833 verticalCenterOffset: 0 1834 verticalCenter: backButton.verticalCenter 1835 } 1836 sourceSize{ 1837 height: 40 1838 width: 40 1839 } 1840 smooth: true 1841 fillMode: Image.Stretch 1842 source: "settingsIcon.png" 1843 1844 signal settingsIconClicked 1845 1846 MouseArea { 1847 id: settingsMouseArea 1848 anchors.fill: parent 1849 hoverEnabled: true 1850 onEntered: settingsForeground.opacity = buttonOpacity 1851 onExited: settingsForeground.opacity = 0.0 1852 onClicked: settingsIcon.settingsIconClicked() 1853 } 1854 1855 Rectangle { 1856 id: settingsForeground 1857 anchors.fill: parent 1858 opacity: 0.0 1859 radius: 5 1860 } 1861 } 1862 1863 Image { 1864 id: inspectIcon 1865 objectName: "inspectIconObj" 1866 state: "checked" 1867 x: 50 1868 y: container.height - 50 1869 width: 28 1870 height: 28 1871 anchors{ 1872 verticalCenterOffset: 0 1873 verticalCenter: backButton.verticalCenter 1874 } 1875 sourceSize{ 1876 height: 40 1877 width: 40 1878 } 1879 smooth: true 1880 fillMode: Image.Stretch 1881 source: "inspectIcon.png" 1882 1883 signal inspectIconClicked(bool inspect) 1884 1885 MouseArea { 1886 id: inspectMouseArea 1887 anchors.fill: parent 1888 hoverEnabled: true 1889 onEntered: inspectForeground.opacity = buttonOpacity 1890 onExited: inspectForeground.opacity = 0.0 1891 onClicked: { 1892 inspectIcon.inspectIconClicked(inspectIcon.state == "checked") 1893 inspectIcon.state = (inspectIcon.state == "checked") ? "" : "checked" 1894 } 1895 } 1896 1897 Rectangle { 1898 id: inspectForeground 1899 radius: 5 1900 opacity: 0 1901 anchors.fill: parent 1902 } 1903 states: [ 1904 State { 1905 name: "checked" 1906 PropertyChanges {target: inspectIcon; opacity: 0.5} 1907 } 1908 ] 1909 } 1910 1911 Image { 1912 id: reloadIcon 1913 objectName: "reloadIconObj" 1914 x: 90 1915 y: container.height - 50 1916 width: 28 1917 height: 28 1918 anchors{ 1919 verticalCenterOffset: 0 1920 verticalCenter: backButton.verticalCenter 1921 } 1922 sourceSize{ 1923 height: 40 1924 width: 40 1925 } 1926 smooth: true 1927 fillMode: Image.Stretch 1928 source: "reloadIcon.png" 1929 1930 signal reloadIconClicked 1931 1932 MouseArea { 1933 id: reloadMouseArea 1934 anchors.fill: parent 1935 hoverEnabled: true 1936 onEntered: reloadForeground.opacity = buttonOpacity 1937 onExited: reloadForeground.opacity = 0.0 1938 onClicked: { 1939 reloadIcon.reloadIconClicked(); 1940 } 1941 } 1942 1943 Rectangle { 1944 id: reloadForeground 1945 radius: 5 1946 opacity: 0 1947 anchors.fill: parent 1948 } 1949 states: [ 1950 State { 1951 name: "invisible" 1952 when: (container.state != "objectFromListSelected" && container.state != "singleItemSelected") 1953 PropertyChanges {target: reloadMouseArea; enabled: false} 1954 PropertyChanges {target: reloadIcon; opacity: 0} 1955 } 1956 ] 1957 1958 } 1959 1960 Image { 1961 id: visibleIcon 1962 objectName: "visibleIconObj" 1963 state: "checked" 1964 x: 130 1965 y: container.height - 50 1966 width: 28 1967 height: 28 1968 anchors{ 1969 verticalCenterOffset: 0 1970 verticalCenter: backButton.verticalCenter 1971 } 1972 sourceSize{ 1973 height: 40 1974 width: 40 1975 } 1976 smooth: true 1977 fillMode: Image.Stretch 1978 source: "visibleIcon.png" 1979 1980 signal visibleIconClicked(bool visible) 1981 1982 MouseArea { 1983 id: visibleMouseArea 1984 anchors.fill: parent 1985 hoverEnabled: true 1986 onEntered: visibleForeground.opacity = buttonOpacity 1987 onExited: visibleForeground.opacity = 0.0 1988 onClicked: { 1989 visibleIcon.visibleIconClicked(visibleIcon.state == "unchecked") 1990 visibleIcon.state = (visibleIcon.state == "unchecked") ? "" : "unchecked" 1991 } 1992 } 1993 1994 Rectangle { 1995 id: visibleForeground 1996 radius: 5 1997 opacity: 0 1998 anchors.fill: parent 1999 } 2000 states: [ 2001 State { 2002 name: "invisible" 2003 when: container.state != "objectFromListSelected" 2004 PropertyChanges {target: visibleMouseArea; enabled: false} 2005 PropertyChanges {target: visibleIcon; opacity: 0} 2006 }, 2007 State { 2008 name: "unchecked" 2009 PropertyChanges {target: visibleIcon; opacity: 0.5} 2010 } 2011 ] 2012 } 2013 2014 Image { 2015 id: favoriteIcon 2016 objectName: "favoriteIconObj" 2017 state: "checked" 2018 x: 170 2019 y: container.height - 50 2020 width: 28 2021 height: 28 2022 anchors{ 2023 verticalCenterOffset: 0 2024 verticalCenter: backButton.verticalCenter 2025 } 2026 sourceSize{ 2027 height: 40 2028 width: 40 2029 } 2030 smooth: true 2031 fillMode: Image.Stretch 2032 source: "favoriteIcon.png" 2033 2034 signal favoriteIconClicked(bool favorite) 2035 2036 MouseArea { 2037 id: favoriteMouseArea 2038 anchors.fill: parent 2039 hoverEnabled: true 2040 onEntered: favoriteForeground.opacity = buttonOpacity 2041 onExited: favoriteForeground.opacity = 0.0 2042 onClicked: { 2043 favoriteIcon.favoriteIconClicked(favoriteIcon.state == "unchecked") 2044 favoriteIcon.state = (favoriteIcon.state == "unchecked") ? "" : "unchecked" 2045 } 2046 } 2047 /** 2048 ToolTip{ 2049 id: toolTip 2050 text: "Toggles the display of *interesting* objects vs. all objects. \n(For Galaxies, Nebulas, and Clusters Only!)" 2051 } 2052 **/ 2053 2054 Rectangle { 2055 id: favoriteForeground 2056 radius: 5 2057 opacity: 0 2058 anchors.fill: parent 2059 } 2060 states: [ 2061 State { 2062 name: "invisible" 2063 when: container.state != "objectFromListSelected" 2064 PropertyChanges {target: favoriteMouseArea; enabled: false} 2065 PropertyChanges {target: favoriteIcon; opacity: 0} 2066 }, 2067 State { 2068 name: "unchecked" 2069 PropertyChanges {target: favoriteIcon; opacity: 0.5} 2070 } 2071 ] 2072 } 2073 2074 Image { 2075 id: downloadIcon 2076 objectName: "downloadIconObj" 2077 x: 210 2078 y: container.height - 50 2079 width: 28 2080 height: 28 2081 anchors{ 2082 verticalCenterOffset: 0 2083 verticalCenter: backButton.verticalCenter 2084 } 2085 sourceSize{ 2086 height: 40 2087 width: 40 2088 } 2089 smooth: true 2090 fillMode: Image.Stretch 2091 source: "downloadIcon.png" 2092 2093 signal downloadIconClicked 2094 2095 MouseArea { 2096 id: downloadMouseArea 2097 anchors.fill: parent 2098 hoverEnabled: true 2099 onEntered: downloadForeground.opacity = buttonOpacity 2100 onExited: downloadForeground.opacity = 0.0 2101 onClicked: downloadIcon.downloadIconClicked() 2102 } 2103 2104 Rectangle { 2105 id: downloadForeground 2106 radius: 5 2107 opacity: 0 2108 anchors.fill: parent 2109 } 2110 states: [ 2111 State { 2112 name: "invisible" 2113 when: container.state == "base" || container.state == "" 2114 PropertyChanges {target: downloadMouseArea; enabled: false} 2115 PropertyChanges {target: downloadIcon; opacity: 0} 2116 } 2117 ] 2118 } 2119 2120 Image { 2121 id: helpIcon 2122 x: 250 2123 y: container.height - 50 2124 width: 28 2125 height: 28 2126 anchors{ 2127 verticalCenterOffset: 0 2128 verticalCenter: backButton.verticalCenter 2129 } 2130 sourceSize{ 2131 height: 40 2132 width: 40 2133 } 2134 smooth: true 2135 fillMode: Image.Stretch 2136 source: "helpIcon.png" 2137 2138 MouseArea { 2139 id: helpMouseArea 2140 anchors.fill: parent 2141 hoverEnabled: true 2142 onEntered: helpForeground.opacity = buttonOpacity 2143 onExited: helpForeground.opacity = 0.0 2144 onClicked: (helpMessage.state == "helpDisplayed") ? helpMessage.state = "" : helpMessage.state = "helpDisplayed" 2145 } 2146 2147 Rectangle { 2148 id: helpForeground 2149 radius: 5 2150 opacity: 0 2151 anchors.fill: parent 2152 } 2153 } 2154 2155 Rectangle { 2156 id: nightVision 2157 objectName: "nightVision" 2158 opacity: 0 2159 color: "#510000" 2160 anchors.fill: parent 2161 2162 states: [ 2163 State { 2164 name: "active" 2165 PropertyChanges {target: nightVision; opacity: 0.2} 2166 PropertyChanges {target: tabbedView; style: tabbedView.nightTabs} 2167 PropertyChanges {target: title; color: "red"} 2168 PropertyChanges {target: catTitle; color: "red"} 2169 PropertyChanges {target: nakedEyeText; color: "red"} 2170 PropertyChanges {target: dsoText; color: "red"} 2171 PropertyChanges {target: catalogText; color: "red"} 2172 PropertyChanges {target: soListEmptyMessage; color: "red"} 2173 PropertyChanges {target: soItemEmptyMessage; color: "red"} 2174 PropertyChanges {target: scrollbar; color: "red"} 2175 PropertyChanges {target: prevObjText; color: "red"} 2176 PropertyChanges {target: nextObjText; color: "red"} 2177 PropertyChanges {target: detailsText; color: "red"} 2178 PropertyChanges {target: soname; color: "red"} 2179 PropertyChanges {target: posText; color: "red"} 2180 PropertyChanges {target: detailsButton; color: "red"} 2181 PropertyChanges {target: centerButton; color: "red"} 2182 PropertyChanges {target: slewTelescopeButton; color: "red"} 2183 PropertyChanges {target: goBackText; color: "red"} 2184 } 2185 ] 2186 2187 } 2188 2189 states: [ 2190 State { 2191 name: "base" 2192 2193 }, 2194 State { 2195 name: "singleItemSelected" 2196 2197 PropertyChanges { 2198 target: viewsRow 2199 x: -(2 * categoryView.width) 2200 y: 0 2201 anchors{ 2202 topMargin: 0 2203 bottomMargin: 0 2204 } 2205 } 2206 2207 PropertyChanges{target:skyObjView; flipped: true} 2208 2209 PropertyChanges { 2210 target: backButton 2211 x: container.width - 105 2212 } 2213 }, 2214 State { 2215 name: "objectFromListSelected" 2216 2217 PropertyChanges { 2218 target: viewsRow 2219 x: -(2 * categoryView.width) 2220 y: 0 2221 anchors{ 2222 topMargin: 0 2223 bottomMargin: 0 2224 } 2225 } 2226 //PropertyChanges {target: detailsView; focus: true} 2227 PropertyChanges { 2228 target: backButton 2229 x: container.width - 105 2230 } 2231 } 2232 ] 2233 2234 transitions: [ 2235 2236 Transition { 2237 from: "*" 2238 to: "objectFromListSelected" 2239 NumberAnimation { 2240 target: viewsRow 2241 property: "x" 2242 duration: 250 2243 easing.type: Easing.InOutQuad 2244 } 2245 NumberAnimation { 2246 target: backButton 2247 property: "x" 2248 duration: 250 2249 easing.type: Easing.InOutQuad 2250 } 2251 }, 2252 Transition { 2253 from: "objectFromListSelected" 2254 to: "base" 2255 NumberAnimation { 2256 target: viewsRow 2257 property: "x" 2258 duration: 250 2259 easing.type: Easing.InOutQuad 2260 } 2261 NumberAnimation { 2262 target: backButton 2263 property: "x" 2264 duration: 250 2265 easing.type: Easing.InOutQuad 2266 } 2267 } 2268 ] 2269 }