Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
straks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
straks
straks
Commits
cd490f94
Commit
cd490f94
authored
Feb 05, 2018
by
ekam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change splash from QtSplashScreen to QtWidget
parent
3c61b24a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
splashscreen.cpp
src/qt/splashscreen.cpp
+12
-8
splashscreen.h
src/qt/splashscreen.h
+2
-2
straks.cpp
src/qt/straks.cpp
+2
-1
No files found.
src/qt/splashscreen.cpp
View file @
cd490f94
...
...
@@ -26,10 +26,10 @@
#include <QPainter>
#include <QRadialGradient>
SplashScreen
::
SplashScreen
(
Qt
::
WindowFlags
f
,
const
QPixmap
&
pixmap
)
:
Q
SplashScreen
(
pixmap
,
f
)
SplashScreen
::
SplashScreen
(
Qt
::
WindowFlags
f
)
:
Q
Widget
(
0
,
f
),
curAlignment
(
0
)
{
setAutoFillBackground
(
true
);
//
setAutoFillBackground(true);
// set reference point, paddings
int
paddingLeft
=
14
;
...
...
@@ -49,11 +49,10 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const QPixmap &pixmap) :
QString
font
=
"Arial"
;
// load the bitmap for writing some text over it
QPixmap
newPixmap
;
newPixmap
=
QPixmap
(
":/images/splash"
);
// QPixmap newPixmap;
pixmap
=
QPixmap
(
":/images/splash"
);
QPainter
pixPaint
(
&
newP
ixmap
);
QPainter
pixPaint
(
&
p
ixmap
);
pixPaint
.
setPen
(
QColor
(
100
,
100
,
100
));
// check font size and drawing with
...
...
@@ -90,7 +89,12 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const QPixmap &pixmap) :
pixPaint
.
end
();
this
->
setPixmap
(
newPixmap
);
// this->setPixmap(newPixmap);
QRect
r
(
QPoint
(),
pixmap
.
size
());
resize
(
r
.
size
());
setFixedSize
(
r
.
size
());
move
(
QApplication
::
desktop
()
->
screenGeometry
().
center
()
-
r
.
center
());
subscribeToCoreSignals
();
}
...
...
src/qt/splashscreen.h
View file @
cd490f94
...
...
@@ -16,12 +16,12 @@ class NetworkStyle;
* can take a long time, and in that case a progress window that cannot be
* moved around and minimized has turned out to be frustrating to the user.
*/
class
SplashScreen
:
public
Q
SplashScreen
/* QWidget */
class
SplashScreen
:
public
Q
Widget
{
Q_OBJECT
public
:
explicit
SplashScreen
(
Qt
::
WindowFlags
f
,
const
QPixmap
&
pixmap
);
explicit
SplashScreen
(
Qt
::
WindowFlags
f
);
~
SplashScreen
();
protected
:
...
...
src/qt/straks.cpp
View file @
cd490f94
...
...
@@ -409,9 +409,10 @@ void StraksApplication::createWindow(const NetworkStyle *networkStyle)
void
StraksApplication
::
createSplashScreen
(
/* const NetworkStyle *networkStyle */
)
{
SplashScreen
*
splash
=
new
SplashScreen
(
0
,
QPixmap
()
);
SplashScreen
*
splash
=
new
SplashScreen
(
0
);
// We don't hold a direct pointer to the splash screen after creation, but the splash
// screen will take care of deleting itself when slotFinish happens.
splash
->
setWindowFlags
(
Qt
::
CustomizeWindowHint
|
Qt
::
WindowTitleHint
);
splash
->
show
();
connect
(
this
,
SIGNAL
(
splashFinished
(
QWidget
*
)),
splash
,
SLOT
(
slotFinish
(
QWidget
*
)));
connect
(
this
,
SIGNAL
(
requestedShutdown
()),
splash
,
SLOT
(
close
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment