#include <kis_splash_screen.h>
Definition at line 20 of file kis_splash_screen.h.
◆ KisSplashScreen()
| KisSplashScreen::KisSplashScreen |
( |
int | height, |
|
|
QWidget * | parent = 0, |
|
|
Qt::WindowFlags | f = Qt::WindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint) ) |
|
explicit |
Definition at line 66 of file kis_splash_screen.cpp.
67 : QWidget(parent, f)
69{
70 setWindowTitle(i18n("Krita"));
71#ifndef Q_OS_MACOS
73#endif
74
75 setLayout(new QVBoxLayout());
76 layout()->setContentsMargins(QMargins());
80
83 m_loadingTextLabel->setStyleSheet(QStringLiteral(
"QLabel { color: #fff; background-color: transparent; }"));
86
90
93 m_artCreditsLabel->setStyleSheet(QStringLiteral(
"QLabel { color: #fff; background-color: transparent; font: 10pt; }"));
96
99
100 connect(&
m_timer, SIGNAL(timeout()), SLOT(raise()));
101
104}
void updateSplashImage(const int height)
void setLoadingText(QString text)
QLabel * m_artCreditsLabel
QLabel * m_loadingTextLabel
QSvgWidget * m_brandingSvg
static void addDropShadow(QWidget *widget)
QIcon loadIcon(const QString &name)
References addDropShadow(), KisIconUtils::loadIcon(), m_artCreditsLabel, m_bannerSvg, m_brandingSvg, m_lblSplash, m_loadingTextLabel, m_timer, setLoadingText(), and updateSplashImage().
◆ canChooseSplashScreen()
| bool KisSplashScreen::canChooseSplashScreen |
( |
| ) |
|
|
static |
◆ defaultSplashResourcePath()
| QString KisSplashScreen::defaultSplashResourcePath |
( |
| ) |
|
|
staticprivate |
Definition at line 214 of file kis_splash_screen.cpp.
215{
216
217
218
219
220
221#ifdef Q_OS_ANDROID
222 return QStringLiteral(":/splash/hd.jpg");
223#else
224 return QStringLiteral(":/splash/0.png");
225#endif
226}
◆ getAvailableSource()
Definition at line 161 of file kis_splash_screen.cpp.
162{
167 }
168 }
169 return sources[0];
170}
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
static QVector< Source > getSources()
References getSources(), and source().
◆ getCurrentSource()
◆ getSources()
Definition at line 188 of file kis_splash_screen.cpp.
189{
191 return {
192
193 {
194 QString(),
195 i18nc("Splash screen option showing Kiki", "Mascot"),
197 i18nc("Splash artist name", "Tyson Tan"),
198 true,
199 true,
200 },
201 {
202 QStringLiteral("corpo1"),
203 i18nc("Splash screen option without Kiki", "Plain"),
204 QStringLiteral(":/splash/corpo1.jpg"),
205
206
207 QString(),
208 canChoose,
209 false,
210 },
211 };
212}
static QString defaultSplashResourcePath()
static bool canChooseSplashScreen()
References canChooseSplashScreen(), and defaultSplashResourcePath().
◆ repaint()
| void KisSplashScreen::repaint |
( |
| ) |
|
◆ setLoadingText()
| void KisSplashScreen::setLoadingText |
( |
QString | text | ) |
|
Definition at line 147 of file kis_splash_screen.cpp.
148{
149 int larger = 12;
150 int notAsLarge = larger - 1;
151 QString htmlText = QStringLiteral("<span style='font: %3pt;'><span style='font: bold %4pt;'>%1</span><br><i>%2</i></span>")
152 .arg(
m_versionHtml, text.toHtmlEscaped(), QString::number(notAsLarge), QString::number(larger));
154}
References m_loadingTextLabel, and m_versionHtml.
◆ show()
| void KisSplashScreen::show |
( |
| ) |
|
Definition at line 234 of file kis_splash_screen.cpp.
235{
236 if (!this->parentWidget()) {
237 this->winId();
238 QWindow *windowHandle = this->windowHandle();
239 QScreen *screen = windowHandle ? windowHandle->screen() : nullptr;
240 if (windowHandle && !screen) {
241
242
243
244
245
246
247 windowHandle->setScreen(QApplication::primaryScreen());
248 }
249 if (!screen) {
250 screen = QApplication::primaryScreen();
251 }
252 QRect
r(QPoint(),
size());
253 move(screen->availableGeometry().center() -
r.center());
254 }
255 if (isVisible()) {
257 }
260 QWidget::show();
261}
int size(const Forest< T > &forest)
References m_timer, and repaint().
◆ updateSplashImage()
| void KisSplashScreen::updateSplashImage |
( |
const int | height | ) |
|
|
private |
◆ m_artCreditsLabel
| QLabel* KisSplashScreen::m_artCreditsLabel |
|
private |
◆ m_bannerSvg
| QSvgWidget* KisSplashScreen::m_bannerSvg |
|
private |
◆ m_brandingSvg
| QSvgWidget* KisSplashScreen::m_brandingSvg |
|
private |
◆ m_displayLinks
| bool KisSplashScreen::m_displayLinks { false } |
|
private |
◆ m_lblSplash
| QLabel* KisSplashScreen::m_lblSplash |
|
private |
◆ m_loadingTextLabel
| QLabel* KisSplashScreen::m_loadingTextLabel |
|
private |
◆ m_timer
| QTimer KisSplashScreen::m_timer |
|
private |
◆ m_versionHtml
| QString KisSplashScreen::m_versionHtml |
|
private |
The documentation for this class was generated from the following files: