Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
947a8a61
Commit
947a8a61
authored
Mar 19, 2020
by
Jean-Baptiste Mardelle
Browse files
Add startup splash screen
parent
2df35530
Changes
3
Hide whitespace changes
Inline
Side-by-side
data/pics/splash-background.png
View replaced file @
2df35530
View file @
947a8a61
578 KB
|
W:
|
H:
163 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/dialogs/CMakeLists.txt
View file @
947a8a61
...
...
@@ -6,7 +6,6 @@ set(kdenlive_SRCS
dialogs/markerdialog.cpp
dialogs/profilesdialog.cpp
dialogs/renderwidget.cpp
dialogs/splash.cpp
dialogs/titletemplatedialog.cpp
dialogs/wizard.cpp
PARENT_SCOPE
)
...
...
src/main.cpp
View file @
947a8a61
...
...
@@ -19,13 +19,13 @@
***************************************************************************/
#include
"core.h"
#include
"dialogs/splash.hpp"
#include
"logger.hpp"
#include
<config-kdenlive.h>
#include
<mlt++/Mlt.h>
#include
"kxmlgui_version.h"
#include
"mainwindow.h"
#include
<KAboutData>
#include
<KConfigGroup>
...
...
@@ -52,6 +52,7 @@
#include
<QQmlEngine>
#include
<QUrl>
//new
#include
<klocalizedstring.h>
#include
<QSplashScreen>
#ifdef Q_OS_WIN
extern
"C"
...
...
@@ -96,6 +97,15 @@ int main(int argc, char *argv[])
app
.
setOrganizationDomain
(
QStringLiteral
(
"kde.org"
));
app
.
setWindowIcon
(
QIcon
(
QStringLiteral
(
":/pics/kdenlive.png"
)));
KLocalizedString
::
setApplicationDomain
(
"kdenlive"
);
QPixmap
pixmap
(
":/pics/splash-background.png"
);
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
QSplashScreen
splash
(
pixmap
);
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
splash
.
showMessage
(
i18n
(
"Version %1"
,
QString
(
KDENLIVE_VERSION
)),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
Qt
::
white
);
splash
.
show
();
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
#ifdef Q_OS_WIN
qputenv
(
"KDE_FORK_SLAVES"
,
"1"
);
QString
path
=
qApp
->
applicationDirPath
()
+
QLatin1Char
(
';'
)
+
qgetenv
(
"PATH"
);
...
...
@@ -147,6 +157,7 @@ int main(int argc, char *argv[])
bool
darkBreeze
=
grp
.
readEntry
(
"use_dark_breeze"
,
QVariant
(
false
)).
toBool
();
QIcon
::
setThemeName
(
darkBreeze
?
QStringLiteral
(
"breeze-dark"
)
:
QStringLiteral
(
"breeze"
));
}
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
// Create KAboutData
KAboutData
aboutData
(
QByteArray
(
"kdenlive"
),
i18n
(
"Kdenlive"
),
KDENLIVE_VERSION
,
i18n
(
"An open source video editor."
),
KAboutLicense
::
GPL
,
...
...
@@ -184,6 +195,7 @@ int main(int argc, char *argv[])
app
.
setOrganizationDomain
(
aboutData
.
organizationDomain
());
app
.
setApplicationVersion
(
aboutData
.
version
());
app
.
setAttribute
(
Qt
::
AA_DontCreateNativeWidgetSiblings
,
true
);
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
// Create command line parser with options
QCommandLineParser
parser
;
...
...
@@ -200,16 +212,14 @@ int main(int argc, char *argv[])
parser
.
process
(
app
);
aboutData
.
processCommandLine
(
&
parser
);
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
#ifdef USE_DRMINGW
ExcHndlInit
();
#elif defined(KF5_USE_CRASH)
KCrash
::
initialize
();
#endif
//auto splash = new Splash(&app);
//splash->show();
//qApp->processEvents();
qmlRegisterUncreatableMetaObject
(
PlaylistState
::
staticMetaObject
,
// static meta object
"com.enums"
,
// import statement
1
,
0
,
// major and minor version of the import
...
...
@@ -239,11 +249,10 @@ int main(int argc, char *argv[])
QUrl
startup
=
QUrl
::
fromLocalFile
(
currentPath
.
endsWith
(
QDir
::
separator
())
?
currentPath
:
currentPath
+
QDir
::
separator
());
url
=
startup
.
resolved
(
url
);
}
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
Core
::
build
(
!
parser
.
value
(
QStringLiteral
(
"config"
)).
isEmpty
(),
parser
.
value
(
QStringLiteral
(
"mlt-path"
)));
pCore
->
initGUI
(
url
,
clipsToLoad
);
//delete splash;
//splash->endSplash();
//qApp->processEvents();
splash
.
finish
(
pCore
->
window
());
int
result
=
app
.
exec
();
Core
::
clean
();
...
...
Eugen Mohr
@emohr
·
Mar 21, 2020
Developer
Request:
https://phabricator.kde.org/T6545
Request: https://phabricator.kde.org/T6545
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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