Changeset View
Changeset View
Standalone View
Standalone View
src/k3bsplash.cpp
Show All 18 Lines | |||||
19 | #include <KAboutData> | 19 | #include <KAboutData> | ||
20 | 20 | | |||
21 | #include <QEvent> | 21 | #include <QEvent> | ||
22 | #include <QString> | 22 | #include <QString> | ||
23 | #include <QFontMetrics> | 23 | #include <QFontMetrics> | ||
24 | #include <QPainter> | 24 | #include <QPainter> | ||
25 | #include <QPixmap> | 25 | #include <QPixmap> | ||
26 | #include <QApplication> | 26 | #include <QApplication> | ||
27 | #include <QDesktopWidget> | | |||
28 | #include <QLabel> | 27 | #include <QLabel> | ||
28 | #include <QScreen> | ||||
29 | #include <QVBoxLayout> | 29 | #include <QVBoxLayout> | ||
30 | 30 | | |||
31 | K3b::Splash::Splash( QWidget* parent ) | 31 | K3b::Splash::Splash( QWidget* parent ) | ||
32 | : QWidget( parent) | 32 | : QWidget( parent) | ||
33 | { | 33 | { | ||
34 | setAttribute( Qt::WA_DeleteOnClose ); | 34 | setAttribute( Qt::WA_DeleteOnClose ); | ||
35 | setWindowFlags(Qt::FramelessWindowHint| | 35 | setWindowFlags(Qt::FramelessWindowHint| | ||
36 | Qt::SplashScreen| | 36 | Qt::SplashScreen| | ||
Show All 23 Lines | |||||
60 | layout->setSpacing( 0 ); | 60 | layout->setSpacing( 0 ); | ||
61 | layout->addWidget( copyrightLabel ); | 61 | layout->addWidget( copyrightLabel ); | ||
62 | layout->addWidget( picLabel ); | 62 | layout->addWidget( picLabel ); | ||
63 | layout->addWidget( m_infoBox ); | 63 | layout->addWidget( m_infoBox ); | ||
64 | 64 | | |||
65 | // Set geometry, with support for Xinerama systems | 65 | // Set geometry, with support for Xinerama systems | ||
66 | QRect r; | 66 | QRect r; | ||
67 | r.setSize(sizeHint()); | 67 | r.setSize(sizeHint()); | ||
68 | int ps = QApplication::desktop()->primaryScreen(); | 68 | const QScreen *ps = QGuiApplication::primaryScreen(); | ||
69 | r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() ); | 69 | r.moveCenter( ps->geometry().center() ); | ||
70 | setGeometry(r); | 70 | setGeometry(r); | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | 73 | | |||
74 | K3b::Splash::~Splash() | 74 | K3b::Splash::~Splash() | ||
75 | { | 75 | { | ||
76 | } | 76 | } | ||
77 | 77 | | |||
Show All 28 Lines |