Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
skylivex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
astronomy
skylivex
Commits
61f7fa14
Commit
61f7fa14
authored
Feb 11, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splashpage moved to dedicated class
parent
fdb2bfb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
24 deletions
+25
-24
skylivex.pro
skylivex.pro
+1
-1
main.cpp
src/main.cpp
+4
-23
skylivex.h
src/skylivex.h
+20
-0
No files found.
skylivex.pro
View file @
61f7fa14
SOURCES
=
src
/
main
.
cpp
SOURCES
=
src
/
main
.
cpp
src
/
splashpage
.
cpp
src
/
skylivex
.
h
QT
+=
network
webkitwidgets
widgets
OTHER_FILES
+=
\
...
...
src/main.cpp
View file @
61f7fa14
...
...
@@ -34,39 +34,20 @@
* to load plugins and make them communicate.
*
*/
#include <QWebView>
#include <QWebFrame>
#include <QDesktopWidget>
#include <QApplication>
#include <QFile>
#include <QUrl>
#include <QDir>
#include "skylivex.h"
int
main
(
int
argc
,
char
*
argv
[])
{
QApplication
skylivex
(
argc
,
argv
);
QWebView
splashwin
;
QFile
loadinghtml
(
"gui/splash.html"
);
loadinghtml
.
open
(
QIODevice
::
ReadOnly
);
QString
splashFile
=
QString
::
fromUtf8
(
loadinghtml
.
readAll
().
constData
());
QUrl
baseUrl
=
QUrl
::
fromLocalFile
(
QDir
::
current
().
absoluteFilePath
(
"gui/dummy.html"
));
splashwin
.
setWindowFlags
(
Qt
::
FramelessWindowHint
);
QPalette
palette
=
splashwin
.
palette
();
palette
.
setBrush
(
QPalette
::
Base
,
Qt
::
transparent
);
splashwin
.
page
()
->
setPalette
(
palette
);
splashwin
.
setAttribute
(
Qt
::
WA_TranslucentBackground
,
true
);
splashwin
.
setAttribute
(
Qt
::
WA_OpaquePaintEvent
,
false
);
//splashwin.setGeometry(0, 0, QApplication::desktop()->size().width(), QApplication::desktop()->size().height());
splashwin
.
setHtml
(
splashFile
,
baseUrl
);
splashwin
.
resize
(
300
,
200
);
QFile
splashfile
(
"gui/splash.html"
);
SplashPage
splashwin
(
splashfile
);
splashwin
.
show
();
return
skylivex
.
exec
();
}
...
...
src/skylivex.h
View file @
61f7fa14
...
...
@@ -32,3 +32,23 @@
* Purpose:
*
*/
#ifndef SKYLIVEX_H
#define SKYLIVEX_H
#include <QWebView>
#include <QUrl>
#include <QFile>
#include <QString>
class
SplashPage
:
public
QWebView
{
QUrl
baseurl
;
QFile
splash_html
;
QString
splashFile
;
public
:
SplashPage
(
QFile
&
splash_html
);
~
SplashPage
();
};
#endif
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