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
57c34c1c
Commit
57c34c1c
authored
Oct 15, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert all ui to a single Qml container
parent
5795e64c
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
625 additions
and
1115 deletions
+625
-1115
QGCApplication.pro
QGCApplication.pro
+6
-8
qgroundcontrol.qrc
qgroundcontrol.qrc
+5
-0
AutoPilotPlugin.cc
src/AutoPilotPlugins/AutoPilotPlugin.cc
+1
-3
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+58
-29
FlightDisplayViewController.cc
src/FlightDisplay/FlightDisplayViewController.cc
+10
-29
FlightDisplayViewController.h
src/FlightDisplay/FlightDisplayViewController.h
+16
-12
FlightMap.qml
src/FlightMap/FlightMap.qml
+6
-0
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+139
-123
MissionEditorController.cc
src/MissionEditor/MissionEditorController.cc
+36
-46
MissionEditorController.h
src/MissionEditor/MissionEditorController.h
+7
-6
QGCApplication.cc
src/QGCApplication.cc
+16
-5
QGCFileDialog.cc
src/QGCFileDialog.cc
+1
-0
QGCMessageBox.h
src/QGCMessageBox.h
+2
-0
QGCQmlWidgetHolder.cpp
src/QGCQmlWidgetHolder.cpp
+3
-1
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+3
-0
SetupView.cc
src/VehicleSetup/SetupView.cc
+0
-97
SetupView.h
src/VehicleSetup/SetupView.h
+0
-54
SetupView.qml
src/VehicleSetup/SetupView.qml
+1
-0
SetupViewTest.cc
src/VehicleSetup/SetupViewTest.cc
+9
-18
SetupViewTest.h
src/VehicleSetup/SetupViewTest.h
+0
-2
MainWindowTest.cc
src/qgcunittest/MainWindowTest.cc
+5
-8
MainWindowTest.h
src/qgcunittest/MainWindowTest.h
+0
-2
MainWindow.cc
src/ui/MainWindow.cc
+31
-222
MainWindow.h
src/ui/MainWindow.h
+19
-59
MainWindow.qml
src/ui/MainWindow.qml
+106
-0
QGCHilFlightGearConfiguration.cc
src/ui/QGCHilFlightGearConfiguration.cc
+2
-1
SettingsDialog.cc
src/ui/SettingsDialog.cc
+1
-35
SettingsDialog.h
src/ui/SettingsDialog.h
+0
-7
SettingsDialog.ui
src/ui/SettingsDialog.ui
+0
-74
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+84
-88
MainToolBarController.cc
src/ui/toolbar/MainToolBarController.cc
+47
-141
MainToolBarController.h
src/ui/toolbar/MainToolBarController.h
+11
-44
UASMessageView.cc
src/ui/uas/UASMessageView.cc
+0
-1
No files found.
QGCApplication.pro
View file @
57c34c1c
...
...
@@ -216,7 +216,7 @@ HEADERS += \
src
/
comm
/
TCPLink
.
h
\
src
/
comm
/
UDPLink
.
h
\
src
/
FlightDisplay
/
FlightDisplayWidget
.
h
\
src
/
FlightDisplay
/
FlightDisplayView
.
h
\
src
/
FlightDisplay
/
FlightDisplayView
Controller
.
h
\
src
/
FlightMap
/
FlightMapSettings
.
h
\
src
/
GAudioOutput
.
h
\
src
/
HomePositionManager
.
h
\
...
...
@@ -224,7 +224,7 @@ HEADERS += \
src
/
Joystick
/
JoystickManager
.
h
\
src
/
LogCompressor
.
h
\
src
/
MG
.
h
\
src
/
MissionEditor
/
MissionEditor
.
h
\
src
/
MissionEditor
/
MissionEditor
Controller
.
h
\
src
/
MissionManager
/
MissionManager
.
h
\
src
/
QGC
.
h
\
src
/
QGCApplication
.
h
\
...
...
@@ -264,7 +264,7 @@ HEADERS += \
src
/
ui
/
QGCTCPLinkConfiguration
.
h
\
src
/
ui
/
QGCUDPLinkConfiguration
.
h
\
src
/
ui
/
SettingsDialog
.
h
\
src
/
ui
/
toolbar
/
MainToolBar
.
h
\
src
/
ui
/
toolbar
/
MainToolBar
Controller
.
h
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
h
\
src
/
ui
/
uas
/
UASMessageView
.
h
\
src
/
MissionItem
.
h
\
...
...
@@ -327,7 +327,7 @@ SOURCES += \
src
/
comm
/
TCPLink
.
cc
\
src
/
comm
/
UDPLink
.
cc
\
src
/
FlightDisplay
/
FlightDisplayWidget
.
cc
\
src
/
FlightDisplay
/
FlightDisplayView
.
cc
\
src
/
FlightDisplay
/
FlightDisplayView
Controller
.
cc
\
src
/
FlightMap
/
FlightMapSettings
.
cc
\
src
/
GAudioOutput
.
cc
\
src
/
HomePositionManager
.
cc
\
...
...
@@ -335,7 +335,7 @@ SOURCES += \
src
/
Joystick
/
JoystickManager
.
cc
\
src
/
LogCompressor
.
cc
\
src
/
main
.
cc
\
src
/
MissionEditor
/
MissionEditor
.
cc
\
src
/
MissionEditor
/
MissionEditor
Controller
.
cc
\
src
/
MissionManager
/
MissionManager
.
cc
\
src
/
QGC
.
cc
\
src
/
QGCApplication
.
cc
\
...
...
@@ -369,7 +369,7 @@ SOURCES += \
src
/
ui
/
QGCTCPLinkConfiguration
.
cc
\
src
/
ui
/
QGCUDPLinkConfiguration
.
cc
\
src
/
ui
/
SettingsDialog
.
cc
\
src
/
ui
/
toolbar
/
MainToolBar
.
cc
\
src
/
ui
/
toolbar
/
MainToolBar
Controller
.
cc
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
cc
\
src
/
ui
/
uas
/
UASMessageView
.
cc
\
src
/
MissionItem
.
cc
\
...
...
@@ -518,7 +518,6 @@ HEADERS+= \
src
/
FirmwarePlugin
/
PX4
/
PX4FirmwarePlugin
.
h
\
src
/
Vehicle
/
MultiVehicleManager
.
h
\
src
/
Vehicle
/
Vehicle
.
h
\
src
/
VehicleSetup
/
SetupView
.
h
\
src
/
VehicleSetup
/
VehicleComponent
.
h
\
!
MobileBuild
{
...
...
@@ -557,7 +556,6 @@ SOURCES += \
src
/
FirmwarePlugin
/
PX4
/
PX4FirmwarePlugin
.
cc
\
src
/
Vehicle
/
MultiVehicleManager
.
cc
\
src
/
Vehicle
/
Vehicle
.
cc
\
src
/
VehicleSetup
/
SetupView
.
cc
\
src
/
VehicleSetup
/
VehicleComponent
.
cc
\
!
MobileBuild
{
...
...
qgroundcontrol.qrc
View file @
57c34c1c
...
...
@@ -119,6 +119,11 @@
<file alias="QGroundControl/Controls/QGCCanvas.qml">src/QmlControls/QGCCanvas.qml</file>
<file alias="QGroundControl/Controls/ExclusiveGroupItem.qml">src/QmlControls/ExclusiveGroupItem.qml</file>
<!-- Main Window -->
<file alias="MainWindow.qml">src/ui/MainWindow.qml</file>
<file alias="QGroundControl/Controls/MainToolBar.qml">src/ui/toolbar/MainToolBar.qml</file>
<file alias="QGroundControl/Controls/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<!-- Vehicle Setup -->
<file alias="SetupView.qml">src/VehicleSetup/SetupView.qml</file>
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
...
...
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
57c34c1c
...
...
@@ -64,9 +64,7 @@ void AutoPilotPlugin::_parametersReadyChanged(bool parametersReady)
QGCMessageBox
::
warning
(
"Setup"
,
"One or more vehicle components require setup prior to flight."
);
// Take the user to Vehicle Summary
MainWindow
*
mainWindow
=
MainWindow
::
instance
();
Q_ASSERT
(
mainWindow
);
mainWindow
->
getMainToolBar
()
->
onSetupView
();
MainWindow
::
instance
()
->
showSetupView
();
qgcApp
()
->
processEvents
(
QEventLoop
::
ExcludeUserInputEvents
);
}
}
...
...
src/FlightDisplay/FlightDisplayView.qml
View file @
57c34c1c
...
...
@@ -34,11 +34,23 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Controllers
1.0
/// Flight Display View
Item
{
id
:
root
// Top margin for all widgets. Used to prevent overlap with the toolbar
property
real
topMargin
:
0
// Used by parent to hide widgets when it displays something above in the z order.
// Prevents z order drawing problems.
property
bool
hideWidgets
:
false
readonly
property
alias
zOrderTopMost
:
flightMap
.
zOrderTopMost
readonly
property
alias
zOrderWidgets
:
flightMap
.
zOrderWidgets
readonly
property
alias
zOrderMapItems
:
flightMap
.
zOrderMapItems
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
...
...
@@ -70,6 +82,8 @@ Item {
property
bool
_showMap
:
getBool
(
QGroundControl
.
flightMapSettings
.
loadMapSetting
(
flightMap
.
mapName
,
_showMapBackgroundKey
,
"
1
"
))
FlightDisplayViewController
{
id
:
_controller
;
}
ExclusiveGroup
{
id
:
_dropButtonsExclusiveGroup
}
...
...
@@ -86,7 +100,7 @@ Item {
}
function
_setShowMap
(
showMap
)
{
_showMap
=
flightDisplay
.
hasVideo
?
showMap
:
true
_showMap
=
_controller
.
hasVideo
?
showMap
:
true
QGroundControl
.
flightMapSettings
.
saveMapSetting
(
flightMap
.
mapName
,
_showMapBackgroundKey
,
setBool
(
_showMap
))
}
...
...
@@ -118,6 +132,7 @@ Item {
label
:
"
H
"
coordinate
:
(
_activeVehicle
&&
_activeVehicle
.
homePositionAvailable
)
?
_activeVehicle
.
homePosition
:
QtPositioning
.
coordinate
(
0
,
0
)
visible
:
_activeVehicle
?
_activeVehicle
.
homePositionAvailable
:
false
z
:
flightMap
.
zOrderMapItems
}
// Add trajectory points to the map
...
...
@@ -128,6 +143,8 @@ Item {
MapPolyline
{
line.width
:
3
line.color
:
"
orange
"
z
:
flightMap
.
zOrderMapItems
-
1
path
:
[
{
latitude
:
object
.
coordinate1
.
latitude
,
longitude
:
object
.
coordinate1
.
longitude
},
...
...
@@ -145,6 +162,7 @@ Item {
vehicle
:
object
coordinate
:
object
.
coordinate
isSatellite
:
flightMap
.
isSatelliteMap
z
:
flightMap
.
zOrderMapItems
}
}
...
...
@@ -157,6 +175,7 @@ Item {
label
:
object
.
sequenceNumber
isCurrentItem
:
object
.
isCurrentItem
coordinate
:
object
.
coordinate
z
:
flightMap
.
zOrderMapItems
}
}
...
...
@@ -175,17 +194,20 @@ Item {
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
object
.
satelliteLock
<
2
text
:
"
No GPS Lock for Vehicle #
"
+
object
.
id
z
:
flightMap
.
zOrderMapItems
-
2
}
}
}
QGCCompassWidget
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.topMargin
:
topMargin
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
size
:
ScreenTools
.
defaultFontPixelSize
*
(
13.3
)
heading
:
_heading
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
flightMap
.
zOrderWidgets
}
QGCAttitudeWidget
{
...
...
@@ -196,6 +218,7 @@ Item {
rollAngle
:
_roll
pitchAngle
:
_pitch
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
flightMap
.
zOrderWidgets
}
DropButton
{
...
...
@@ -207,6 +230,7 @@ Item {
buttonImage
:
"
/qmlimages/MapCenter.svg
"
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
exclusiveGroup
:
_dropButtonsExclusiveGroup
z
:
flightMap
.
zOrderWidgets
dropDownComponent
:
Component
{
Row
{
...
...
@@ -242,14 +266,16 @@ Item {
}
DropButton
{
id
:
mapTypeButton
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
dropDirection
:
dropDown
buttonImage
:
"
/qmlimages/MapType.svg
"
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
exclusiveGroup
:
_dropButtonsExclusiveGroup
id
:
mapTypeButton
anchors.topMargin
:
topMargin
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
dropDirection
:
dropDown
buttonImage
:
"
/qmlimages/MapType.svg
"
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
exclusiveGroup
:
_dropButtonsExclusiveGroup
z
:
flightMap
.
zOrderWidgets
dropDownComponent
:
Component
{
Row
{
...
...
@@ -277,8 +303,8 @@ Item {
QGCVideoBackground
{
anchors.fill
:
parent
display
:
videoDisplay
receiver
:
videoReceiver
display
:
_controller
.
videoSurface
receiver
:
_controller
.
videoReceiver
visible
:
!
_showMap
QGCCompassHUD
{
...
...
@@ -289,7 +315,7 @@ Item {
height
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
heading
:
_heading
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
70
z
:
flightMap
.
zOrderWidgets
}
QGCAttitudeHUD
{
...
...
@@ -299,6 +325,7 @@ Item {
width
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
flightMap
.
zOrderWidgets
}
}
...
...
@@ -307,7 +334,8 @@ Item {
height
:
parent
.
height
*
0.65
>
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
?
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
:
parent
.
height
*
0.65
width
:
ScreenTools
.
defaultFontPixelSize
*
(
5
)
altitude
:
_altitudeWGS84
z
:
30
z
:
flightMap
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCSpeedWidget
{
...
...
@@ -315,7 +343,8 @@ Item {
width
:
ScreenTools
.
defaultFontPixelSize
*
(
5
)
height
:
parent
.
height
*
0.65
>
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
?
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
:
parent
.
height
*
0.65
speed
:
_groundSpeed
z
:
40
z
:
flightMap
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCCurrentSpeed
{
...
...
@@ -324,7 +353,8 @@ Item {
airspeed
:
_airSpeed
groundspeed
:
_groundSpeed
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
50
z
:
flightMap
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCCurrentAltitude
{
...
...
@@ -333,7 +363,8 @@ Item {
altitude
:
_altitudeWGS84
vertZ
:
_climbRate
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
60
z
:
flightMap
.
zOrderWidgets
visible
:
!
hideWidgets
}
// Mission item list
...
...
@@ -348,6 +379,8 @@ Item {
opacity
:
0.75
orientation
:
ListView
.
Horizontal
model
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
missionItems
:
0
z
:
flightMap
.
zOrderWidgets
visible
:
!
hideWidgets
property
real
_maxItemHeight
:
0
...
...
@@ -360,12 +393,14 @@ Item {
QGCButton
{
id
:
optionsButton
x
:
flightMap
.
mapWidgets
.
x
y
:
flightMap
.
mapWidgets
.
y
-
height
-
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
width
:
flightMap
.
mapWidgets
.
width
text
:
"
Options
"
menu
:
optionsMenu
id
:
optionsButton
x
:
flightMap
.
mapWidgets
.
x
y
:
flightMap
.
mapWidgets
.
y
-
height
-
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
z
:
flightMap
.
zOrderWidgets
width
:
flightMap
.
mapWidgets
.
width
text
:
"
Options
"
menu
:
optionsMenu
visible
:
_controller
.
hasVideo
&&
!
hideWidgets
ExclusiveGroup
{
id
:
backgroundTypeGroup
...
...
@@ -380,7 +415,6 @@ Item {
checkable
:
true
checked
:
_showMap
text
:
"
Show map as background
"
visible
:
flightDisplay
.
hasVideo
onTriggered
:
_setShowMap
(
true
)
}
...
...
@@ -391,14 +425,9 @@ Item {
checkable
:
true
checked
:
!
_showMap
text
:
"
Show video as background
"
visible
:
flightDisplay
.
hasVideo
onTriggered
:
_setShowMap
(
false
)
}
MenuSeparator
{
visible
:
flightDisplay
.
hasVideo
&&
_showMap
}
}
}
}
src/FlightDisplay/FlightDisplayView.cc
→
src/FlightDisplay/FlightDisplayView
Controller
.cc
View file @
57c34c1c
...
...
@@ -26,30 +26,15 @@ This file is part of the QGROUNDCONTROL project
#include <QSettings>
#include <VideoItem.h>
#include <VideoSurface.h>
#include "VideoReceiver.h"
#include "ScreenToolsController.h"
#include "FlightDisplayView.h"
#include "FlightDisplayView
Controller
.h"
const
char
*
kMainFlightDisplayView
Group
=
"FlightDisplayView
"
;
const
char
*
kMainFlightDisplayView
ControllerGroup
=
"FlightDisplayViewController
"
;
FlightDisplayView
::
FlightDisplayView
(
QWidge
t
*
parent
)
:
Q
GCQmlWidgetHolder
(
QString
(),
NULL
,
parent
)
FlightDisplayView
Controller
::
FlightDisplayViewController
(
QObjec
t
*
parent
)
:
Q
Object
(
parent
)
{
setSizePolicy
(
QSizePolicy
::
MinimumExpanding
,
QSizePolicy
::
MinimumExpanding
);
setObjectName
(
"FlightDisplayView"
);
// Get rid of layout default margins
QLayout
*
pl
=
layout
();
if
(
pl
)
{
pl
->
setContentsMargins
(
0
,
0
,
0
,
0
);
}
#ifndef __android__
setMinimumWidth
(
31
*
ScreenToolsController
::
defaultFontPixelSize_s
());
setMinimumHeight
(
33
*
ScreenToolsController
::
defaultFontPixelSize_s
());
#endif
setContextPropertyObject
(
"flightDisplay"
,
this
);
/*
* This is the receiving end of an UDP RTP stream. The sender can be setup with this command:
*
...
...
@@ -75,19 +60,15 @@ FlightDisplayView::FlightDisplayView(QWidget *parent)
* Do not change anything else unless you know what you are doing. Any other change will require a matching change on the receiving end.
*
*/
VideoSurface
*
pSurface
=
new
VideoSurface
;
setContextPropertyObject
(
"videoDisplay"
,
pSurface
);
VideoReceiver
*
pReceiver
=
new
VideoReceiver
(
this
);
pReceiver
->
setUri
(
QLatin1Literal
(
"udp://0.0.0.0:5000"
));
_videoSurface
=
new
VideoSurface
;
_videoReceiver
=
new
VideoReceiver
(
this
);
_videoReceiver
->
setUri
(
QLatin1Literal
(
"udp://0.0.0.0:5000"
));
#if defined(QGC_GST_STREAMING)
pReceiver
->
setVideoSink
(
p
Surface
->
videoSink
());
_videoReceiver
->
setVideoSink
(
_video
Surface
->
videoSink
());
#endif
setContextPropertyObject
(
"videoReceiver"
,
pReceiver
);
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/FlightDisplayView.qml"
));
setVisible
(
true
);
}
FlightDisplayView
::~
FlightDisplayView
()
FlightDisplayView
Controller
::~
FlightDisplayViewController
()
{
}
src/FlightDisplay/FlightDisplayView.h
→
src/FlightDisplay/FlightDisplayView
Controller
.h
View file @
57c34c1c
...
...
@@ -21,32 +21,36 @@ This file is part of the QGROUNDCONTROL project
======================================================================*/
#ifndef FlightDisplayView_H
#define FlightDisplayView_H
#ifndef FlightDisplayView
Controller
_H
#define FlightDisplayView
Controller
_H
#include
"QGCQmlWidgetHolder.h"
#include
<QObject>
class
FlightDisplayView
:
public
QGCQmlWidgetHolder
#include "VideoSurface.h"
#include "VideoReceiver.h"
class
FlightDisplayViewController
:
public
QObject
{
Q_OBJECT
public:
FlightDisplayView
(
QWidget
*
parent
=
NULL
);
~
FlightDisplayView
();
/// @brief Invokes the Flight Display Options menu
void
showOptionsMenu
()
{
emit
showOptionsMenuChanged
();
}
public:
FlightDisplayViewController
(
QObject
*
parent
=
NULL
);
~
FlightDisplayViewController
();
Q_PROPERTY
(
bool
hasVideo
READ
hasVideo
CONSTANT
)
Q_PROPERTY
(
VideoSurface
*
videoSurface
MEMBER
_videoSurface
CONSTANT
);
Q_PROPERTY
(
VideoReceiver
*
videoReceiver
MEMBER
_videoReceiver
CONSTANT
);
#if defined(QGC_GST_STREAMING)
bool
hasVideo
()
{
return
true
;
}
#else
bool
hasVideo
()
{
return
false
;
}
#endif
signals
:
void
showOptionsMenuChanged
()
;
private
:
VideoSurface
*
_videoSurface
;
VideoReceiver
*
_videoReceiver
;
};
#endif
src/FlightMap/FlightMap.qml
View file @
57c34c1c
...
...
@@ -55,6 +55,10 @@ Map {
property
real
lon
:
(
longitude
>=
-
180
&&
longitude
<=
180
)
?
longitude
:
0
property
real
lat
:
(
latitude
>=
-
90
&&
latitude
<=
90
)
?
latitude
:
0
readonly
property
real
zOrderTopMost
:
1000
///< z order for top most items, toolbar, main window sub view
readonly
property
real
zOrderWidgets
:
100
///< z order value to widgets, for example: zoom controls, hud widgetss
readonly
property
real
zOrderMapItems
:
50
///< z order value for map items, for example: mission item indicators
zoomLevel
:
18
center
:
QtPositioning
.
coordinate
(
lat
,
lon
)
gesture.flickDeceleration
:
3000
...
...
@@ -115,6 +119,7 @@ Map {
QGCButton
{
width
:
parent
.
_buttonWidth
z
:
zOrderWidgets
//iconSource: "/qmlimages/ZoomPlus.svg"
text
:
"
+
"
...
...
@@ -131,6 +136,7 @@ Map {
QGCButton
{
width
:
parent
.
_buttonWidth
z
:
zOrderWidgets
//iconSource: "/qmlimages/ZoomMinus.svg"
text
:
"
-
"
...
...
src/MissionEditor/MissionEditor.qml
View file @
57c34c1c
This diff is collapsed.
Click to expand it.
src/MissionEditor/MissionEditor.cc
→
src/MissionEditor/MissionEditor
Controller
.cc
View file @
57c34c1c
This diff is collapsed.
Click to expand it.
src/MissionEditor/MissionEditor.h
→
src/MissionEditor/MissionEditor
Controller
.h
View file @
57c34c1c
...
...
@@ -21,20 +21,21 @@ This file is part of the QGROUNDCONTROL project
======================================================================*/
#ifndef MissionEditor_H
#define MissionEditor_H
#ifndef MissionEditorController_H
#define MissionEditorController_H
#include <QObject>
#include "QGCQmlWidgetHolder.h"
#include "QmlObjectListModel.h"
#include "Vehicle.h"
class
MissionEditor
:
public
QGCQmlWidgetHolder
class
MissionEditor
Controller
:
public
QObject
{
Q_OBJECT
public:
MissionEditor
(
QWidget
*
parent
=
NULL
);
~
MissionEditor
();
MissionEditor
Controller
(
QWidget
*
parent
=
NULL
);
~
MissionEditor
Controller
();
Q_PROPERTY
(
QmlObjectListModel
*
missionItems
READ
missionItems
NOTIFY
missionItemsChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
waypointLines
READ
waypointLines
NOTIFY
waypointLinesChanged
)
...
...
src/QGCApplication.cc
View file @
57c34c1c
...
...
@@ -85,6 +85,11 @@
#include "FlightMapSettings.h"
#include "QGCQGeoCoordinate.h"
#include "CoordinateVector.h"
#include "MainToolBarController.h"
#include "MissionEditorController.h"
#include "FlightDisplayViewController.h"
#include "VideoSurface.h"
#include "VideoReceiver.h"
#ifndef __ios__
#include "SerialLink.h"
...
...
@@ -333,7 +338,9 @@ void QGCApplication::_initCommon(void)
qmlRegisterUncreatableType
<
QmlObjectListModel
>
(
"QGroundControl"
,
1
,
0
,
"QmlObjectListModel"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCQGeoCoordinate
>
(
"QGroundControl"
,
1
,
0
,
"QGCQGeoCoordinate"
,
"Reference only"
);
qmlRegisterUncreatableType
<
CoordinateVector
>
(
"QGroundControl"
,
1
,
0
,
"CoordinateVector"
,
"Reference only"
);
qmlRegisterUncreatableType
<
VideoSurface
>
(
"QGroundControl"
,
1
,
0
,
"VideoSurface"
,
"Reference only"
);
qmlRegisterUncreatableType
<
VideoReceiver
>
(
"QGroundControl"
,
1
,
0
,
"VideoReceiver"
,
"Reference only"
);
qmlRegisterType
<
ParameterEditorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ParameterEditorController"
);
qmlRegisterType
<
FlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FlightModesComponentController"
);
qmlRegisterType
<
AirframeComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AirframeComponentController"
);
...
...
@@ -341,7 +348,10 @@ void QGCApplication::_initCommon(void)
qmlRegisterType
<
PowerComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"PowerComponentController"
);
qmlRegisterType
<
RadioComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"RadioComponentController"
);
qmlRegisterType
<
ScreenToolsController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ScreenToolsController"
);
qmlRegisterType
<
MainToolBarController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"MainToolBarController"
);
qmlRegisterType
<
MissionEditorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"MissionEditorController"
);
qmlRegisterType
<
FlightDisplayViewController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FlightDisplayViewController"
);
#ifndef __mobile__
qmlRegisterType
<
ViewWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"CustomCommandWidgetController"
);
...
...
@@ -636,8 +646,9 @@ void QGCApplication::_createSingletons(void)
void
QGCApplication
::
_destroySingletons
(
void
)
{
if
(
MainWindow
::
instance
())
{
delete
MainWindow
::
instance
();
MainWindow
*
mainWindow
=
MainWindow
::
instance
();
if
(
mainWindow
)
{
delete
mainWindow
;
}
if
(
LinkManager
::
instance
(
true
/* nullOk */
))
{
...
...
@@ -804,7 +815,7 @@ void QGCApplication::showToolBarMessage(const QString& message)
{
MainWindow
*
mainWindow
=
MainWindow
::
instance
();
if
(
mainWindow
)
{
mainWindow
->
getMainToolBar
()
->
showToolB
arMessage
(
message
);
mainWindow
->
showToolb
arMessage
(
message
);
}
else
{
QGCMessageBox
::
information
(
""
,
message
);
}
...
...
src/QGCFileDialog.cc
View file @
57c34c1c
...
...
@@ -24,6 +24,7 @@
#include "QGCFileDialog.h"
#include "QGCApplication.h"
#include "MainWindow.h"
#ifdef QT_DEBUG
#ifndef __mobile__
#include "UnitTest.h"
...
...
src/QGCMessageBox.h
View file @
57c34c1c
...
...
@@ -28,10 +28,12 @@
#include "MainWindow.h"
#include "QGCApplication.h"
#ifdef QT_DEBUG
#ifndef __mobile__
#include "UnitTest.h"
#endif
#endif
/// @file
...
...
src/QGCQmlWidgetHolder.cpp
View file @
57c34c1c
...
...
@@ -31,6 +31,8 @@ QGCQmlWidgetHolder::QGCQmlWidgetHolder(const QString& title, QAction* action, QW
{
_ui
.
setupUi
(
this
);
layout
()
->
setContentsMargins
(
0
,
0
,
0
,
0
);
if
(
action
)
{
setWindowTitle
(
title
);
}
...
...
@@ -70,4 +72,4 @@ QQuickItem* QGCQmlWidgetHolder::getRootObject(void)
void
QGCQmlWidgetHolder
::
setResizeMode
(
QQuickWidget
::
ResizeMode
resizeMode
)
{
_ui
.
qmlWidget
->
setResizeMode
(
resizeMode
);
}
\ No newline at end of file
}
src/QmlControls/QGroundControl.Controls.qmldir
View file @
57c34c1c
...
...
@@ -34,3 +34,6 @@ MissionItemIndexLabel 1.0 MissionItemIndexLabel.qml
MissionItemSummary 1.0 MissionItemSummary.qml
MissionItemEditor 1.0 MissionItemEditor.qml
MainToolBar 1.0 MainToolBar.qml
FlightDisplayView 1.0 FlightDisplayView.qml
src/VehicleSetup/SetupView.cc
deleted
100644 → 0
View file @
5795e64c
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2015 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/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
#include "SetupView.h"
#include "AutoPilotPluginManager.h"
#include "VehicleComponent.h"
#include "QGCQmlWidgetHolder.h"
#include "MainWindow.h"
#include "QGCMessageBox.h"
#ifndef __mobile__
#include "FirmwareUpgradeController.h"
#endif
#include "ParameterEditorController.h"
#include <QQmlError>
#include <QQmlContext>
#include <QDebug>
SetupView
::
SetupView
(
QWidget
*
parent
)
:
QGCQmlWidgetHolder
(
QString
(),
NULL
,
parent
)
{
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SetupView.qml"
));
}
SetupView
::~
SetupView
()
{
}
#ifdef UNITTEST_BUILD
void
SetupView
::
showFirmware
(
void
)
{
#ifndef __mobile__
QVariant
returnedValue
;
bool
success
=
QMetaObject
::
invokeMethod
(
getRootObject
(),
"showFirmwarePanel"
,
Q_RETURN_ARG
(
QVariant
,
returnedValue
));
Q_ASSERT
(
success
);
Q_UNUSED
(
success
);
#endif
}
void
SetupView
::
showParameters
(
void
)
{
QVariant
returnedValue
;
bool
success
=
QMetaObject
::
invokeMethod
(
getRootObject
(),
"showParametersPanel"
,
Q_RETURN_ARG
(
QVariant
,
returnedValue
));
Q_ASSERT
(
success
);
Q_UNUSED
(
success
);
}
void
SetupView
::
showSummary
(
void
)
{
QVariant
returnedValue
;
bool
success
=
QMetaObject
::
invokeMethod
(
getRootObject
(),
"showSummaryPanel"
,
Q_RETURN_ARG
(
QVariant
,
returnedValue
));
Q_ASSERT
(
success
);
Q_UNUSED
(
success
);
}
void
SetupView
::
showVehicleComponentSetup
(
VehicleComponent
*
vehicleComponent
)
{
QVariant
returnedValue
;
bool
success
=
QMetaObject
::
invokeMethod
(
getRootObject
(),
"showVehicleComponentPanel"
,
Q_RETURN_ARG
(
QVariant
,
returnedValue
),
Q_ARG
(
QVariant
,
QVariant
::
fromValue
((
VehicleComponent
*
)
vehicleComponent
)));
Q_ASSERT
(
success
);
Q_UNUSED
(
success
);
}
#endif
src/VehicleSetup/SetupView.h
deleted
100644 → 0
View file @
5795e64c
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 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.