mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-833 removed unused ConfigGadgetConfiguration and
ConfigGadgetOptionsPages classes
This commit is contained in:
parent
21c581bacd
commit
90fbf9bdab
@ -8,10 +8,8 @@ INCLUDEPATH += ../../libs/eigen
|
||||
OTHER_FILES += Config.pluginspec
|
||||
|
||||
HEADERS += configplugin.h \
|
||||
configgadgetconfiguration.h \
|
||||
configgadgetwidget.h \
|
||||
configgadgetfactory.h \
|
||||
configgadgetoptionspage.h \
|
||||
configgadget.h \
|
||||
fancytabwidget.h \
|
||||
configinputwidget.h \
|
||||
@ -40,11 +38,10 @@ HEADERS += configplugin.h \
|
||||
mixercurve.h \
|
||||
dblspindelegate.h \
|
||||
configautotunewidget.h
|
||||
|
||||
SOURCES += configplugin.cpp \
|
||||
configgadgetconfiguration.cpp \
|
||||
configgadgetwidget.cpp \
|
||||
configgadgetfactory.cpp \
|
||||
configgadgetoptionspage.cpp \
|
||||
configgadget.cpp \
|
||||
fancytabwidget.cpp \
|
||||
configinputwidget.cpp \
|
||||
@ -74,6 +71,7 @@ SOURCES += configplugin.cpp \
|
||||
mixercurve.cpp \
|
||||
dblspindelegate.cpp \
|
||||
configautotunewidget.cpp
|
||||
|
||||
FORMS += airframe.ui \
|
||||
cc_hw_settings.ui \
|
||||
pro_hw_settings.ui \
|
||||
@ -92,11 +90,5 @@ FORMS += airframe.ui \
|
||||
pipxtreme.ui \
|
||||
mixercurve.ui \
|
||||
autotune.ui
|
||||
|
||||
RESOURCES += configgadget.qrc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -26,11 +26,9 @@
|
||||
*/
|
||||
#include "configgadget.h"
|
||||
#include "configgadgetwidget.h"
|
||||
#include "configgadgetconfiguration.h"
|
||||
|
||||
ConfigGadget::ConfigGadget(QString classId, ConfigGadgetWidget *widget, QWidget *parent) :
|
||||
IUAVGadget(classId, parent),
|
||||
m_widget(widget)
|
||||
IUAVGadget(classId, parent), m_widget(widget)
|
||||
{
|
||||
}
|
||||
|
||||
@ -39,8 +37,7 @@ ConfigGadget::~ConfigGadget()
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
void ConfigGadget::loadConfiguration(IUAVGadgetConfiguration* config)
|
||||
void ConfigGadget::loadConfiguration(IUAVGadgetConfiguration *config)
|
||||
{
|
||||
Q_UNUSED(config);
|
||||
}
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configgadgetconfiguration.cpp
|
||||
* @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 "configgadgetconfiguration.h"
|
||||
|
||||
ConfigGadgetConfiguration::ConfigGadgetConfiguration(QString classId, QSettings* qSettings, QObject *parent) :
|
||||
IUAVGadgetConfiguration(classId, parent)
|
||||
{
|
||||
Q_UNUSED(qSettings);
|
||||
|
||||
}
|
||||
|
||||
IUAVGadgetConfiguration *ConfigGadgetConfiguration::clone()
|
||||
{
|
||||
ConfigGadgetConfiguration *m = new ConfigGadgetConfiguration(this->classId());
|
||||
return m;
|
||||
}
|
||||
|
||||
void ConfigGadgetConfiguration::saveConfig(QSettings* settings) const {
|
||||
|
||||
Q_UNUSED(settings)
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configgadgetfactory.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
|
||||
*/
|
||||
#ifndef CONFIGGADGETCONFIGURATION_H
|
||||
#define CONFIGGADGETCONFIGURATION_H
|
||||
|
||||
#include <coreplugin/iuavgadgetconfiguration.h>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class ConfigGadgetConfiguration : public IUAVGadgetConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigGadgetConfiguration(QString classId, QSettings* qSettings = 0, QObject *parent = 0);
|
||||
void saveConfig(QSettings* settings) const;
|
||||
IUAVGadgetConfiguration *clone();
|
||||
|
||||
};
|
||||
|
||||
#endif // CONFIGGADGETCONFIGURATION_H
|
@ -26,8 +26,6 @@
|
||||
*/
|
||||
#include "configgadgetfactory.h"
|
||||
#include "configgadget.h"
|
||||
#include "configgadgetconfiguration.h"
|
||||
#include "configgadgetoptionspage.h"
|
||||
#include <coreplugin/iuavgadget.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
@ -35,8 +33,7 @@
|
||||
#include <coreplugin/modemanager.h>
|
||||
|
||||
ConfigGadgetFactory::ConfigGadgetFactory(QObject *parent) :
|
||||
IUAVGadgetFactory(QString("ConfigGadget"), tr("Config"), parent),
|
||||
gadgetWidget(0)
|
||||
IUAVGadgetFactory(QString("ConfigGadget"), tr("Config"), parent), gadgetWidget(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -44,18 +41,16 @@ ConfigGadgetFactory::~ConfigGadgetFactory()
|
||||
{
|
||||
}
|
||||
|
||||
Core::IUAVGadget* ConfigGadgetFactory::createGadget(QWidget *parent)
|
||||
Core::IUAVGadget *ConfigGadgetFactory::createGadget(QWidget *parent)
|
||||
{
|
||||
gadgetWidget = new ConfigGadgetWidget(parent);
|
||||
|
||||
// Add Menu entry
|
||||
Core::ActionManager* am = Core::ICore::instance()->actionManager();
|
||||
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS);
|
||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||
Core::ActionContainer *ac = am->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::Command* cmd = am->registerAction(new QAction(this),
|
||||
"ConfigPlugin.ShowInputWizard",
|
||||
QList<int>() <<
|
||||
Core::Constants::C_GLOBAL_ID);
|
||||
Core::Command *cmd = am->registerAction(new QAction(this), "ConfigPlugin.ShowInputWizard",
|
||||
QList<int>() << Core::Constants::C_GLOBAL_ID);
|
||||
cmd->setDefaultKeySequence(QKeySequence("Ctrl+R"));
|
||||
cmd->action()->setText(tr("Radio Setup Wizard"));
|
||||
|
||||
@ -69,22 +64,9 @@ Core::IUAVGadget* ConfigGadgetFactory::createGadget(QWidget *parent)
|
||||
return new ConfigGadget(QString("ConfigGadget"), gadgetWidget, parent);
|
||||
}
|
||||
|
||||
// TODO should be removed as ConfigGadgetConfiguration is an empty class
|
||||
IUAVGadgetConfiguration *ConfigGadgetFactory::createConfiguration(QSettings* qSettings)
|
||||
{
|
||||
return new ConfigGadgetConfiguration(QString("ConfigGadget"), qSettings);
|
||||
}
|
||||
|
||||
// TODO should be removed as ConfigGadgetConfiguration is an empty class
|
||||
IOptionsPage *ConfigGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config)
|
||||
{
|
||||
return 0; //new ConfigGadgetOptionsPage(qobject_cast<ConfigGadgetConfiguration*>(config));
|
||||
}
|
||||
|
||||
void ConfigGadgetFactory::startInputWizard()
|
||||
{
|
||||
if(gadgetWidget)
|
||||
{
|
||||
if (gadgetWidget) {
|
||||
Core::ModeManager::instance()->activateModeByWorkspaceName("Configuration");
|
||||
gadgetWidget->startInputWizard();
|
||||
}
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "configgadgetwidget.h"
|
||||
#include "config_global.h"
|
||||
|
||||
|
||||
namespace Core {
|
||||
class IUAVGadget;
|
||||
class IUAVGadgetFactory;
|
||||
@ -43,19 +42,16 @@ class CONFIG_EXPORT ConfigGadgetFactory: public Core::IUAVGadgetFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
ConfigGadgetFactory(QObject *parent = 0);
|
||||
~ConfigGadgetFactory();
|
||||
|
||||
IUAVGadget *createGadget(QWidget *parent);
|
||||
IUAVGadgetConfiguration *createConfiguration(QSettings* qSettings);
|
||||
IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config);
|
||||
|
||||
public slots:
|
||||
void startInputWizard();
|
||||
|
||||
private:
|
||||
ConfigGadgetWidget* gadgetWidget;
|
||||
ConfigGadgetWidget *gadgetWidget;
|
||||
};
|
||||
|
||||
#endif // CONFIGGADGETFACTORY_H
|
||||
|
@ -1,52 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configgadgetoptionspage.cpp
|
||||
* @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 "configgadgetoptionspage.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
ConfigGadgetOptionsPage::ConfigGadgetOptionsPage(ConfigGadgetConfiguration *config, QObject *parent)
|
||||
{
|
||||
//todo:implement
|
||||
Q_UNUSED(config);
|
||||
Q_UNUSED(parent);
|
||||
}
|
||||
|
||||
QWidget *ConfigGadgetOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
//todo:implement
|
||||
Q_UNUSED(parent);
|
||||
return new QWidget;
|
||||
}
|
||||
|
||||
void ConfigGadgetOptionsPage::apply()
|
||||
{
|
||||
//todo:implement
|
||||
}
|
||||
|
||||
void ConfigGadgetOptionsPage::finish(){
|
||||
//todo:implement
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configgadgetoptionspage.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
|
||||
*/
|
||||
#ifndef CONFIGGADGETOPTIONSPAGE_H
|
||||
#define CONFIGGADGETOPTIONSPAGE_H
|
||||
|
||||
#include "coreplugin/dialogs/ioptionspage.h"
|
||||
|
||||
namespace Core {
|
||||
class IUAVGadgetConfiguration;
|
||||
}
|
||||
using namespace Core;
|
||||
|
||||
class ConfigGadgetConfiguration;
|
||||
|
||||
class ConfigGadgetOptionsPage : public IOptionsPage
|
||||
{
|
||||
public:
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ConfigGadgetOptionsPage(ConfigGadgetConfiguration *config, QObject *parent = 0);
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
};
|
||||
|
||||
#endif // CONFIGGADGETOPTIONSPAGE_H
|
Loading…
x
Reference in New Issue
Block a user