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
13#include "ui_wdgsplash.h"
14
15class QPixmap;
16class QSvgWidget;
17
18#include "kritaui_export.h"
19
20class KRITAUI_EXPORT KisSplashScreen : public QWidget, public Ui::WdgSplash
21{
22 Q_OBJECT
23public:
24 struct Source {
25 QString resourcePath;
26 QString artistCredit;
27 };
28
29 explicit KisSplashScreen(bool themed = false, QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
30
31 void repaint();
32
33 void show();
34 void displayLinks(bool show);
35 void displayRecentFiles(bool show);
36
37 void setLoadingText(QString text);
38
39 static Source getImageSource();
40
41private Q_SLOTS:
42
43 void toggleShowAtStartup(bool toggle);
44 void linkClicked(const QString &link);
45
46protected:
47 void resizeEvent(QResizeEvent *event) override;
48
49private:
50 void updateText();
51 QString colorString() const;
52 void updateSplashImage();
53
54private:
55
56 QTimer m_timer;
58 bool m_displayLinks { false };
59 QSvgWidget *m_brandingSvg;
60 QSvgWidget *m_bannerSvg;
64};
65
66#endif // KIS_SPLASH_SCREEN_H
QLabel * m_loadingTextLabel
QSvgWidget * m_brandingSvg
QSvgWidget * m_bannerSvg