From b9bb1b46f61925ca820e7c142bb1a79cd4a3c3c9 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 5 Sep 2015 00:26:53 +0200 Subject: [PATCH] LP-29 removed deprecated osgearthview plugin --- .../OsgEarthviewGadget.pluginspec | 11 - ground/gcs/src/plugins/osgearthview/osg.pri | 6 - .../gcs/src/plugins/osgearthview/osgearth.pri | 2 - .../src/plugins/osgearthview/osgearthview.pro | 42 --- .../src/plugins/osgearthview/osgearthview.qrc | 3 - .../src/plugins/osgearthview/osgearthview.ui | 32 -- .../osgearthview_dependencies.pri | 2 - .../osgearthview/osgearthviewgadget.cpp | 49 --- .../plugins/osgearthview/osgearthviewgadget.h | 57 ---- .../osgearthviewgadgetconfiguration.cpp | 56 ---- .../osgearthviewgadgetconfiguration.h | 45 --- .../osgearthviewgadgetfactory.cpp | 56 ---- .../osgearthview/osgearthviewgadgetfactory.h | 51 --- .../osgearthviewgadgetoptionspage.cpp | 66 ---- .../osgearthviewgadgetoptionspage.h | 64 ---- .../osgearthviewgadgetoptionspage.ui | 126 -------- .../osgearthview/osgearthviewplugin.cpp | 66 ---- .../plugins/osgearthview/osgearthviewplugin.h | 50 --- .../osgearthview/osgearthviewwidget.cpp | 121 -------- .../plugins/osgearthview/osgearthviewwidget.h | 102 ------ .../plugins/osgearthview/osgviewerwidget.cpp | 293 ------------------ .../plugins/osgearthview/osgviewerwidget.h | 115 ------- ground/gcs/src/plugins/plugins.pro | 9 - 23 files changed, 1424 deletions(-) delete mode 100644 ground/gcs/src/plugins/osgearthview/OsgEarthviewGadget.pluginspec delete mode 100644 ground/gcs/src/plugins/osgearthview/osg.pri delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearth.pri delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthview.pro delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthview.qrc delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthview.ui delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthview_dependencies.pri delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadget.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadget.h delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.h delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.h delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.h delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.ui delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewplugin.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewplugin.h delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewwidget.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgearthviewwidget.h delete mode 100644 ground/gcs/src/plugins/osgearthview/osgviewerwidget.cpp delete mode 100644 ground/gcs/src/plugins/osgearthview/osgviewerwidget.h diff --git a/ground/gcs/src/plugins/osgearthview/OsgEarthviewGadget.pluginspec b/ground/gcs/src/plugins/osgearthview/OsgEarthviewGadget.pluginspec deleted file mode 100644 index d94a30f28..000000000 --- a/ground/gcs/src/plugins/osgearthview/OsgEarthviewGadget.pluginspec +++ /dev/null @@ -1,11 +0,0 @@ - - The OpenPilot Project - (C) 2012 The OpenPilot Project - The GNU Public License (GPL) Version 3 - Visualize UAV and the scene based on OpenSceneGraph and OsgEarth - http://www.openpilot.org - - - - - diff --git a/ground/gcs/src/plugins/osgearthview/osg.pri b/ground/gcs/src/plugins/osgearthview/osg.pri deleted file mode 100644 index 40e14ec30..000000000 --- a/ground/gcs/src/plugins/osgearthview/osg.pri +++ /dev/null @@ -1,6 +0,0 @@ - -LIBS += -losg -lOpenThreads -losgUtil -losgViewer -losgDB -losgQt -losgGA - -#QMAKE_LFLAGS += -F/usr/local/lib -#LIBS += -framework OpenThreads -framework osg -framework osgUtil -framework osgViewer -framework osgDB -framework osgQt -framework osgGA -#LIBS += -framework CoreFoundation diff --git a/ground/gcs/src/plugins/osgearthview/osgearth.pri b/ground/gcs/src/plugins/osgearthview/osgearth.pri deleted file mode 100644 index 6a4ea3e40..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearth.pri +++ /dev/null @@ -1,2 +0,0 @@ - -LIBS += -losgEarth -losgEarthUtil -losgEarthQt diff --git a/ground/gcs/src/plugins/osgearthview/osgearthview.pro b/ground/gcs/src/plugins/osgearthview/osgearthview.pro deleted file mode 100644 index 074c77897..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthview.pro +++ /dev/null @@ -1,42 +0,0 @@ -TEMPLATE = lib -TARGET = OsgEarthviewGadget - -QT += opengl -include(../../plugin.pri) -include(../../plugins/coreplugin/coreplugin.pri) -include(osgearthview_dependencies.pri) -include(osg.pri) -include(osgearth.pri) - -HEADERS += osgearthviewplugin.h \ - osgviewerwidget.h -HEADERS += osgearthviewgadget.h -HEADERS += osgearthviewwidget.h -HEADERS += osgearthviewgadgetfactory.h -HEADERS += osgearthviewgadgetconfiguration.h -HEADERS += osgearthviewgadgetoptionspage.h - -SOURCES += osgearthviewplugin.cpp \ - osgviewerwidget.cpp -SOURCES += osgearthviewgadget.cpp -SOURCES += osgearthviewwidget.cpp -SOURCES += osgearthviewgadgetfactory.cpp -SOURCES += osgearthviewgadgetconfiguration.cpp -SOURCES += osgearthviewgadgetoptionspage.cpp - -FORMS += osgearthviewgadgetoptionspage.ui \ - osgearthview.ui - -OTHER_FILES += OsgEarthviewGadget.pluginspec -RESOURCES += osgearthview.qrc - - - - - - - - - - - diff --git a/ground/gcs/src/plugins/osgearthview/osgearthview.qrc b/ground/gcs/src/plugins/osgearthview/osgearthview.qrc deleted file mode 100644 index e33513993..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthview.qrc +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ground/gcs/src/plugins/osgearthview/osgearthview.ui b/ground/gcs/src/plugins/osgearthview/osgearthview.ui deleted file mode 100644 index 451223605..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthview.ui +++ /dev/null @@ -1,32 +0,0 @@ - - - OsgEarthview - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - - - - - OsgViewerWidget - QWidget -
osgviewerwidget.h
- 1 -
-
- - -
diff --git a/ground/gcs/src/plugins/osgearthview/osgearthview_dependencies.pri b/ground/gcs/src/plugins/osgearthview/osgearthview_dependencies.pri deleted file mode 100644 index 44b7c249d..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthview_dependencies.pri +++ /dev/null @@ -1,2 +0,0 @@ -include(../../plugins/uavobjects/uavobjects.pri) -include(../../plugins/uavobjectutil/uavobjectutil.pri) diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadget.cpp b/ground/gcs/src/plugins/osgearthview/osgearthviewgadget.cpp deleted file mode 100644 index ccff62dd8..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadget.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************** - * @file osgearthviewgadget.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgearthviewgadget.h" -#include "osgearthviewwidget.h" -#include "osgearthviewgadgetconfiguration.h" - -OsgEarthviewGadget::OsgEarthviewGadget(QString classId, OsgEarthviewWidget *widget, QWidget *parent) : - IUAVGadget(classId, parent), - m_widget(widget) -{} - -OsgEarthviewGadget::~OsgEarthviewGadget() -{ - delete m_widget; -} - -/* - This is called when a configuration is loaded, and updates the plugin's settings. - Careful: the plugin is already drawn before the loadConfiguration method is called the - first time, so you have to be careful not to assume all the plugin values are initialized - the first time you use them - */ -void OsgEarthviewGadget::loadConfiguration(IUAVGadgetConfiguration *config) -{ - OsgEarthviewGadgetConfiguration *m = qobject_cast(config); -} diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadget.h b/ground/gcs/src/plugins/osgearthview/osgearthviewgadget.h deleted file mode 100644 index a02925c86..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadget.h +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************** - * - * @file osgearthviewgadget.h - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 OSGEARTHVIEWGADGET_H_ -#define OSGEARTHVIEWGADGET_H_ - -#include -#include "osgearthviewwidget.h" - -class IUAVGadget; -class QWidget; -class QString; -class OsgEarthviewWidget; - -using namespace Core; - -class OsgEarthviewGadget : public Core::IUAVGadget { - Q_OBJECT -public: - OsgEarthviewGadget(QString classId, OsgEarthviewWidget *widget, QWidget *parent = 0); - ~OsgEarthviewGadget(); - - QWidget *widget() - { - return m_widget; - } - void loadConfiguration(IUAVGadgetConfiguration *config); - -private: - OsgEarthviewWidget *m_widget; -}; - - -#endif // OSGEARTHVIEWGADGET_H_ diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.cpp b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.cpp deleted file mode 100644 index 5a3955ee2..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************** - * @file osgearthviewgadgetconfiguration.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgearthviewgadgetconfiguration.h" -#include "utils/pathutils.h" - -/** - * Loads a saved configuration or defaults if non exist. - * - */ -OsgEarthviewGadgetConfiguration::OsgEarthviewGadgetConfiguration(QString classId, QSettings *qSettings, QObject *parent) : - IUAVGadgetConfiguration(classId, parent) -{ - Q_UNUSED(qSettings); - // if a saved configuration exists load it - if (qSettings != 0) {} -} - -/** - * Clones a configuration. - * - */ -IUAVGadgetConfiguration *OsgEarthviewGadgetConfiguration::clone() -{ - OsgEarthviewGadgetConfiguration *m = new OsgEarthviewGadgetConfiguration(this->classId()); - - return m; -} - -/** - * Saves a configuration. - * - */ -void OsgEarthviewGadgetConfiguration::saveConfig(QSettings *qSettings) const {} diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.h b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.h deleted file mode 100644 index 02d2560d6..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetconfiguration.h +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************** - * - * @file osgearthviewgadgetconfiguration.h - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 OSGEARTHVIEWGADGETCONFIGURATION_H -#define OSGEARTHVIEWGADGETCONFIGURATION_H - -#include - -using namespace Core; - -class OsgEarthviewGadgetConfiguration : public IUAVGadgetConfiguration { - Q_OBJECT -public: - explicit OsgEarthviewGadgetConfiguration(QString classId, QSettings *qSettings = 0, QObject *parent = 0); - - void saveConfig(QSettings *settings) const; - IUAVGadgetConfiguration *clone(); - -private: -}; - -#endif // OSGEARTHVIEWGADGETCONFIGURATION_H diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.cpp b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.cpp deleted file mode 100644 index d01a2d5ab..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************** - * @file osgearthviewgadgetfactory.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgearthviewgadgetfactory.h" -#include "osgearthviewwidget.h" -#include "osgearthviewgadget.h" -#include "osgearthviewgadgetconfiguration.h" -#include "osgearthviewgadgetoptionspage.h" -#include - -OsgEarthviewGadgetFactory::OsgEarthviewGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("OsgEarthviewGadget"), - tr("Osg Earth View"), - parent) -{} - -OsgEarthviewGadgetFactory::~OsgEarthviewGadgetFactory() -{} - -Core::IUAVGadget *OsgEarthviewGadgetFactory::createGadget(QWidget *parent) -{ - OsgEarthviewWidget *gadgetWidget = new OsgEarthviewWidget(parent); - - return new OsgEarthviewGadget(QString("OsgEarthviewGadget"), gadgetWidget, parent); -} - -IUAVGadgetConfiguration *OsgEarthviewGadgetFactory::createConfiguration(QSettings *qSettings) -{ - return new OsgEarthviewGadgetConfiguration(QString("OsgEarthviewGadget"), qSettings); -} - -IOptionsPage *OsgEarthviewGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) -{ - return new OsgEarthviewGadgetOptionsPage(qobject_cast(config)); -} diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.h b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.h deleted file mode 100644 index 9557c8570..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetfactory.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - ****************************************************************************** - - * @file osgearthviewgadgetfactory.h - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief The Primary Flight Display Gadget - *****************************************************************************/ -/* - * 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 OSGEARTHVIEWGADGETFACTORY_H_ -#define OSGEARTHVIEWGADGETFACTORY_H_ - -#include - -namespace Core { -class IUAVGadget; -class IUAVGadgetFactory; -} - -using namespace Core; - -class OsgEarthviewGadgetFactory : public IUAVGadgetFactory { - Q_OBJECT -public: - OsgEarthviewGadgetFactory(QObject *parent = 0); - ~OsgEarthviewGadgetFactory(); - - Core::IUAVGadget *createGadget(QWidget *parent); - IUAVGadgetConfiguration *createConfiguration(QSettings *qSettings); - IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config); -}; - -#endif // OSGEARTHVIEWGADGETFACTORY_H_ diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.cpp b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.cpp deleted file mode 100644 index 21d424e03..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************** - * @file osgearthviewgadgetoptions.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgearthviewgadgetoptionspage.h" -#include "osgearthviewgadgetconfiguration.h" -#include "ui_osgearthviewgadgetoptionspage.h" -#include "extensionsystem/pluginmanager.h" -#include "uavobjectmanager.h" -#include "uavdataobject.h" - - -#include -#include -#include - -OsgEarthviewGadgetOptionsPage::OsgEarthviewGadgetOptionsPage(OsgEarthviewGadgetConfiguration *config, QObject *parent) : - IOptionsPage(parent), - m_config(config) -{} - -// creates options page widget (uses the UI file) -QWidget *OsgEarthviewGadgetOptionsPage::createPage(QWidget *parent) -{ - options_page = new Ui::OsgEarthviewGadgetOptionsPage(); - // main widget - QWidget *optionsPageWidget = new QWidget; - // main layout - options_page->setupUi(optionsPageWidget); - - return optionsPageWidget; -} - -/** - * Called when the user presses apply or OK. - * - * Saves the current values - * - */ -void OsgEarthviewGadgetOptionsPage::apply() -{} - - -void OsgEarthviewGadgetOptionsPage::finish() -{} diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.h b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.h deleted file mode 100644 index 7a77b391d..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - ****************************************************************************** - * - * @file osgearthviewgadgetoptionspage.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OPMapPlugin Primary Flight Display Plugin - * @{ - * @brief The Primary Flight Display Gadget - *****************************************************************************/ -/* - * 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 OSGEARTHVIEWGADGETOPTIONSPAGE_H -#define OSGEARTHVIEWGADGETOPTIONSPAGE_H - -#include "coreplugin/dialogs/ioptionspage.h" -#include "QString" -#include -#include - -namespace Core { -class IUAVGadgetConfiguration; -} - -class OsgEarthviewGadgetConfiguration; - -namespace Ui { -class OsgEarthviewGadgetOptionsPage; -} - -using namespace Core; - -class OsgEarthviewGadgetOptionsPage : public IOptionsPage { - Q_OBJECT -public: - explicit OsgEarthviewGadgetOptionsPage(OsgEarthviewGadgetConfiguration *config, QObject *parent = 0); - - QWidget *createPage(QWidget *parent); - void apply(); - void finish(); - -private: - Ui::OsgEarthviewGadgetOptionsPage *options_page; - OsgEarthviewGadgetConfiguration *m_config; - -private slots: -}; - -#endif // OSGEARTHVIEWGADGETOPTIONSPAGE_H diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.ui b/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.ui deleted file mode 100644 index 8c811ffb9..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewgadgetoptionspage.ui +++ /dev/null @@ -1,126 +0,0 @@ - - - OsgEarthviewGadgetOptionsPage - - - - 0 - 0 - 529 - 271 - - - - - 0 - 0 - - - - Form - - - - - - 10 - - - QLayout::SetMaximumSize - - - 10 - - - - - PFD SVG: - - - - - - - - 0 - 0 - - - - - - - - - - Qt::Horizontal - - - - - - - - - true - - - Use OpenGL for rendering - - - true - - - - - - - High Quality text (OpenGL) - - - - - - - - - - - Smooth updates - - - true - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 40 - - - - - - - - - Utils::PathChooser - QWidget -
utils/pathchooser.h
- 1 -
-
- - -
diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewplugin.cpp b/ground/gcs/src/plugins/osgearthview/osgearthviewplugin.cpp deleted file mode 100644 index 8eccf37ca..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewplugin.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************** - * @file osgearthviewplugin.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgearthviewplugin.h" -#include "osgearthviewgadgetfactory.h" -#include -#include -#include -#include - -#include - - -OsgEarthviewPlugin::OsgEarthviewPlugin() -{ - // Do nothing -} - -OsgEarthviewPlugin::~OsgEarthviewPlugin() -{ - // Do nothing -} - -bool OsgEarthviewPlugin::initialize(const QStringList & args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - mf = new OsgEarthviewGadgetFactory(this); - addAutoReleasedObject(mf); - - osgQt::initQtWindowingSystem(); - - return true; -} - -void OsgEarthviewPlugin::extensionsInitialized() -{ - // Do nothing -} - -void OsgEarthviewPlugin::shutdown() -{ - // Do nothing -} diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewplugin.h b/ground/gcs/src/plugins/osgearthview/osgearthviewplugin.h deleted file mode 100644 index 61ae110c7..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewplugin.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * - * @file pfdplugin.h - * @author Edouard Lafargue Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OPMapPlugin Primary Flight Display Plugin - * @{ - * @brief The Primary Flight Display Gadget - *****************************************************************************/ -/* - * 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 OSGEARTHVIEWPLUGIN_H_ -#define OSGEARTHVIEWPLUGIN_H_ - -#include - -class OsgEarthviewGadgetFactory; - -class OsgEarthviewPlugin : public ExtensionSystem::IPlugin { - Q_OBJECT - Q_PLUGIN_METADATA(IID "OpenPilot.OsgEarthview") - -public: - OsgEarthviewPlugin(); - ~OsgEarthviewPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString *errorString); - void shutdown(); -private: - OsgEarthviewGadgetFactory *mf; -}; - -#endif /* PFDPLUGIN_H_ */ diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewwidget.cpp b/ground/gcs/src/plugins/osgearthview/osgearthviewwidget.cpp deleted file mode 100644 index bbd3b1c94..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewwidget.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************** - * @file osgearthviewwidget.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin Widget - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgearthviewwidget.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace osgEarth::Util; -using namespace osgEarth::Util::Controls; -using namespace osgEarth::Symbology; -using namespace osgEarth::Drivers; -using namespace osgEarth::Annotation; - -#include -#include - -#include - -#include - -#include - -#include - -#include "ui_osgearthview.h" - -#include "utils/stylehelper.h" -#include "utils/homelocationutil.h" -#include "utils/worldmagmodel.h" -#include "utils/coordinateconversions.h" -#include "attitudestate.h" -#include "homelocation.h" -#include "positionstate.h" - -using namespace Utils; - -OsgEarthviewWidget::OsgEarthviewWidget(QWidget *parent) : QWidget(parent) -{ - m_widget = new Ui_OsgEarthview(); - m_widget->setupUi(this); - - /*viewWidget = new OsgViewerWidget(this); - viewWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - - setLayout(new QVBoxLayout()); - layout()->addWidget(viewWidget);*/ -} - -OsgEarthviewWidget::~OsgEarthviewWidget() -{} - -void OsgEarthviewWidget::paintEvent(QPaintEvent *event) -{} - -void OsgEarthviewWidget::resizeEvent(QResizeEvent *event) -{} diff --git a/ground/gcs/src/plugins/osgearthview/osgearthviewwidget.h b/ground/gcs/src/plugins/osgearthview/osgearthviewwidget.h deleted file mode 100644 index d0eac2652..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgearthviewwidget.h +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************** - * @file osgearthviewwidget.h - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 OSGEARTHVIEWWIDGET_H_ -#define OSGEARTHVIEWWIDGET_H_ - -#include "osgviewerwidget.h" -#include "osgearthviewgadgetconfiguration.h" -#include "extensionsystem/pluginmanager.h" -#include "uavobjectmanager.h" -#include "uavobject.h" - -#include - -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace osgEarth::Util; -using namespace osgEarth::Util::Controls; -using namespace osgEarth::Symbology; -using namespace osgEarth::Drivers; -using namespace osgEarth::Annotation; - -#include - -#include - -class Ui_OsgEarthview; - -class OsgEarthviewWidget : public QWidget { - Q_OBJECT - -public: - OsgEarthviewWidget(QWidget *parent = 0); - ~OsgEarthviewWidget(); - -public slots: - -protected: /* Protected methods */ - void paintEvent(QPaintEvent *event); - void resizeEvent(QResizeEvent *event); - - OsgViewerWidget *viewWidget; - Ui_OsgEarthview *m_widget; -}; -#endif /* OSGEARTHVIEWWIDGET_H_ */ diff --git a/ground/gcs/src/plugins/osgearthview/osgviewerwidget.cpp b/ground/gcs/src/plugins/osgearthview/osgviewerwidget.cpp deleted file mode 100644 index 5b0900162..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgviewerwidget.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/******************************************************************************** - * @file osgviewerwidget.cpp - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin Widget - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 "osgviewerwidget.h" -#include "osgearthviewwidget.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -#include -#include - -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace osgEarth::Util; -using namespace osgEarth::Util::Controls; -using namespace osgEarth::Symbology; -using namespace osgEarth::Drivers; -using namespace osgEarth::Annotation; - -#include -#include - -#include - -#include - -#include - -#include - -#include "utils/stylehelper.h" -#include "utils/homelocationutil.h" -#include "utils/worldmagmodel.h" -#include "utils/coordinateconversions.h" -#include "attitudestate.h" -#include "gpspositionsensor.h" -#include "homelocation.h" -#include "positionstate.h" -#include "systemsettings.h" - -using namespace Utils; - -OsgViewerWidget::OsgViewerWidget(QWidget *parent) : QWidget(parent) -{ - setThreadingModel(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext); - setAttribute(Qt::WA_PaintOnScreen, true); - - osg::Group *root = new osg::Group; - osg::Node *earth = osgDB::readNodeFile("/Users/Cotton/Programming/osg/osgearth/tests/boston.earth"); - mapNode = osgEarth::MapNode::findMapNode(earth); - if (!mapNode) { - qDebug() << "Uhoh"; - } - - root->addChild(earth); - - osg::Node *airplane = createAirplane(); - uavPos = new osgEarth::Util::ObjectLocatorNode(mapNode->getMap()); - uavPos->getLocator()->setPosition(osg::Vec3d(-71.100549, 42.349273, 150)); - uavPos->addChild(airplane); - - root->addChild(uavPos); - - osgUtil::Optimizer optimizer; - optimizer.optimize(root); - - QWidget *viewWidget = createViewWidget(createCamera(0, 0, 200, 200, "Earth", false), root); - viewWidget->show(); - setLayout(new QVBoxLayout(this)); - - viewWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - layout()->addWidget(viewWidget); - - - connect(&_timer, SIGNAL(timeout()), this, SLOT(update())); - _timer.start(10); -} - -OsgViewerWidget::~OsgViewerWidget() -{} - -QWidget *OsgViewerWidget::createViewWidget(osg::Camera *camera, osg::Node *scene) -{ - osgViewer::View *view = new osgViewer::View; - - view->setCamera(camera); - - addView(view); - - view->setSceneData(scene); - view->addEventHandler(new osgViewer::StatsHandler); - view->getDatabasePager()->setDoPreCompile(true); - - manip = new EarthManipulator(); - view->setCameraManipulator(manip); - -// osgGA::NodeTrackerManipulator *camTracker = new osgGA::NodeTrackerManipulator(); -// camTracker->setTrackNode(uavPos); -// camTracker->setMinimumDistance(0.0001f); -// camTracker->setDistance(0.001f); -// camTracker->setTrackerMode(osgGA::NodeTrackerManipulator::NODE_CENTER); -// view->setCameraManipulator(camTracker); - - Grid *grid = new Grid(); - grid->setControl(0, 0, new LabelControl("OpenPilot")); - ControlCanvas::get(view, true)->addControl(grid); - - // zoom to a good startup position - manip->setViewpoint(Viewpoint(-71.100549, 42.349273, 0, 24.261, -21.6, 350.0), 5.0); - // manip->setViewpoint( Viewpoint(-71.100549, 42.349273, 0, 24.261, -81.6, 650.0), 5.0 ); - // manip->setHomeViewpoint(Viewpoint("Boston", osg::Vec3d(-71.0763, 42.34425, 0), 24.261, -21.6, 3450.0)); - - manip->setTetherNode(uavPos); - - osgQt::GraphicsWindowQt *gw = dynamic_cast(camera->getGraphicsContext()); - return gw ? gw->getGLWidget() : NULL; -} - -osg::Camera *OsgViewerWidget::createCamera(int x, int y, int w, int h, const std::string & name = "", bool windowDecoration = false) -{ - osg::DisplaySettings *ds = osg::DisplaySettings::instance().get(); - osg::ref_ptr traits = new osg::GraphicsContext::Traits; - - traits->windowName = name; - traits->windowDecoration = windowDecoration; - traits->x = x; - traits->y = y; - traits->width = w; - traits->height = h; - traits->doubleBuffer = true; - traits->alpha = ds->getMinimumNumAlphaBits(); - traits->stencil = ds->getMinimumNumStencilBits(); - traits->sampleBuffers = ds->getMultiSamples(); - traits->samples = ds->getNumMultiSamples(); - - osg::ref_ptr camera = new osg::Camera; - camera->setGraphicsContext(new osgQt::GraphicsWindowQt(traits.get())); - - camera->setClearColor(osg::Vec4(0.2, 0.2, 0.6, 1.0)); - camera->setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); - camera->setProjectionMatrixAsPerspective( - 30.0f, static_cast(traits->width) / static_cast(traits->height), 1.0f, 10000.0f); - return camera.release(); -} - -osg::Node *OsgViewerWidget::createAirplane() -{ - osg::Group *model = new osg::Group; - osg::Node *uav; - - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - - Q_ASSERT(pm); - UAVObjectManager *objMngr = pm->getObject(); - Q_ASSERT(objMngr); - - SystemSettings *systemSettingsObj = SystemSettings::GetInstance(objMngr); - SystemSettings::DataFields systemSettings = systemSettingsObj->getData(); - - qDebug() << "Frame type:" << systemSettingsObj->getField("AirframeType")->getValue().toString(); - // Get model that matches airframe type - switch (systemSettings.AirframeType) { - case SystemSettings::AIRFRAMETYPE_FIXEDWING: - case SystemSettings::AIRFRAMETYPE_FIXEDWINGELEVON: - case SystemSettings::AIRFRAMETYPE_FIXEDWINGVTAIL: - uav = osgDB::readNodeFile("/Users/Cotton/Programming/OpenPilot/artwork/3D Model/planes/Easystar/easystar.3ds"); - break; - default: - uav = osgDB::readNodeFile("/Users/Cotton/Programming/OpenPilot/artwork/3D Model/multi/joes_cnc/J14-QT_+.3DS"); - } - - if (uav) { - uavAttitudeAndScale = new osg::MatrixTransform(); - uavAttitudeAndScale->setMatrix(osg::Matrixd::scale(0.2e0, 0.2e0, 0.2e0)); - - // Apply a rotation so model is NED before any other rotations - osg::MatrixTransform *rotateModelNED = new osg::MatrixTransform(); - rotateModelNED->setMatrix(osg::Matrixd::scale(0.05e0, 0.05e0, 0.05e0) * osg::Matrixd::rotate(M_PI, osg::Vec3d(0, 0, 1))); - rotateModelNED->addChild(uav); - - uavAttitudeAndScale->addChild(rotateModelNED); - - model->addChild(uavAttitudeAndScale); - } else { - qDebug() << "Bad model file"; - } - return model; -} - -void OsgViewerWidget::paintEvent(QPaintEvent *event) -{ - Q_UNUSED(event); - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - UAVObjectManager *objMngr = pm->getObject(); - - PositionState *positionStateObj = PositionState::GetInstance(objMngr); - PositionState::DataFields positionState = positionStateObj->getData(); - double NED[3] = { positionState.North, positionState.East, positionState.Down }; - - bool positionStateUpdate = true; - if (positionStateUpdate) { - HomeLocation *homeLocationObj = HomeLocation::GetInstance(objMngr); - HomeLocation::DataFields homeLocation = homeLocationObj->getData(); - double homeLLA[3] = { homeLocation.Latitude / 10.0e6, homeLocation.Longitude / 10.0e6, homeLocation.Altitude }; - - double LLA[3]; - CoordinateConversions().NED2LLA_HomeLLA(homeLLA, NED, LLA); - uavPos->getLocator()->setPosition(osg::Vec3d(LLA[1], LLA[0], LLA[2])); // Note this takes longtitude first - } else { - GPSPositionSensor *gpsPosObj = GPSPositionSensor::GetInstance(objMngr); - GPSPositionSensor::DataFields gpsPos = gpsPosObj->getData(); - uavPos->getLocator()->setPosition(osg::Vec3d(gpsPos.Longitude / 10.0e6, gpsPos.Latitude / 10.0e6, gpsPos.Altitude)); - } - - // Set the attitude (reverse the attitude) - AttitudeState *attitudeStateObj = AttitudeState::GetInstance(objMngr); - AttitudeState::DataFields attitudeState = attitudeStateObj->getData(); - osg::Quat quat(attitudeState.q2, attitudeState.q3, attitudeState.q4, attitudeState.q1); - - // Have to rotate the axes from OP NED frame to OSG frame (X east, Y north, Z down) - double angle; - osg::Vec3d axis; - quat.getRotate(angle, axis); - quat.makeRotate(angle, osg::Vec3d(axis[1], axis[0], -axis[2])); - osg::Matrixd rot = osg::Matrixd::rotate(quat); - - uavAttitudeAndScale->setMatrix(rot); - - frame(); -} diff --git a/ground/gcs/src/plugins/osgearthview/osgviewerwidget.h b/ground/gcs/src/plugins/osgearthview/osgviewerwidget.h deleted file mode 100644 index 03002c32f..000000000 --- a/ground/gcs/src/plugins/osgearthview/osgviewerwidget.h +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************** - * @file osgviewerwidget.h - * @author The OpenPilot Team Copyright (C) 2012. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup OsgEarthview Plugin - * @{ - * @brief Osg Earth view of UAV - *****************************************************************************/ -/* - * 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 OSGVIEWERWIDGET_H -#define OSGVIEWERWIDGET_H - -#include - -#include "osgearthviewgadgetconfiguration.h" -#include "extensionsystem/pluginmanager.h" -#include "uavobjectmanager.h" -#include "uavobject.h" - -#include - -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace osgEarth::Util; -using namespace osgEarth::Util::Controls; -using namespace osgEarth::Symbology; -using namespace osgEarth::Drivers; -using namespace osgEarth::Annotation; - -#include - -#include - -class OsgViewerWidget : public QWidget, public osgViewer::CompositeViewer { - Q_OBJECT -public: - explicit OsgViewerWidget(QWidget *parent = 0); - ~OsgViewerWidget(); -signals: - -public slots: - -protected: - void paintEvent(QPaintEvent *event); - - /* Create a osgQt::GraphicsWindowQt to add to the widget */ - QWidget *createViewWidget(osg::Camera *camera, osg::Node *scene); - - /* Create an osg::Camera which sets up the OSG view */ - osg::Camera *createCamera(int x, int y, int w, int h, const std::string & name, bool windowDecoration); - - /* Get the model to render */ - osg::Node *createAirplane(); - -private: /* Private variables */ - QTimer _timer; - EarthManipulator *manip; - osgEarth::Util::ObjectLocatorNode *uavPos; - osg::MatrixTransform *uavAttitudeAndScale; - osgEarth::MapNode *mapNode; -}; - - -#endif // OSGVIEWERWIDGET_H diff --git a/ground/gcs/src/plugins/plugins.pro b/ground/gcs/src/plugins/plugins.pro index fe277a68d..72153e954 100644 --- a/ground/gcs/src/plugins/plugins.pro +++ b/ground/gcs/src/plugins/plugins.pro @@ -206,15 +206,6 @@ plugin_uavobjectutil.depends = plugin_coreplugin plugin_uavobjectutil.depends += plugin_uavobjects SUBDIRS += plugin_uavobjectutil -# OSG Earth View plugin -OSG { - plugin_osgearthview.subdir = osgearthview - plugin_osgearthview.depends = plugin_coreplugin - plugin_osgearthview.depends += plugin_uavobjects - plugin_osgearthview.depends += plugin_uavobjectwidgetutils - SUBDIRS += plugin_osgearthview -} - # Magic Waypoint gadget plugin_magicwaypoint.subdir = magicwaypoint plugin_magicwaypoint.depends = plugin_coreplugin