Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Valentin Platzgummer
qgroundcontrol
Commits
e2982eb0
Commit
e2982eb0
authored
Sep 25, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated splash screen
parent
45e5ae38
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
splash.png
images/splash.png
+0
-0
QGCCore.cc
src/QGCCore.cc
+2
-1
MainWindow.cc
src/ui/MainWindow.cc
+20
-1
MainWindow.h
src/ui/MainWindow.h
+5
-1
No files found.
images/splash.png
View replaced file @
45e5ae38
View file @
e2982eb0
25.5 KB
|
W:
|
H:
25.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/QGCCore.cc
View file @
e2982eb0
...
...
@@ -110,6 +110,7 @@ QGCCore::QGCCore(int &argc, char* argv[]) : QApplication(argc, argv)
// Delete splash screen after mainWindow was displayed
splashScreen
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
splashScreen
->
show
();
processEvents
();
splashScreen
->
showMessage
(
tr
(
"Loading application fonts"
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
// Exit main application when last window is closed
...
...
@@ -159,7 +160,7 @@ QGCCore::QGCCore(int &argc, char* argv[]) : QApplication(argc, argv)
simulationLink
->
disconnect
();
//mainWindow->addLink(simulationLink);
mainWindow
=
MainWindow
::
instance
();
mainWindow
=
MainWindow
::
instance
(
splashScreen
);
// Remove splash screen
splashScreen
->
finish
(
mainWindow
);
...
...
src/ui/MainWindow.cc
View file @
e2982eb0
...
...
@@ -34,6 +34,7 @@ This file is part of the QGROUNDCONTROL project
#include <QDebug>
#include <QTimer>
#include <QHostInfo>
#include <QSplashScreen>
#include "QGC.h"
#include "MAVLinkSimulationLink.h"
...
...
@@ -62,12 +63,13 @@ This file is part of the QGROUNDCONTROL project
#include "LogCompressor.h"
MainWindow
*
MainWindow
::
instance
()
MainWindow
*
MainWindow
::
instance
(
QSplashScreen
*
screen
)
{
static
MainWindow
*
_instance
=
0
;
if
(
_instance
==
0
)
{
_instance
=
new
MainWindow
();
if
(
screen
)
connect
(
_instance
,
SIGNAL
(
initStatusChanged
(
QString
)),
screen
,
SLOT
(
showMessage
(
QString
)));
/* Set the application as parent to ensure that this object
* will be destroyed when the main application exits */
...
...
@@ -94,6 +96,8 @@ MainWindow::MainWindow(QWidget *parent):
centerStackActionGroup
(
this
),
lowPowerMode
(
false
)
{
hide
();
emit
initStatusChanged
(
"Loading UI Settings.."
);
loadSettings
();
if
(
!
settings
.
contains
(
"CURRENT_VIEW"
))
{
...
...
@@ -115,10 +119,14 @@ MainWindow::MainWindow(QWidget *parent):
settings
.
sync
();
emit
initStatusChanged
(
"Loading Style."
);
loadStyle
(
currentStyle
);
emit
initStatusChanged
(
"Setting up user interface."
);
// Setup user interface
ui
.
setupUi
(
this
);
hide
();
// Set dock options
setDockOptions
(
AnimatedDocks
|
AllowTabbedDocks
|
AllowNestedDocks
);
...
...
@@ -143,13 +151,18 @@ MainWindow::MainWindow(QWidget *parent):
toolBar
->
addPerspectiveChangeAction
(
ui
.
actionEngineersView
);
toolBar
->
addPerspectiveChangeAction
(
ui
.
actionPilotsView
);
emit
initStatusChanged
(
"Building common widgets."
);
buildCommonWidgets
();
connectCommonWidgets
();
emit
initStatusChanged
(
"Building common actions."
);
// Create actions
connectCommonActions
();
// Populate link menu
emit
initStatusChanged
(
"Populating link menu"
);
QList
<
LinkInterface
*>
links
=
LinkManager
::
instance
()
->
getLinks
();
foreach
(
LinkInterface
*
link
,
links
)
{
...
...
@@ -159,6 +172,7 @@ MainWindow::MainWindow(QWidget *parent):
connect
(
LinkManager
::
instance
(),
SIGNAL
(
newLink
(
LinkInterface
*
)),
this
,
SLOT
(
addLink
(
LinkInterface
*
)));
// Connect user interface devices
emit
initStatusChanged
(
"Initializing joystick interface."
);
joystickWidget
=
0
;
joystick
=
new
JoystickInput
();
...
...
@@ -178,9 +192,12 @@ MainWindow::MainWindow(QWidget *parent):
// Initialize window state
windowStateVal
=
windowState
();
emit
initStatusChanged
(
"Restoring last view state."
);
// Restore the window setup
loadViewState
();
emit
initStatusChanged
(
"Restoring last window size."
);
// Restore the window position and size
if
(
settings
.
contains
(
getWindowGeometryKey
()))
{
...
...
@@ -208,6 +225,8 @@ MainWindow::MainWindow(QWidget *parent):
connect
(
&
windowNameUpdateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
configureWindowName
()));
windowNameUpdateTimer
.
start
(
15000
);
emit
initStatusChanged
(
"Done."
);
show
();
}
MainWindow
::~
MainWindow
()
...
...
src/ui/MainWindow.h
View file @
e2982eb0
...
...
@@ -80,6 +80,7 @@ This file is part of the QGROUNDCONTROL project
#include "MAVLinkDecoder.h"
class
QGCMapTool
;
class
QSplashScreen
;
/**
* @brief Main Application Window
...
...
@@ -90,7 +91,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
static
MainWindow
*
instance
();
static
MainWindow
*
instance
(
QSplashScreen
*
screen
=
0
);
~
MainWindow
();
enum
QGC_MAINWINDOW_STYLE
{
...
...
@@ -216,6 +217,9 @@ public slots:
/** @brief Update the window name */
void
configureWindowName
();
signals:
void
initStatusChanged
(
const
QString
&
message
);
public:
QGCMAVLinkLogPlayer
*
getLogPlayer
()
{
...
...
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