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
e7d85710
Commit
e7d85710
authored
Dec 09, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1095 from DonLakeFlyer/StatusBar
Remove unnecessary QGCStatusBar
parents
619114e7
c952f7b5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
147 deletions
+3
-147
qgroundcontrol.pro
qgroundcontrol.pro
+0
-2
MainWindow.cc
src/ui/MainWindow.cc
+3
-5
MainWindow.h
src/ui/MainWindow.h
+0
-1
QGCStatusBar.cc
src/ui/QGCStatusBar.cc
+0
-78
QGCStatusBar.h
src/ui/QGCStatusBar.h
+0
-59
QGCToolBar.h
src/ui/QGCToolBar.h
+0
-2
No files found.
qgroundcontrol.pro
View file @
e7d85710
...
@@ -414,7 +414,6 @@ HEADERS += \
...
@@ -414,7 +414,6 @@ HEADERS += \
src
/
ui
/
map
/
QGCMapToolBar
.
h
\
src
/
ui
/
map
/
QGCMapToolBar
.
h
\
src
/
QGCGeo
.
h
\
src
/
QGCGeo
.
h
\
src
/
ui
/
QGCToolBar
.
h
\
src
/
ui
/
QGCToolBar
.
h
\
src
/
ui
/
QGCStatusBar
.
h
\
src
/
ui
/
QGCMAVLinkInspector
.
h
\
src
/
ui
/
QGCMAVLinkInspector
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
WaypointViewOnlyView
.
h
\
src
/
ui
/
WaypointViewOnlyView
.
h
\
...
@@ -558,7 +557,6 @@ SOURCES += \
...
@@ -558,7 +557,6 @@ SOURCES += \
src
/
ui
/
map
/
QGCMapTool
.
cc
\
src
/
ui
/
map
/
QGCMapTool
.
cc
\
src
/
ui
/
map
/
QGCMapToolBar
.
cc
\
src
/
ui
/
map
/
QGCMapToolBar
.
cc
\
src
/
ui
/
QGCToolBar
.
cc
\
src
/
ui
/
QGCToolBar
.
cc
\
src
/
ui
/
QGCStatusBar
.
cc
\
src
/
ui
/
QGCMAVLinkInspector
.
cc
\
src
/
ui
/
QGCMAVLinkInspector
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
WaypointViewOnlyView
.
cc
\
src
/
ui
/
WaypointViewOnlyView
.
cc
\
...
...
src/ui/MainWindow.cc
View file @
e7d85710
...
@@ -57,7 +57,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -57,7 +57,6 @@ This file is part of the QGROUNDCONTROL project
#include "MAVLinkDecoder.h"
#include "MAVLinkDecoder.h"
#include "QGCMAVLinkMessageSender.h"
#include "QGCMAVLinkMessageSender.h"
#include "QGCRGBDView.h"
#include "QGCRGBDView.h"
#include "QGCStatusBar.h"
#include "UASQuickView.h"
#include "UASQuickView.h"
#include "QGCDataPlot2D.h"
#include "QGCDataPlot2D.h"
#include "Linecharts.h"
#include "Linecharts.h"
...
@@ -225,8 +224,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen, enum MainWindow::CUSTOM_MODE
...
@@ -225,8 +224,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen, enum MainWindow::CUSTOM_MODE
advancedActions
<<
ui
.
actionSimulationView
;
advancedActions
<<
ui
.
actionSimulationView
;
toolBar
->
setPerspectiveChangeAdvancedActions
(
advancedActions
);
toolBar
->
setPerspectiveChangeAdvancedActions
(
advancedActions
);
customStatusBar
=
new
QGCStatusBar
(
this
);
setStatusBar
(
new
QStatusBar
(
this
));
setStatusBar
(
customStatusBar
);
statusBar
()
->
setSizeGripEnabled
(
true
);
statusBar
()
->
setSizeGripEnabled
(
true
);
emit
initStatusChanged
(
tr
(
"Building common widgets."
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
emit
initStatusChanged
(
tr
(
"Building common widgets."
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
...
@@ -503,8 +501,8 @@ void MainWindow::buildCommonWidgets()
...
@@ -503,8 +501,8 @@ void MainWindow::buildCommonWidgets()
this
,
SIGNAL
(
valueChanged
(
int
,
QString
,
QString
,
QVariant
,
quint64
)));
this
,
SIGNAL
(
valueChanged
(
int
,
QString
,
QString
,
QVariant
,
quint64
)));
// Log player
// Log player
logPlayer
=
new
QGCMAVLinkLogPlayer
(
mavlink
,
customStatusBar
);
logPlayer
=
new
QGCMAVLinkLogPlayer
(
mavlink
,
statusBar
()
);
customStatusBar
->
setLogPlayer
(
logPlayer
);
statusBar
()
->
addPermanentWidget
(
logPlayer
);
// Initialize all of the views, if they haven't been already, and add their central widgets
// Initialize all of the views, if they haven't been already, and add their central widgets
if
(
!
plannerView
)
if
(
!
plannerView
)
...
...
src/ui/MainWindow.h
View file @
e7d85710
...
@@ -416,7 +416,6 @@ protected:
...
@@ -416,7 +416,6 @@ protected:
QPointer
<
QDockWidget
>
hudDockWidget
;
QPointer
<
QDockWidget
>
hudDockWidget
;
QPointer
<
QGCToolBar
>
toolBar
;
QPointer
<
QGCToolBar
>
toolBar
;
QPointer
<
QGCStatusBar
>
customStatusBar
;
QPointer
<
QDockWidget
>
mavlinkInspectorWidget
;
QPointer
<
QDockWidget
>
mavlinkInspectorWidget
;
QPointer
<
MAVLinkDecoder
>
mavlinkDecoder
;
QPointer
<
MAVLinkDecoder
>
mavlinkDecoder
;
...
...
src/ui/QGCStatusBar.cc
deleted
100644 → 0
View file @
619114e7
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2013 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#include <QToolButton>
#include <QLabel>
#include <QSpacerItem>
#include <QFileDialog>
#include "QGCStatusBar.h"
#include "UASManager.h"
#include "MainWindow.h"
#include "QGCApplication.h"
QGCStatusBar
::
QGCStatusBar
(
QWidget
*
parent
)
:
QStatusBar
(
parent
),
player
(
NULL
),
changed
(
true
),
lastLogDirectory
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
DesktopLocation
))
{
setObjectName
(
"QGC_STATUSBAR"
);
loadSettings
();
}
void
QGCStatusBar
::
paintEvent
(
QPaintEvent
*
event
)
{
Q_UNUSED
(
event
);
QPainter
p
(
this
);
QStyleOption
opt
;
opt
.
initFrom
(
this
);
style
()
->
drawPrimitive
(
QStyle
::
PE_PanelStatusBar
,
&
opt
,
&
p
,
this
);
}
void
QGCStatusBar
::
setLogPlayer
(
QGCMAVLinkLogPlayer
*
player
)
{
this
->
player
=
player
;
addPermanentWidget
(
player
);
}
void
QGCStatusBar
::
loadSettings
()
{
QSettings
settings
;
settings
.
beginGroup
(
"QGC_MAVLINKLOGPLAYER"
);
lastLogDirectory
=
settings
.
value
(
"LAST_LOG_DIRECTORY"
,
lastLogDirectory
).
toString
();
settings
.
endGroup
();
}
void
QGCStatusBar
::
storeSettings
()
{
QSettings
settings
;
settings
.
beginGroup
(
"QGC_MAVLINKLOGPLAYER"
);
settings
.
setValue
(
"LAST_LOG_DIRECTORY"
,
lastLogDirectory
);
settings
.
endGroup
();
}
QGCStatusBar
::~
QGCStatusBar
()
{
storeSettings
();
}
src/ui/QGCStatusBar.h
deleted
100644 → 0
View file @
619114e7
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2013 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef QGCSTATUSBAR_H
#define QGCSTATUSBAR_H
#include <QStatusBar>
#include <QAction>
#include <QToolButton>
#include <QPushButton>
#include <QLabel>
#include <QProgressBar>
#include "UASInterface.h"
#include "QGCMAVLinkLogPlayer.h"
class
QGCStatusBar
:
public
QStatusBar
{
Q_OBJECT
public:
explicit
QGCStatusBar
(
QWidget
*
parent
=
0
);
void
addPerspectiveChangeAction
(
QAction
*
action
);
~
QGCStatusBar
();
public
slots
:
/** @brief Set log playing component */
void
setLogPlayer
(
QGCMAVLinkLogPlayer
*
player
);
virtual
void
paintEvent
(
QPaintEvent
*
event
);
protected:
void
storeSettings
();
void
loadSettings
();
QGCMAVLinkLogPlayer
*
player
;
bool
changed
;
QString
lastLogDirectory
;
};
#endif // QGCSTATUSBAR_H
src/ui/QGCToolBar.h
View file @
e7d85710
...
@@ -33,7 +33,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -33,7 +33,6 @@ This file is part of the QGROUNDCONTROL project
#include <QComboBox>
#include <QComboBox>
#include <QTimer>
#include <QTimer>
#include "UASInterface.h"
#include "UASInterface.h"
#include "QGCMAVLinkLogPlayer.h"
#include "SerialLink.h"
#include "SerialLink.h"
class
QGCToolBar
:
public
QToolBar
class
QGCToolBar
:
public
QToolBar
...
@@ -124,7 +123,6 @@ protected:
...
@@ -124,7 +123,6 @@ protected:
QProgressBar
*
toolBarBatteryBar
;
QProgressBar
*
toolBarBatteryBar
;
QLabel
*
toolBarBatteryVoltageLabel
;
QLabel
*
toolBarBatteryVoltageLabel
;
QGCMAVLinkLogPlayer
*
player
;
QComboBox
*
portComboBox
;
QComboBox
*
portComboBox
;
QComboBox
*
baudcomboBox
;
QComboBox
*
baudcomboBox
;
QTimer
portBoxTimer
;
QTimer
portBoxTimer
;
...
...
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