Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_splash_screen.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Boudewijn Rempt <boud@valdyas.org>
3 * SPDX-FileCopyrightText: 2021 Alvin Wong <alvin@alvinhc.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KIS_SPLASH_SCREEN_H
8#define KIS_SPLASH_SCREEN_H
9
10#include <QWidget>
11#include <QTimer>
12#include <QVector>
13
14class QPixmap;
15class QSvgWidget;
16class QLabel;
17
18#include "kritaui_export.h"
19
20class KRITAUI_EXPORT KisSplashScreen : public QWidget
21{
22 Q_OBJECT
23public:
24 struct Source {
25 QString key;
26 QString title;
27 QString resourcePath;
28 QString artistName;
31
32 QString description() const;
33 QString artistCredit() const;
34 };
35
36 explicit KisSplashScreen(int height, QWidget *parent = 0,
37 Qt::WindowFlags f = Qt::WindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint));
38
39 void repaint();
40
41 void show();
42
43 void setLoadingText(QString text);
44
45 static Source getCurrentSource();
46 static Source getAvailableSource(const QString &key);
47 static bool canChooseSplashScreen();
48 static QVector<Source> getSources();
49
50private:
51 void updateSplashImage(const int height);
52
53 static QString defaultSplashResourcePath();
54
55 QTimer m_timer;
56 bool m_displayLinks { false };
57 QLabel* m_lblSplash;
58 QSvgWidget *m_brandingSvg;
59 QSvgWidget *m_bannerSvg;
63};
64
65#endif // KIS_SPLASH_SCREEN_H
QLabel * m_loadingTextLabel
QSvgWidget * m_brandingSvg
QSvgWidget * m_bannerSvg