1 /*
2     SPDX-FileCopyrightText: 2010 Ivan Cukic <ivan.cukic(at)kde.org>
3     SPDX-FileCopyrightText: 2013 Martin Klapetek <mklapetek(at)kde.org>
4 
5     SPDX-License-Identifier: GPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include <QBasicTimer>
11 #include <QGuiApplication>
12 #include <QObject>
13 
14 class SplashWindow;
15 
16 class SplashApp : public QGuiApplication
17 {
18     Q_OBJECT
19     Q_CLASSINFO("D-Bus Interface", "org.kde.KSplash")
20 
21 public:
22     explicit SplashApp(int &argc, char **argv);
23     ~SplashApp() override;
24 
25 public Q_SLOTS:
26     Q_SCRIPTABLE void setStage(const QString &messgae);
27 
28 protected:
29     void timerEvent(QTimerEvent *event) override;
30     void setStage(int stage);
31 
32 private:
33     void setupWaylandIntegration();
34     int m_stage;
35     QList<SplashWindow *> m_windows;
36     bool m_testing;
37     bool m_window;
38     QStringList m_stages;
39     QBasicTimer m_timer;
40     QString m_theme;
41 
42 private Q_SLOTS:
43     void adoptScreen(QScreen *);
44 };
45