Kstars

Splash.qml
1 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 
4 import QtQuick 2.6
5 import QtQuick.Window 2.2
6 import "../constants"
7 
8 //Rectangle - to allow z-index ordering (for some reason it doesn't work with plain Item)
9 Rectangle {
10  id: splash
11  signal timeout
12  state: "Inivisble"
13 
14  Image {
15  id: splashBG
16  source: "../images/splash_bg.jpeg"
17  anchors {
18  fill: parent
19  }
20 
21  fillMode: Image.PreserveAspectCrop
22 
23  width: sourceSize.width/Num.pixelRatio
24  height: sourceSize.height/Num.pixelRatio
25 
26  Image {
27  id: kdeLogo
28  source: "../images/kde-logo.png"
29  anchors {
30  right: parent.right
31  top: parent.top
32  margins: 15
33  }
34  }
35 
36  Image {
37  id: splashLogo
38  source: "../images/splash.png"
39  anchors.centerIn: parent
40  }
41 
42  Text {
43  id: progress
44  color: "#999"
45 
46  anchors {
47  bottom: parent.bottom
48  horizontalCenter: parent.horizontalCenter
49  margins: 5
50  }
51  }
52  }
53 
54  Connections {
55  target: KStarsData
56  onProgressText: {
57  progress.text = text
58  }
59  }
60 
61  Connections {
62  target: KStarsLite
63  onShowSplash: {
64  splash.state = "Visible"
65  }
66  onDataLoadFinished: {
67  splash.timeout()
68  splash.state = "Invisible"
69  }
70  }
71 
72  states: [
73  State{
74  name: "Visible"
75  PropertyChanges{target: splash; opacity: 1.0}
76  PropertyChanges{target: splash; visible: true}
77  },
78  State{
79  name:"Invisible"
80  PropertyChanges{target: splash; opacity: 0.0}
81  PropertyChanges{target: splash; visible: false}
82  }
83  ]
84 
85  transitions: [
86  Transition {
87  from: "Visible"
88  to: "Invisible"
89 
90  SequentialAnimation{
91  NumberAnimation {
92  target: splash
93  property: "opacity"
94  duration: 800
95  easing.type: Easing.InOutQuad
96  }
97  NumberAnimation {
98  target: splash
99  property: "visible"
100  duration: 0
101  }
102  }
103  }
104  ]
105 }
106 
QTextStream & right(QTextStream &stream)
This class loads QML files and connects SkyMapLite and KStarsData Unlike KStars class it is not a mai...
Definition: kstarslite.h:46
QTextStream & right(QTextStream &s)
[1]
Definition: dashedshader.h:47
QString name(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:02:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.