mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-245 config: simplify config plugin
This commit is contained in:
parent
be75f28b33
commit
07c2020507
@ -68,6 +68,7 @@ ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
layout->addWidget(stackWidget);
|
||||
setLayout(layout);
|
||||
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
|
||||
QWidget *widget;
|
||||
QIcon *icon;
|
||||
|
@ -2,7 +2,8 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configplugin.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
@ -25,12 +26,15 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "configplugin.h"
|
||||
|
||||
#include "configgadgetfactory.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <uavobjects/uavobjectmanager.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include "objectpersistence.h"
|
||||
|
||||
ConfigPlugin::ConfigPlugin()
|
||||
{
|
||||
@ -46,7 +50,8 @@ bool ConfigPlugin::initialize(const QStringList & args, QString *errMsg)
|
||||
{
|
||||
Q_UNUSED(args);
|
||||
Q_UNUSED(errMsg);
|
||||
cf = new ConfigGadgetFactory(this);
|
||||
|
||||
ConfigGadgetFactory *cf = new ConfigGadgetFactory(this);
|
||||
addAutoReleasedObject(cf);
|
||||
|
||||
return true;
|
||||
|
@ -2,7 +2,8 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configgadgetplugin.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
@ -28,14 +29,11 @@
|
||||
#define CONFIGPLUGIN_H
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include "objectpersistence.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
class ConfigGadgetFactory;
|
||||
class UAVObjectManager;
|
||||
|
||||
class ConfigPlugin : public ExtensionSystem::IPlugin {
|
||||
Q_OBJECT
|
||||
@ -49,9 +47,6 @@ public:
|
||||
void extensionsInitialized();
|
||||
bool initialize(const QStringList & arguments, QString *errorString);
|
||||
void shutdown();
|
||||
|
||||
private:
|
||||
ConfigGadgetFactory *cf;
|
||||
};
|
||||
|
||||
#endif // CONFIGPLUGIN_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user