File indexing completed on 2024-05-12 16:01:42
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Boudewijn Rempt <boud@valdyas.org> 0003 * SPDX-FileCopyrightText: 2021 Alvin Wong <alvin@alvinhc.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 #ifndef KIS_SPLASH_SCREEN_H 0008 #define KIS_SPLASH_SCREEN_H 0009 0010 #include <QWidget> 0011 #include <QTimer> 0012 0013 #include "ui_wdgsplash.h" 0014 0015 class QPixmap; 0016 class QSvgWidget; 0017 0018 #include "kritaui_export.h" 0019 0020 class KRITAUI_EXPORT KisSplashScreen : public QWidget, public Ui::WdgSplash 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit KisSplashScreen(bool themed = false, QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); 0025 0026 void repaint(); 0027 0028 void show(); 0029 void displayLinks(bool show); 0030 void displayRecentFiles(bool show); 0031 0032 void setLoadingText(QString text); 0033 0034 private Q_SLOTS: 0035 0036 void toggleShowAtStartup(bool toggle); 0037 void linkClicked(const QString &link); 0038 0039 protected: 0040 void resizeEvent(QResizeEvent *event) override; 0041 0042 private: 0043 void updateText(); 0044 QString colorString() const; 0045 void updateSplashImage(); 0046 0047 private: 0048 0049 QTimer m_timer; 0050 bool m_themed; 0051 bool m_displayLinks { false }; 0052 QSvgWidget *m_brandingSvg; 0053 QSvgWidget *m_bannerSvg; 0054 QLabel *m_loadingTextLabel; 0055 QLabel *m_artCreditsLabel; 0056 QString m_versionHtml; 0057 }; 0058 0059 #endif // KIS_SPLASH_SCREEN_H