Newer
Older
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#ifndef QGCToolbox_h
#define QGCToolbox_h
#include <QObject>
class FactSystem;
class FirmwarePluginManager;
Beat Küng
committed
class GPSManager;
class LinkManager;
class MAVLinkProtocol;
class QGCCorePlugin;
/// This is used to manage all of our top level services/tools
class QGCToolbox : public QObject {
Q_OBJECT
public:
QGCToolbox(QGCApplication* app);
FirmwarePluginManager* firmwarePluginManager(void) { return _firmwarePluginManager; }
AudioOutput* audioOutput(void) { return _audioOutput; }
JoystickManager* joystickManager(void) { return _joystickManager; }
LinkManager* linkManager(void) { return _linkManager; }
MAVLinkProtocol* mavlinkProtocol(void) { return _mavlinkProtocol; }
MissionCommandTree* missionCommandTree(void) { return _missionCommandTree; }
MultiVehicleManager* multiVehicleManager(void) { return _multiVehicleManager; }
QGCMapEngineManager* mapEngineManager(void) { return _mapEngineManager; }
QGCImageProvider* imageProvider() { return _imageProvider; }
UASMessageHandler* uasMessageHandler(void) { return _uasMessageHandler; }
QGCPositionManager* qgcPositionManager(void) { return _qgcPositionManager; }
VideoManager* videoManager(void) { return _videoManager; }
MAVLinkLogManager* mavlinkLogManager(void) { return _mavlinkLogManager; }
QGCCorePlugin* corePlugin(void) { return _corePlugin; }
SettingsManager* settingsManager(void) { return _settingsManager; }
#ifndef __mobile__
GPSManager* gpsManager(void) { return _gpsManager; }
#endif
void _scanAndLoadPlugins(QGCApplication *app);
FactSystem* _factSystem;
FirmwarePluginManager* _firmwarePluginManager;
Beat Küng
committed
GPSManager* _gpsManager;
LinkManager* _linkManager;
MAVLinkProtocol* _mavlinkProtocol;
MissionCommandTree* _missionCommandTree;
QGCMapEngineManager* _mapEngineManager;
QGCCorePlugin* _corePlugin;
SettingsManager* _settingsManager;
};
/// This is the base class for all tools
class QGCTool : public QObject {
Q_OBJECT
public:
// All tools must be parented to the QGCToolbox and go through a two phase creation. In the constructor the toolbox
// should only be passed to QGCTool constructor for correct parenting. It should not be referenced or set in the
// protected member. Then in the second phase of setToolbox calls is where you can reference the toolbox.
QGCTool(QGCApplication* app, QGCToolbox* toolbox);
// If you override this method, you must call the base class.