2011-03-29 22:32:09 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @file configplugin.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
|
|
* @addtogroup GCSPlugins GCS Plugins
|
|
|
|
* @{
|
|
|
|
* @addtogroup ConfigPlugin Config Plugin
|
|
|
|
* @{
|
|
|
|
* @brief The Configuration Gadget used to update settings in the firmware
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
#include "configplugin.h"
|
|
|
|
#include "configgadgetfactory.h"
|
|
|
|
#include <QtPlugin>
|
|
|
|
#include <QStringList>
|
2011-04-26 00:45:08 +02:00
|
|
|
#include <QTimer>
|
2011-03-29 22:32:09 +02:00
|
|
|
#include <extensionsystem/pluginmanager.h>
|
2011-08-15 17:55:36 +02:00
|
|
|
#include "objectpersistence.h"
|
2011-04-26 00:45:08 +02:00
|
|
|
|
2011-03-29 22:32:09 +02:00
|
|
|
ConfigPlugin::ConfigPlugin()
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
// Do nothing
|
2011-03-29 22:32:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ConfigPlugin::~ConfigPlugin()
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
// Do nothing
|
2011-03-29 22:32:09 +02:00
|
|
|
}
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
bool ConfigPlugin::initialize(const QStringList & args, QString *errMsg)
|
2011-03-29 22:32:09 +02:00
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
Q_UNUSED(args);
|
|
|
|
Q_UNUSED(errMsg);
|
|
|
|
cf = new ConfigGadgetFactory(this);
|
|
|
|
addAutoReleasedObject(cf);
|
|
|
|
|
|
|
|
return true;
|
2011-03-29 22:32:09 +02:00
|
|
|
}
|
|
|
|
|
2011-08-15 17:55:36 +02:00
|
|
|
/**
|
2013-05-19 16:37:30 +02:00
|
|
|
* @brief Return handle to object manager
|
|
|
|
*/
|
|
|
|
UAVObjectManager *ConfigPlugin::getObjectManager()
|
2011-08-15 17:55:36 +02:00
|
|
|
{
|
|
|
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
2013-05-19 16:37:30 +02:00
|
|
|
UAVObjectManager *objMngr = pm->getObject<UAVObjectManager>();
|
|
|
|
|
2011-08-15 17:55:36 +02:00
|
|
|
Q_ASSERT(objMngr);
|
|
|
|
return objMngr;
|
|
|
|
}
|
|
|
|
|
2011-03-29 22:32:09 +02:00
|
|
|
void ConfigPlugin::extensionsInitialized()
|
2013-06-09 22:09:04 +02:00
|
|
|
{}
|
2011-03-29 22:32:09 +02:00
|
|
|
|
|
|
|
void ConfigPlugin::shutdown()
|
2013-06-09 22:09:04 +02:00
|
|
|
{}
|