mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +01:00
Revert "OP-39 Initial commit. Created new sub project to plugins project."
This reverts commit 532fc3071a9fb850bdb97f0b030937f835f38d34. Conflicts: ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h ground/openpilotgcs/src/plugins/setupwizard/setupwizard.pro ground/openpilotgcs/src/plugins/setupwizard/setupwizardplugin.cpp ground/openpilotgcs/src/plugins/setupwizard/setupwizardplugin.h
This commit is contained in:
parent
717b0d4561
commit
82dc7e5957
@ -210,13 +210,6 @@ plugin_uavobjectwidgetutils.depends += plugin_uavobjects
|
|||||||
plugin_uavobjectwidgetutils.depends += plugin_uavsettingsimportexport
|
plugin_uavobjectwidgetutils.depends += plugin_uavsettingsimportexport
|
||||||
SUBDIRS += plugin_uavobjectwidgetutils
|
SUBDIRS += plugin_uavobjectwidgetutils
|
||||||
|
|
||||||
# Setup Wizard plugin
|
|
||||||
plugin_setupwizard.subdir = setupwizard
|
|
||||||
plugin_setupwizard.depends = plugin_coreplugin
|
|
||||||
plugin_setupwizard.depends += plugin_uavobjects
|
|
||||||
plugin_setupwizard.depends += plugin_uavsettingsimportexport
|
|
||||||
SUBDIRS += plugin_setupwizard
|
|
||||||
|
|
||||||
# Junsi Powerlog plugin
|
# Junsi Powerlog plugin
|
||||||
#plugin_powerlog.subdir = powerlog
|
#plugin_powerlog.subdir = powerlog
|
||||||
#plugin_powerlog.depends = plugin_coreplugin
|
#plugin_powerlog.depends = plugin_coreplugin
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
<plugin name="SetupWizard" version="1.0.0" compatVersion="1.0.0">
|
|
||||||
<vendor>The OpenPilot Project</vendor>
|
|
||||||
<copyright>(C) 2012 OpenPilot Project</copyright>
|
|
||||||
<license>The GNU Public License (GPL) Version 3</license>
|
|
||||||
<description>A plugin that provides a setup wizard for easy initial setup of airframes.</description>
|
|
||||||
<url>http://www.openpilot.org</url>
|
|
||||||
<dependencyList>
|
|
||||||
<dependency name="Core" version="1.0.0"/>
|
|
||||||
</dependencyList>
|
|
||||||
</plugin>
|
|
@ -1,54 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
*
|
|
||||||
* @file setupwizard.cpp
|
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
|
||||||
* @{
|
|
||||||
* @addtogroup Setup Wizard Plugin
|
|
||||||
* @{
|
|
||||||
* @brief A Wizard to make the initial setup easy for everyone.
|
|
||||||
*****************************************************************************/
|
|
||||||
/*
|
|
||||||
* 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 "setupwizard.h"
|
|
||||||
#include "pages/startpage.h"
|
|
||||||
#include "pages/endpage.h"
|
|
||||||
|
|
||||||
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent)
|
|
||||||
{
|
|
||||||
setWindowTitle("OpenPilot Setup Wizard");
|
|
||||||
createPages();
|
|
||||||
}
|
|
||||||
|
|
||||||
int SetupWizard::nextId() const
|
|
||||||
{
|
|
||||||
switch (currentId()) {
|
|
||||||
case PAGE_START:
|
|
||||||
return PAGE_END;
|
|
||||||
default:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetupWizard::createPages()
|
|
||||||
{
|
|
||||||
setPage(PAGE_START, new StartPage());
|
|
||||||
setPage(PAGE_END, new EndPage());
|
|
||||||
|
|
||||||
setStartId(PAGE_START);
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
*
|
|
||||||
* @file setupwizard.h
|
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
|
||||||
* @{
|
|
||||||
* @addtogroup Setup Wizard Plugin
|
|
||||||
* @{
|
|
||||||
* @brief A Wizards to make the initial setup easy for everyone.
|
|
||||||
*****************************************************************************/
|
|
||||||
/*
|
|
||||||
* 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 SETUPWIZARD_H
|
|
||||||
#define SETUPWIZARD_H
|
|
||||||
|
|
||||||
#include <QWizard>
|
|
||||||
|
|
||||||
class SetupWizard : public QWizard
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
SetupWizard(QWidget *parent = 0);
|
|
||||||
int nextId() const;
|
|
||||||
private:
|
|
||||||
enum {PAGE_START, PAGE_END};
|
|
||||||
void createPages();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // SETUPWIZARD_H
|
|
@ -1,21 +0,0 @@
|
|||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
TARGET = SetupWizard
|
|
||||||
|
|
||||||
include(../../openpilotgcsplugin.pri)
|
|
||||||
include(../../plugins/coreplugin/coreplugin.pri)
|
|
||||||
|
|
||||||
HEADERS += setupwizardplugin.h \
|
|
||||||
setupwizard.h \
|
|
||||||
pages/startpage.h \
|
|
||||||
pages/endpage.h
|
|
||||||
SOURCES += setupwizardplugin.cpp \
|
|
||||||
setupwizard.cpp \
|
|
||||||
pages/startpage.cpp \
|
|
||||||
pages/endpage.cpp
|
|
||||||
|
|
||||||
OTHER_FILES += SetupWizard.pluginspec
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
pages/startpage.ui \
|
|
||||||
pages/endpage.ui
|
|
@ -1,85 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
*
|
|
||||||
* @file donothingplugin.cpp
|
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
|
||||||
* @{
|
|
||||||
* @addtogroup SetupWizardPlugin
|
|
||||||
* @{
|
|
||||||
* @brief A Setup Wizard Plugin
|
|
||||||
*****************************************************************************/
|
|
||||||
/*
|
|
||||||
* 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 "setupwizardplugin.h"
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QtPlugin>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
|
||||||
#include <coreplugin/icore.h>
|
|
||||||
#include <QKeySequence>
|
|
||||||
|
|
||||||
SetupWizardPlugin::SetupWizardPlugin()
|
|
||||||
{
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
SetupWizardPlugin::~SetupWizardPlugin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SetupWizardPlugin::initialize(const QStringList& args, QString *errMsg)
|
|
||||||
{
|
|
||||||
Q_UNUSED(args);
|
|
||||||
Q_UNUSED(errMsg);
|
|
||||||
|
|
||||||
// Add Menu entry
|
|
||||||
Core::ActionManager* am = Core::ICore::instance()->actionManager();
|
|
||||||
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS);
|
|
||||||
|
|
||||||
Core::Command* cmd = am->registerAction(new QAction(this),
|
|
||||||
"SetupWizardPlugin.ShowSetupWizard",
|
|
||||||
QList<int>() <<
|
|
||||||
Core::Constants::C_GLOBAL_ID);
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence("Ctrl+W"));
|
|
||||||
cmd->action()->setText(tr("OpenPilot Setup Wizard"));
|
|
||||||
|
|
||||||
ac->menu()->addSeparator();
|
|
||||||
ac->appendGroup("Wizard");
|
|
||||||
ac->addAction(cmd, "Wizard");
|
|
||||||
|
|
||||||
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(showSetupWizard()));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetupWizardPlugin::extensionsInitialized()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetupWizardPlugin::shutdown()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetupWizardPlugin::showSetupWizard()
|
|
||||||
{
|
|
||||||
SetupWizard().exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(SetupWizardPlugin)
|
|
@ -1,50 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
*
|
|
||||||
* @file donothingplugin.h
|
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
|
||||||
* @{
|
|
||||||
* @addtogroup SetupWizardPlugin
|
|
||||||
* @{
|
|
||||||
* @brief A Setup Wizard Plugin
|
|
||||||
*****************************************************************************/
|
|
||||||
/*
|
|
||||||
* 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 SETUPWIZARDPLUGIN_H
|
|
||||||
#define SETUPWIZARDPLUGIN_H
|
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
|
||||||
#include <QWizard>
|
|
||||||
#include "setupwizard.h"
|
|
||||||
|
|
||||||
class SetupWizardPlugin : public ExtensionSystem::IPlugin
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
SetupWizardPlugin();
|
|
||||||
~SetupWizardPlugin();
|
|
||||||
|
|
||||||
void extensionsInitialized();
|
|
||||||
bool initialize(const QStringList & arguments, QString * errorString);
|
|
||||||
void shutdown();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void showSetupWizard();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // SETUPWIZARDPLUGIN_H
|
|
Loading…
x
Reference in New Issue
Block a user