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
ab25a46a
Commit
ab25a46a
authored
Apr 04, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash on exit due to bad parenting/shutdown sequence
parent
4928cccf
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
92 additions
and
109 deletions
+92
-109
Fact.cc
src/FactSystem/Fact.cc
+6
-0
FactSystem.cc
src/FactSystem/FactSystem.cc
+2
-2
FactSystem.h
src/FactSystem/FactSystem.h
+1
-1
FirmwarePluginManager.cc
src/FirmwarePlugin/FirmwarePluginManager.cc
+2
-2
FirmwarePluginManager.h
src/FirmwarePlugin/FirmwarePluginManager.h
+1
-1
VideoManager.cc
src/FlightDisplay/VideoManager.cc
+2
-2
VideoManager.h
src/FlightDisplay/VideoManager.h
+1
-1
FollowMe.cc
src/FollowMe/FollowMe.cc
+2
-7
FollowMe.h
src/FollowMe/FollowMe.h
+1
-2
GAudioOutput.cc
src/GAudioOutput.cc
+2
-2
GAudioOutput.h
src/GAudioOutput.h
+1
-1
JoystickManager.cc
src/Joystick/JoystickManager.cc
+2
-2
JoystickManager.h
src/Joystick/JoystickManager.h
+1
-1
MissionCommandTree.cc
src/MissionManager/MissionCommandTree.cc
+2
-2
MissionCommandTree.h
src/MissionManager/MissionCommandTree.h
+1
-1
PositionManager.cpp
src/PositionManager/PositionManager.cpp
+4
-4
PositionManager.h
src/PositionManager/PositionManager.h
+1
-1
QGCApplication.cc
src/QGCApplication.cc
+1
-1
QGCToolbox.cc
src/QGCToolbox.cc
+22
-40
QGCToolbox.h
src/QGCToolbox.h
+7
-6
QGCImageProvider.cc
src/QmlControls/QGCImageProvider.cc
+2
-2
QGCImageProvider.h
src/QmlControls/QGCImageProvider.h
+1
-1
QGroundControlQmlGlobal.cc
src/QmlControls/QGroundControlQmlGlobal.cc
+2
-2
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+1
-1
QGCMapEngineManager.cc
src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc
+2
-2
QGCMapEngineManager.h
src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h
+1
-1
SettingsManager.cc
src/Settings/SettingsManager.cc
+2
-2
SettingsManager.h
src/Settings/SettingsManager.h
+1
-1
MAVLinkLogManager.cc
src/Vehicle/MAVLinkLogManager.cc
+2
-2
MAVLinkLogManager.h
src/Vehicle/MAVLinkLogManager.h
+1
-1
MultiVehicleManager.cc
src/Vehicle/MultiVehicleManager.cc
+2
-2
MultiVehicleManager.h
src/Vehicle/MultiVehicleManager.h
+1
-1
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+2
-2
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+1
-1
LinkManager.cc
src/comm/LinkManager.cc
+2
-2
LinkManager.h
src/comm/LinkManager.h
+1
-1
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+2
-2
MAVLinkProtocol.h
src/comm/MAVLinkProtocol.h
+1
-1
UASMessageHandler.cc
src/uas/UASMessageHandler.cc
+2
-2
UASMessageHandler.h
src/uas/UASMessageHandler.h
+1
-1
No files found.
src/FactSystem/Fact.cc
View file @
ab25a46a
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
#include <QtQml>
#include <QtQml>
#include <QQmlEngine>
Fact
::
Fact
(
QObject
*
parent
)
Fact
::
Fact
(
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
...
@@ -27,6 +28,9 @@ Fact::Fact(QObject* parent)
...
@@ -27,6 +28,9 @@ Fact::Fact(QObject* parent)
{
{
FactMetaData
*
metaData
=
new
FactMetaData
(
_type
,
this
);
FactMetaData
*
metaData
=
new
FactMetaData
(
_type
,
this
);
setMetaData
(
metaData
);
setMetaData
(
metaData
);
// Better sage than sorry on object ownership
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
}
Fact
::
Fact
(
int
componentId
,
QString
name
,
FactMetaData
::
ValueType_t
type
,
QObject
*
parent
)
Fact
::
Fact
(
int
componentId
,
QString
name
,
FactMetaData
::
ValueType_t
type
,
QObject
*
parent
)
...
@@ -41,12 +45,14 @@ Fact::Fact(int componentId, QString name, FactMetaData::ValueType_t type, QObjec
...
@@ -41,12 +45,14 @@ Fact::Fact(int componentId, QString name, FactMetaData::ValueType_t type, QObjec
{
{
FactMetaData
*
metaData
=
new
FactMetaData
(
_type
,
this
);
FactMetaData
*
metaData
=
new
FactMetaData
(
_type
,
this
);
setMetaData
(
metaData
);
setMetaData
(
metaData
);
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
}
Fact
::
Fact
(
const
Fact
&
other
,
QObject
*
parent
)
Fact
::
Fact
(
const
Fact
&
other
,
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
{
{
*
this
=
other
;
*
this
=
other
;
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
}
}
const
Fact
&
Fact
::
operator
=
(
const
Fact
&
other
)
const
Fact
&
Fact
::
operator
=
(
const
Fact
&
other
)
...
...
src/FactSystem/FactSystem.cc
View file @
ab25a46a
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
const
char
*
FactSystem
::
_factSystemQmlUri
=
"QGroundControl.FactSystem"
;
const
char
*
FactSystem
::
_factSystemQmlUri
=
"QGroundControl.FactSystem"
;
FactSystem
::
FactSystem
(
QGCApplication
*
app
)
FactSystem
::
FactSystem
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
{
{
}
}
...
...
src/FactSystem/FactSystem.h
View file @
ab25a46a
...
@@ -31,7 +31,7 @@ class FactSystem : public QGCTool
...
@@ -31,7 +31,7 @@ class FactSystem : public QGCTool
public:
public:
/// All access to FactSystem is through FactSystem::instance, so constructor is private
/// All access to FactSystem is through FactSystem::instance, so constructor is private
FactSystem
(
QGCApplication
*
app
);
FactSystem
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
// Override from QGCTool
// Override from QGCTool
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
src/FirmwarePlugin/FirmwarePluginManager.cc
View file @
ab25a46a
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
#include "FirmwarePluginManager.h"
#include "FirmwarePluginManager.h"
#include "FirmwarePlugin.h"
#include "FirmwarePlugin.h"
FirmwarePluginManager
::
FirmwarePluginManager
(
QGCApplication
*
app
)
FirmwarePluginManager
::
FirmwarePluginManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_genericFirmwarePlugin
(
NULL
)
,
_genericFirmwarePlugin
(
NULL
)
{
{
...
...
src/FirmwarePlugin/FirmwarePluginManager.h
View file @
ab25a46a
...
@@ -29,7 +29,7 @@ class FirmwarePluginManager : public QGCTool
...
@@ -29,7 +29,7 @@ class FirmwarePluginManager : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
FirmwarePluginManager
(
QGCApplication
*
app
);
FirmwarePluginManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
FirmwarePluginManager
();
~
FirmwarePluginManager
();
/// Returns list of firmwares which are supported by the system
/// Returns list of firmwares which are supported by the system
...
...
src/FlightDisplay/VideoManager.cc
View file @
ab25a46a
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
QGC_LOGGING_CATEGORY
(
VideoManagerLog
,
"VideoManagerLog"
)
QGC_LOGGING_CATEGORY
(
VideoManagerLog
,
"VideoManagerLog"
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
VideoManager
::
VideoManager
(
QGCApplication
*
app
)
VideoManager
::
VideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_videoSurface
(
NULL
)
,
_videoSurface
(
NULL
)
,
_videoReceiver
(
NULL
)
,
_videoReceiver
(
NULL
)
,
_videoRunning
(
false
)
,
_videoRunning
(
false
)
...
...
src/FlightDisplay/VideoManager.h
View file @
ab25a46a
...
@@ -29,7 +29,7 @@ class VideoManager : public QGCTool
...
@@ -29,7 +29,7 @@ class VideoManager : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
VideoManager
(
QGCApplication
*
app
);
VideoManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
VideoManager
();
~
VideoManager
();
Q_PROPERTY
(
bool
hasVideo
READ
hasVideo
NOTIFY
hasVideoChanged
)
Q_PROPERTY
(
bool
hasVideo
READ
hasVideo
NOTIFY
hasVideoChanged
)
...
...
src/FollowMe/FollowMe.cc
View file @
ab25a46a
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
#include "Vehicle.h"
#include "Vehicle.h"
#include "PositionManager.h"
#include "PositionManager.h"
FollowMe
::
FollowMe
(
QGCApplication
*
app
)
FollowMe
::
FollowMe
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
),
estimatation_capabilities
(
0
)
:
QGCTool
(
app
,
toolbox
),
estimatation_capabilities
(
0
)
{
{
memset
(
&
_motionReport
,
0
,
sizeof
(
motionReport_s
));
memset
(
&
_motionReport
,
0
,
sizeof
(
motionReport_s
));
runTime
.
start
();
runTime
.
start
();
...
@@ -27,11 +27,6 @@ FollowMe::FollowMe(QGCApplication* app)
...
@@ -27,11 +27,6 @@ FollowMe::FollowMe(QGCApplication* app)
connect
(
&
_gcsMotionReportTimer
,
&
QTimer
::
timeout
,
this
,
&
FollowMe
::
_sendGCSMotionReport
);
connect
(
&
_gcsMotionReportTimer
,
&
QTimer
::
timeout
,
this
,
&
FollowMe
::
_sendGCSMotionReport
);
}
}
FollowMe
::~
FollowMe
()
{
_disable
();
}
void
FollowMe
::
followMeHandleManager
(
const
QString
&
)
void
FollowMe
::
followMeHandleManager
(
const
QString
&
)
{
{
QmlObjectListModel
&
vehicles
=
*
_toolbox
->
multiVehicleManager
()
->
vehicles
();
QmlObjectListModel
&
vehicles
=
*
_toolbox
->
multiVehicleManager
()
->
vehicles
();
...
...
src/FollowMe/FollowMe.h
View file @
ab25a46a
...
@@ -27,8 +27,7 @@ class FollowMe : public QGCTool
...
@@ -27,8 +27,7 @@ class FollowMe : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
FollowMe
(
QGCApplication
*
app
);
FollowMe
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
FollowMe
();
public
slots
:
public
slots
:
void
followMeHandleManager
(
const
QString
&
);
void
followMeHandleManager
(
const
QString
&
);
...
...
src/GAudioOutput.cc
View file @
ab25a46a
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
#include <QtAndroidExtras/QAndroidJniObject>
#include <QtAndroidExtras/QAndroidJniObject>
#endif
#endif
GAudioOutput
::
GAudioOutput
(
QGCApplication
*
app
)
GAudioOutput
::
GAudioOutput
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
#ifndef __android__
#ifndef __android__
,
thread
(
new
QThread
())
,
thread
(
new
QThread
())
,
worker
(
new
QGCAudioWorker
())
,
worker
(
new
QGCAudioWorker
())
...
...
src/GAudioOutput.h
View file @
ab25a46a
...
@@ -39,7 +39,7 @@ class GAudioOutput : public QGCTool
...
@@ -39,7 +39,7 @@ class GAudioOutput : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
GAudioOutput
(
QGCApplication
*
app
);
GAudioOutput
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
GAudioOutput
();
~
GAudioOutput
();
/** @brief List available voices */
/** @brief List available voices */
...
...
src/Joystick/JoystickManager.cc
View file @
ab25a46a
...
@@ -27,8 +27,8 @@ QGC_LOGGING_CATEGORY(JoystickManagerLog, "JoystickManagerLog")
...
@@ -27,8 +27,8 @@ QGC_LOGGING_CATEGORY(JoystickManagerLog, "JoystickManagerLog")
const
char
*
JoystickManager
::
_settingsGroup
=
"JoystickManager"
;
const
char
*
JoystickManager
::
_settingsGroup
=
"JoystickManager"
;
const
char
*
JoystickManager
::
_settingsKeyActiveJoystick
=
"ActiveJoystick"
;
const
char
*
JoystickManager
::
_settingsKeyActiveJoystick
=
"ActiveJoystick"
;
JoystickManager
::
JoystickManager
(
QGCApplication
*
app
)
JoystickManager
::
JoystickManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_activeJoystick
(
NULL
)
,
_activeJoystick
(
NULL
)
,
_multiVehicleManager
(
NULL
)
,
_multiVehicleManager
(
NULL
)
{
{
...
...
src/Joystick/JoystickManager.h
View file @
ab25a46a
...
@@ -25,7 +25,7 @@ class JoystickManager : public QGCTool
...
@@ -25,7 +25,7 @@ class JoystickManager : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
JoystickManager
(
QGCApplication
*
app
);
JoystickManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
JoystickManager
();
~
JoystickManager
();
/// List of available joysticks
/// List of available joysticks
...
...
src/MissionManager/MissionCommandTree.cc
View file @
ab25a46a
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#include <QQmlEngine>
#include <QQmlEngine>
MissionCommandTree
::
MissionCommandTree
(
QGCApplication
*
app
,
bool
unitTest
)
MissionCommandTree
::
MissionCommandTree
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
,
bool
unitTest
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_allCommandsCategory
(
tr
(
"All commands"
))
,
_allCommandsCategory
(
tr
(
"All commands"
))
,
_settingsManager
(
NULL
)
,
_settingsManager
(
NULL
)
,
_unitTest
(
unitTest
)
,
_unitTest
(
unitTest
)
...
...
src/MissionManager/MissionCommandTree.h
View file @
ab25a46a
...
@@ -48,7 +48,7 @@ class MissionCommandTree : public QGCTool
...
@@ -48,7 +48,7 @@ class MissionCommandTree : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
MissionCommandTree
(
QGCApplication
*
app
,
bool
unitTest
=
false
);
MissionCommandTree
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
,
bool
unitTest
=
false
);
/// Returns the friendly name for the specified command
/// Returns the friendly name for the specified command
QString
friendlyName
(
MAV_CMD
command
);
QString
friendlyName
(
MAV_CMD
command
);
...
...
src/PositionManager/PositionManager.cpp
View file @
ab25a46a
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "QGCCorePlugin.h"
#include "QGCCorePlugin.h"
QGCPositionManager
::
QGCPositionManager
(
QGCApplication
*
app
)
:
QGCPositionManager
::
QGCPositionManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
QGCTool
(
app
),
:
QGCTool
(
app
,
toolbox
)
_updateInterval
(
0
),
,
_updateInterval
(
0
)
_currentSource
(
nullptr
)
,
_currentSource
(
nullptr
)
{
{
}
}
...
...
src/PositionManager/PositionManager.h
View file @
ab25a46a
...
@@ -21,7 +21,7 @@ class QGCPositionManager : public QGCTool {
...
@@ -21,7 +21,7 @@ class QGCPositionManager : public QGCTool {
public:
public:
QGCPositionManager
(
QGCApplication
*
app
);
QGCPositionManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
QGCPositionManager
();
~
QGCPositionManager
();
enum
QGCPositionSource
{
enum
QGCPositionSource
{
...
...
src/QGCApplication.cc
View file @
ab25a46a
...
@@ -133,7 +133,7 @@ static QObject* mavlinkQmlSingletonFactory(QQmlEngine*, QJSEngine*)
...
@@ -133,7 +133,7 @@ static QObject* mavlinkQmlSingletonFactory(QQmlEngine*, QJSEngine*)
static
QObject
*
qgroundcontrolQmlGlobalSingletonFactory
(
QQmlEngine
*
,
QJSEngine
*
)
static
QObject
*
qgroundcontrolQmlGlobalSingletonFactory
(
QQmlEngine
*
,
QJSEngine
*
)
{
{
// We create this object as a QGCTool even though it isn't in the toolbox
// We create this object as a QGCTool even though it isn't in the toolbox
QGroundControlQmlGlobal
*
qmlGlobal
=
new
QGroundControlQmlGlobal
(
qgcApp
());
QGroundControlQmlGlobal
*
qmlGlobal
=
new
QGroundControlQmlGlobal
(
qgcApp
()
,
qgcApp
()
->
toolbox
()
);
qmlGlobal
->
setToolbox
(
qgcApp
()
->
toolbox
());
qmlGlobal
->
setToolbox
(
qgcApp
()
->
toolbox
());
return
qmlGlobal
;
return
qmlGlobal
;
...
...
src/QGCToolbox.cc
View file @
ab25a46a
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "QGCCorePlugin.h"
#include "QGCCorePlugin.h"
#include "QGCOptions.h"
#include "QGCOptions.h"
#include "SettingsManager.h"
#include "SettingsManager.h"
#include "QGCApplication.h"
#if defined(QGC_CUSTOM_BUILD)
#if defined(QGC_CUSTOM_BUILD)
#include CUSTOMHEADER
#include CUSTOMHEADER
...
@@ -57,28 +58,28 @@ QGCToolbox::QGCToolbox(QGCApplication* app)
...
@@ -57,28 +58,28 @@ QGCToolbox::QGCToolbox(QGCApplication* app)
,
_settingsManager
(
NULL
)
,
_settingsManager
(
NULL
)
{
{
// SettingsManager must be first so settings are available to any subsequent tools
// SettingsManager must be first so settings are available to any subsequent tools
_settingsManager
=
new
SettingsManager
(
app
);
_settingsManager
=
new
SettingsManager
(
app
,
this
);
//-- Scan and load plugins
//-- Scan and load plugins
_scanAndLoadPlugins
(
app
);
_scanAndLoadPlugins
(
app
);
_audioOutput
=
new
GAudioOutput
(
app
);
_audioOutput
=
new
GAudioOutput
(
app
,
this
);
_factSystem
=
new
FactSystem
(
app
);
_factSystem
=
new
FactSystem
(
app
,
this
);
_firmwarePluginManager
=
new
FirmwarePluginManager
(
app
);
_firmwarePluginManager
=
new
FirmwarePluginManager
(
app
,
this
);
#ifndef __mobile__
#ifndef __mobile__
_gpsManager
=
new
GPSManager
(
app
);
_gpsManager
=
new
GPSManager
(
app
,
this
);
#endif
#endif
_imageProvider
=
new
QGCImageProvider
(
app
);
_imageProvider
=
new
QGCImageProvider
(
app
,
this
);
_joystickManager
=
new
JoystickManager
(
app
);
_joystickManager
=
new
JoystickManager
(
app
,
this
);
_linkManager
=
new
LinkManager
(
app
);
_linkManager
=
new
LinkManager
(
app
,
this
);
_mavlinkProtocol
=
new
MAVLinkProtocol
(
app
);
_mavlinkProtocol
=
new
MAVLinkProtocol
(
app
,
this
);
_missionCommandTree
=
new
MissionCommandTree
(
app
);
_missionCommandTree
=
new
MissionCommandTree
(
app
,
this
);
_multiVehicleManager
=
new
MultiVehicleManager
(
app
);
_multiVehicleManager
=
new
MultiVehicleManager
(
app
,
this
);
_mapEngineManager
=
new
QGCMapEngineManager
(
app
);
_mapEngineManager
=
new
QGCMapEngineManager
(
app
,
this
);
_uasMessageHandler
=
new
UASMessageHandler
(
app
);
_uasMessageHandler
=
new
UASMessageHandler
(
app
,
this
);
_qgcPositionManager
=
new
QGCPositionManager
(
app
);
_qgcPositionManager
=
new
QGCPositionManager
(
app
,
this
);
_followMe
=
new
FollowMe
(
app
);
_followMe
=
new
FollowMe
(
app
,
this
);
_videoManager
=
new
VideoManager
(
app
);
_videoManager
=
new
VideoManager
(
app
,
this
);
_mavlinkLogManager
=
new
MAVLinkLogManager
(
app
);
_mavlinkLogManager
=
new
MAVLinkLogManager
(
app
,
this
);
}
}
void
QGCToolbox
::
setChildToolboxes
(
void
)
void
QGCToolbox
::
setChildToolboxes
(
void
)
...
@@ -107,40 +108,21 @@ void QGCToolbox::setChildToolboxes(void)
...
@@ -107,40 +108,21 @@ void QGCToolbox::setChildToolboxes(void)
_mavlinkLogManager
->
setToolbox
(
this
);
_mavlinkLogManager
->
setToolbox
(
this
);
}
}
QGCToolbox
::~
QGCToolbox
()
{
delete
_videoManager
;
delete
_mavlinkLogManager
;
delete
_audioOutput
;
delete
_factSystem
;
delete
_firmwarePluginManager
;
delete
_joystickManager
;
delete
_linkManager
;
delete
_mavlinkProtocol
;
delete
_missionCommandTree
;
delete
_mapEngineManager
;
delete
_multiVehicleManager
;
delete
_uasMessageHandler
;
delete
_followMe
;
delete
_qgcPositionManager
;
delete
_corePlugin
;
}
void
QGCToolbox
::
_scanAndLoadPlugins
(
QGCApplication
*
app
)
void
QGCToolbox
::
_scanAndLoadPlugins
(
QGCApplication
*
app
)
{
{
#if defined (QGC_CUSTOM_BUILD)
#if defined (QGC_CUSTOM_BUILD)
//-- Create custom plugin (Static)
//-- Create custom plugin (Static)
_corePlugin
=
(
QGCCorePlugin
*
)
new
CUSTOMCLASS
(
app
);
_corePlugin
=
(
QGCCorePlugin
*
)
new
CUSTOMCLASS
(
app
,
app
->
toolbox
()
);
if
(
_corePlugin
)
{
if
(
_corePlugin
)
{
return
;
return
;
}
}
#endif
#endif
//-- No plugins found, use default instance
//-- No plugins found, use default instance
_corePlugin
=
new
QGCCorePlugin
(
app
);
_corePlugin
=
new
QGCCorePlugin
(
app
,
app
->
toolbox
()
);
}
}
QGCTool
::
QGCTool
(
QGCApplication
*
app
)
QGCTool
::
QGCTool
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QObject
(
(
QObject
*
)
app
)
:
QObject
(
toolbox
)
,
_app
(
app
)
,
_app
(
app
)
,
_toolbox
(
NULL
)
,
_toolbox
(
NULL
)
{
{
...
...
src/QGCToolbox.h
View file @
ab25a46a
...
@@ -34,11 +34,11 @@ class QGCCorePlugin;
...
@@ -34,11 +34,11 @@ class QGCCorePlugin;
class
SettingsManager
;
class
SettingsManager
;
/// This is used to manage all of our top level services/tools
/// This is used to manage all of our top level services/tools
class
QGCToolbox
{
class
QGCToolbox
:
public
QObject
{
Q_OBJECT
public:
public:
QGCToolbox
(
QGCApplication
*
app
);
QGCToolbox
(
QGCApplication
*
app
);
~
QGCToolbox
();
FirmwarePluginManager
*
firmwarePluginManager
(
void
)
{
return
_firmwarePluginManager
;
}
FirmwarePluginManager
*
firmwarePluginManager
(
void
)
{
return
_firmwarePluginManager
;
}
GAudioOutput
*
audioOutput
(
void
)
{
return
_audioOutput
;
}
GAudioOutput
*
audioOutput
(
void
)
{
return
_audioOutput
;
}
...
@@ -95,11 +95,12 @@ class QGCTool : public QObject {
...
@@ -95,11 +95,12 @@ class QGCTool : public QObject {
Q_OBJECT
Q_OBJECT
public:
public:
// All tools
are parented to QGCAppliation and go through a two phase creation. First all tools are newed,
// All tools
must be parented to the QGCToolbox and go through a two phase creation. In the constructor the toolbox
//
and then setToolbox is called on all tools. The prevents creating an circular dependencies at constructor
//
should only be passed to QGCTool constructor for correct parenting. It should not be referenced or set in the
//
time
.
//
protected member. Then in the second phase of setToolbox calls is where you can reference the toolbox
.
QGCTool
(
QGCApplication
*
app
);
QGCTool
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
// If you override this method, you must call the base class.
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
protected:
protected:
...
...
src/QmlControls/QGCImageProvider.cc
View file @
ab25a46a
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
#include <QPainter>
#include <QPainter>
#include <QFont>
#include <QFont>
QGCImageProvider
::
QGCImageProvider
(
QGCApplication
*
app
)
QGCImageProvider
::
QGCImageProvider
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
QQuickImageProvider
(
QQmlImageProviderBase
::
Image
)
,
QQuickImageProvider
(
QQmlImageProviderBase
::
Image
)
{
{
}
}
...
...
src/QmlControls/QGCImageProvider.h
View file @
ab25a46a
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
class
QGCImageProvider
:
public
QGCTool
,
public
QQuickImageProvider
class
QGCImageProvider
:
public
QGCTool
,
public
QQuickImageProvider
{
{
public:
public:
QGCImageProvider
(
QGCApplication
*
app
);
QGCImageProvider
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
QGCImageProvider
();
~
QGCImageProvider
();
QImage
requestImage
(
const
QString
&
id
,
QSize
*
size
,
const
QSize
&
requestedSize
);
QImage
requestImage
(
const
QString
&
id
,
QSize
*
size
,
const
QSize
&
requestedSize
);
void
setImage
(
QImage
*
pImage
,
int
id
=
0
);
void
setImage
(
QImage
*
pImage
,
int
id
=
0
);
...
...
src/QmlControls/QGroundControlQmlGlobal.cc
View file @
ab25a46a
...
@@ -24,8 +24,8 @@ const char* QGroundControlQmlGlobal::_flightMapPositionLatitudeSettingsKey =
...
@@ -24,8 +24,8 @@ const char* QGroundControlQmlGlobal::_flightMapPositionLatitudeSettingsKey =
const
char
*
QGroundControlQmlGlobal
::
_flightMapPositionLongitudeSettingsKey
=
"Longitude"
;
const
char
*
QGroundControlQmlGlobal
::
_flightMapPositionLongitudeSettingsKey
=
"Longitude"
;
const
char
*
QGroundControlQmlGlobal
::
_flightMapZoomSettingsKey
=
"FlightMapZoom"
;
const
char
*
QGroundControlQmlGlobal
::
_flightMapZoomSettingsKey
=
"FlightMapZoom"
;
QGroundControlQmlGlobal
::
QGroundControlQmlGlobal
(
QGCApplication
*
app
)
QGroundControlQmlGlobal
::
QGroundControlQmlGlobal
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_flightMapInitialZoom
(
14.7
)
// About 500 meter scale
,
_flightMapInitialZoom
(
14.7
)
// About 500 meter scale
,
_linkManager
(
NULL
)
,
_linkManager
(
NULL
)
,
_multiVehicleManager
(
NULL
)
,
_multiVehicleManager
(
NULL
)
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
ab25a46a
...
@@ -34,7 +34,7 @@ class QGroundControlQmlGlobal : public QGCTool
...
@@ -34,7 +34,7 @@ class QGroundControlQmlGlobal : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
QGroundControlQmlGlobal
(
QGCApplication
*
app
);
QGroundControlQmlGlobal
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
QGroundControlQmlGlobal
();
~
QGroundControlQmlGlobal
();
Q_PROPERTY
(
QString
appName
READ
appName
CONSTANT
)
Q_PROPERTY
(
QString
appName
READ
appName
CONSTANT
)
...
...
src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc
View file @
ab25a46a
...
@@ -30,8 +30,8 @@ QGC_LOGGING_CATEGORY(QGCMapEngineManagerLog, "QGCMapEngineManagerLog")
...
@@ -30,8 +30,8 @@ QGC_LOGGING_CATEGORY(QGCMapEngineManagerLog, "QGCMapEngineManagerLog")
static
const
char
*
kQmlOfflineMapKeyName
=
"QGCOfflineMap"
;
static
const
char
*
kQmlOfflineMapKeyName
=
"QGCOfflineMap"
;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
QGCMapEngineManager
::
QGCMapEngineManager
(
QGCApplication
*
app
)
QGCMapEngineManager
::
QGCMapEngineManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_topleftLat
(
0.0
)
,
_topleftLat
(
0.0
)
,
_topleftLon
(
0.0
)
,
_topleftLon
(
0.0
)
,
_bottomRightLat
(
0.0
)
,
_bottomRightLat
(
0.0
)
...
...
src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h
View file @
ab25a46a
...
@@ -26,7 +26,7 @@ class QGCMapEngineManager : public QGCTool
...
@@ -26,7 +26,7 @@ class QGCMapEngineManager : public QGCTool
{
{
Q_OBJECT
Q_OBJECT
public:
public:
QGCMapEngineManager
(
QGCApplication
*
app
);
QGCMapEngineManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
QGCMapEngineManager
();
~
QGCMapEngineManager
();
enum
ImportAction
{
enum
ImportAction
{
...
...
src/Settings/SettingsManager.cc
View file @
ab25a46a
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
#include <QQmlEngine>
#include <QQmlEngine>
#include <QtQml>
#include <QtQml>
SettingsManager
::
SettingsManager
(
QGCApplication
*
app
)
SettingsManager
::
SettingsManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_appSettings
(
NULL
)
,
_appSettings
(
NULL
)
,
_unitsSettings
(
NULL
)
,
_unitsSettings
(
NULL
)
,
_autoConnectSettings
(
NULL
)
,
_autoConnectSettings
(
NULL
)
...
...
src/Settings/SettingsManager.h
View file @
ab25a46a
...
@@ -28,7 +28,7 @@ class SettingsManager : public QGCTool
...
@@ -28,7 +28,7 @@ class SettingsManager : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
SettingsManager
(
QGCApplication
*
app
);
SettingsManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
Q_PROPERTY
(
QObject
*
appSettings
READ
appSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
appSettings
READ
appSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
unitsSettings
READ
unitsSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
unitsSettings
READ
unitsSettings
CONSTANT
)
...
...
src/Vehicle/MAVLinkLogManager.cc
View file @
ab25a46a
...
@@ -295,8 +295,8 @@ MAVLinkLogProcessor::processStreamData(uint16_t sequence, uint8_t first_message,
...
@@ -295,8 +295,8 @@ MAVLinkLogProcessor::processStreamData(uint16_t sequence, uint8_t first_message,
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
MAVLinkLogManager
::
MAVLinkLogManager
(
QGCApplication
*
app
)
MAVLinkLogManager
::
MAVLinkLogManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_enableAutoUpload
(
true
)
,
_enableAutoUpload
(
true
)
,
_enableAutoStart
(
false
)
,
_enableAutoStart
(
false
)
,
_nam
(
NULL
)
,
_nam
(
NULL
)
...
...
src/Vehicle/MAVLinkLogManager.h
View file @
ab25a46a
...
@@ -106,7 +106,7 @@ class MAVLinkLogManager : public QGCTool
...
@@ -106,7 +106,7 @@ class MAVLinkLogManager : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
MAVLinkLogManager
(
QGCApplication
*
app
);
MAVLinkLogManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
MAVLinkLogManager
();
~
MAVLinkLogManager
();
Q_PROPERTY
(
QString
emailAddress
READ
emailAddress
WRITE
setEmailAddress
NOTIFY
emailAddressChanged
)
Q_PROPERTY
(
QString
emailAddress
READ
emailAddress
WRITE
setEmailAddress
NOTIFY
emailAddressChanged
)
...
...
src/Vehicle/MultiVehicleManager.cc
View file @
ab25a46a
...
@@ -27,8 +27,8 @@ QGC_LOGGING_CATEGORY(MultiVehicleManagerLog, "MultiVehicleManagerLog")
...
@@ -27,8 +27,8 @@ QGC_LOGGING_CATEGORY(MultiVehicleManagerLog, "MultiVehicleManagerLog")
const
char
*
MultiVehicleManager
::
_gcsHeartbeatEnabledKey
=
"gcsHeartbeatEnabled"
;
const
char
*
MultiVehicleManager
::
_gcsHeartbeatEnabledKey
=
"gcsHeartbeatEnabled"
;
MultiVehicleManager
::
MultiVehicleManager
(
QGCApplication
*
app
)
MultiVehicleManager
::
MultiVehicleManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_activeVehicleAvailable
(
false
)
,
_activeVehicleAvailable
(
false
)
,
_parameterReadyVehicleAvailable
(
false
)
,
_parameterReadyVehicleAvailable
(
false
)
,
_activeVehicle
(
NULL
)
,
_activeVehicle
(
NULL
)
...
...
src/Vehicle/MultiVehicleManager.h
View file @
ab25a46a
...
@@ -33,7 +33,7 @@ class MultiVehicleManager : public QGCTool
...
@@ -33,7 +33,7 @@ class MultiVehicleManager : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
MultiVehicleManager
(
QGCApplication
*
app
);
MultiVehicleManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
Q_INVOKABLE
void
saveSetting
(
const
QString
&
key
,
const
QString
&
value
);
Q_INVOKABLE
void
saveSetting
(
const
QString
&
key
,
const
QString
&
value
);
Q_INVOKABLE
QString
loadSetting
(
const
QString
&
key
,
const
QString
&
defaultValue
);
Q_INVOKABLE
QString
loadSetting
(
const
QString
&
key
,
const
QString
&
defaultValue
);
...
...
src/api/QGCCorePlugin.cc
View file @
ab25a46a
...
@@ -79,8 +79,8 @@ QGCCorePlugin::~QGCCorePlugin()
...
@@ -79,8 +79,8 @@ QGCCorePlugin::~QGCCorePlugin()
}
}
}
}
QGCCorePlugin
::
QGCCorePlugin
(
QGCApplication
*
app
)
QGCCorePlugin
::
QGCCorePlugin
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_showTouchAreas
(
false
)
,
_showTouchAreas
(
false
)
,
_showAdvancedUI
(
true
)
,
_showAdvancedUI
(
true
)
{
{
...
...
src/api/QGCCorePlugin.h
View file @
ab25a46a
...
@@ -31,7 +31,7 @@ class QGCCorePlugin : public QGCTool
...
@@ -31,7 +31,7 @@ class QGCCorePlugin : public QGCTool
{
{
Q_OBJECT
Q_OBJECT
public:
public:
QGCCorePlugin
(
QGCApplication
*
app
);
QGCCorePlugin
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
QGCCorePlugin
();
~
QGCCorePlugin
();
Q_PROPERTY
(
QVariantList
settingsPages
READ
settingsPages
NOTIFY
settingsPagesChanged
)
Q_PROPERTY
(
QVariantList
settingsPages
READ
settingsPages
NOTIFY
settingsPagesChanged
)
...
...
src/comm/LinkManager.cc
View file @
ab25a46a
...
@@ -42,8 +42,8 @@ const int LinkManager::_autoconnectConnectDelayMSecs = 6000;
...
@@ -42,8 +42,8 @@ const int LinkManager::_autoconnectConnectDelayMSecs = 6000;
const
int
LinkManager
::
_autoconnectConnectDelayMSecs
=
1000
;
const
int
LinkManager
::
_autoconnectConnectDelayMSecs
=
1000
;
#endif
#endif
LinkManager
::
LinkManager
(
QGCApplication
*
app
)
LinkManager
::
LinkManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_configUpdateSuspended
(
false
)
,
_configUpdateSuspended
(
false
)
,
_configurationsLoaded
(
false
)
,
_configurationsLoaded
(
false
)
,
_connectionsSuspended
(
false
)
,
_connectionsSuspended
(
false
)
...
...
src/comm/LinkManager.h
View file @
ab25a46a
...
@@ -58,7 +58,7 @@ class LinkManager : public QGCTool
...
@@ -58,7 +58,7 @@ class LinkManager : public QGCTool
friend
class
LinkManagerTest
;
friend
class
LinkManagerTest
;
public:
public:
LinkManager
(
QGCApplication
*
app
);
LinkManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
LinkManager
();
~
LinkManager
();
Q_PROPERTY
(
bool
isBluetoothAvailable
READ
isBluetoothAvailable
CONSTANT
)
Q_PROPERTY
(
bool
isBluetoothAvailable
READ
isBluetoothAvailable
CONSTANT
)
...
...
src/comm/MAVLinkProtocol.cc
View file @
ab25a46a
...
@@ -50,8 +50,8 @@ const char* MAVLinkProtocol::_logFileExtension = "mavlink"; ///< Ext
...
@@ -50,8 +50,8 @@ const char* MAVLinkProtocol::_logFileExtension = "mavlink"; ///< Ext
* The default constructor will create a new MAVLink object sending heartbeats at
* The default constructor will create a new MAVLink object sending heartbeats at
* the MAVLINK_HEARTBEAT_DEFAULT_RATE to all connected links.
* the MAVLINK_HEARTBEAT_DEFAULT_RATE to all connected links.
*/
*/
MAVLinkProtocol
::
MAVLinkProtocol
(
QGCApplication
*
app
)
MAVLinkProtocol
::
MAVLinkProtocol
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
m_enable_version_check
(
true
)
,
m_enable_version_check
(
true
)
,
versionMismatchIgnore
(
false
)
,
versionMismatchIgnore
(
false
)
,
systemId
(
255
)
,
systemId
(
255
)
...
...
src/comm/MAVLinkProtocol.h
View file @
ab25a46a
...
@@ -43,7 +43,7 @@ class MAVLinkProtocol : public QGCTool
...
@@ -43,7 +43,7 @@ class MAVLinkProtocol : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
MAVLinkProtocol
(
QGCApplication
*
app
);
MAVLinkProtocol
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
MAVLinkProtocol
();
~
MAVLinkProtocol
();
/** @brief Get the human-friendly name of this protocol */
/** @brief Get the human-friendly name of this protocol */
...
...
src/uas/UASMessageHandler.cc
View file @
ab25a46a
...
@@ -39,8 +39,8 @@ bool UASMessage::severityIsError()
...
@@ -39,8 +39,8 @@ bool UASMessage::severityIsError()
}
}
}
}
UASMessageHandler
::
UASMessageHandler
(
QGCApplication
*
app
)
UASMessageHandler
::
UASMessageHandler
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
)
:
QGCTool
(
app
,
toolbox
)
,
_activeVehicle
(
NULL
)
,
_activeVehicle
(
NULL
)
,
_activeComponent
(
-
1
)
,
_activeComponent
(
-
1
)
,
_multiComp
(
false
)
,
_multiComp
(
false
)
...
...
src/uas/UASMessageHandler.h
View file @
ab25a46a
...
@@ -72,7 +72,7 @@ class UASMessageHandler : public QGCTool
...
@@ -72,7 +72,7 @@ class UASMessageHandler : public QGCTool
Q_OBJECT
Q_OBJECT
public:
public:
explicit
UASMessageHandler
(
QGCApplication
*
app
);
explicit
UASMessageHandler
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
UASMessageHandler
();
~
UASMessageHandler
();
/**
/**
...
...
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