MCPcopy Create free account
hub / github.com/KDAB/GammaRay / showSplashScreen

Function showSplashScreen

ui/splashscreen.cpp:25–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24namespace GammaRay {
25void showSplashScreen()
26{
27 if (!splash) {
28 splash = new QSplashScreen;
29 QPixmap pixmap = UIResources::themedPixmap(QStringLiteral("splashscreen.png"), splash);
30 splash->setPixmap(pixmap);
31 }
32
33 const QWidget *window = qApp->activeWindow();
34
35 if (window && window != splash) {
36 splash->ensurePolished();
37
38 const QRect windowRect = splash->screen()->availableGeometry();
39 QRect splashRect = QRect(QPoint(), splash->size());
40
41 splashRect.moveCenter(windowRect.center());
42 splash->move(splashRect.topLeft());
43 }
44
45 splash->show();
46}
47
48void hideSplashScreen()
49{

Callers 2

showSplashScreenMethod · 0.85

Calls 4

QRectClass · 0.85
QPointClass · 0.85
centerMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected