Warning, /education/kstars/kstars/kstarslite/qml/modules/Splash.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 2.6 0005 import QtQuick.Window 2.2 0006 import "../constants" 0007 0008 //Rectangle - to allow z-index ordering (for some reason it doesn't work with plain Item) 0009 Rectangle { 0010 id: splash 0011 signal timeout 0012 state: "Inivisble" 0013 0014 Image { 0015 id: splashBG 0016 source: "../images/splash_bg.jpeg" 0017 anchors { 0018 fill: parent 0019 } 0020 0021 fillMode: Image.PreserveAspectCrop 0022 0023 width: sourceSize.width/Num.pixelRatio 0024 height: sourceSize.height/Num.pixelRatio 0025 0026 Image { 0027 id: kdeLogo 0028 source: "../images/kde-logo.png" 0029 anchors { 0030 right: parent.right 0031 top: parent.top 0032 margins: 15 0033 } 0034 } 0035 0036 Image { 0037 id: splashLogo 0038 source: "../images/splash.png" 0039 anchors.centerIn: parent 0040 } 0041 0042 Text { 0043 id: progress 0044 color: "#999" 0045 0046 anchors { 0047 bottom: parent.bottom 0048 horizontalCenter: parent.horizontalCenter 0049 margins: 5 0050 } 0051 } 0052 } 0053 0054 Connections { 0055 target: KStarsData 0056 onProgressText: { 0057 progress.text = text 0058 } 0059 } 0060 0061 Connections { 0062 target: KStarsLite 0063 onShowSplash: { 0064 splash.state = "Visible" 0065 } 0066 onDataLoadFinished: { 0067 splash.timeout() 0068 splash.state = "Invisible" 0069 } 0070 } 0071 0072 states: [ 0073 State{ 0074 name: "Visible" 0075 PropertyChanges{target: splash; opacity: 1.0} 0076 PropertyChanges{target: splash; visible: true} 0077 }, 0078 State{ 0079 name:"Invisible" 0080 PropertyChanges{target: splash; opacity: 0.0} 0081 PropertyChanges{target: splash; visible: false} 0082 } 0083 ] 0084 0085 transitions: [ 0086 Transition { 0087 from: "Visible" 0088 to: "Invisible" 0089 0090 SequentialAnimation{ 0091 NumberAnimation { 0092 target: splash 0093 property: "opacity" 0094 duration: 800 0095 easing.type: Easing.InOutQuad 0096 } 0097 NumberAnimation { 0098 target: splash 0099 property: "visible" 0100 duration: 0 0101 } 0102 } 0103 } 0104 ] 0105 } 0106