From b15c803328ba9624c60002c5d3d1e3926190c7cf Mon Sep 17 00:00:00 2001 From: julien Date: Mon, 15 Mar 2010 22:09:47 +0000 Subject: [PATCH] Corrected compilation of UAVTalk plugin for windows (class export) OP-15: Added stub plugin for rawhid code git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@322 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/plugins.pro | 5 ++ ground/src/plugins/rawhid/RawHID.pluginspec | 10 ++++ ground/src/plugins/rawhid/rawhid.pri | 3 + ground/src/plugins/rawhid/rawhid.pro | 15 +++++ .../plugins/rawhid/rawhid_dependencies.pri | 1 + ground/src/plugins/rawhid/rawhidplugin.cpp | 59 +++++++++++++++++++ ground/src/plugins/rawhid/rawhidplugin.h | 50 ++++++++++++++++ .../src/plugins/uavobjects/uavdataobject.cpp | 2 +- ground/src/plugins/uavobjects/uavdataobject.h | 5 +- .../src/plugins/uavobjects/uavmetaobject.cpp | 2 +- ground/src/plugins/uavobjects/uavmetaobject.h | 5 +- ground/src/plugins/uavobjects/uavobject.cpp | 2 +- ground/src/plugins/uavobjects/uavobject.h | 5 +- .../src/plugins/uavobjects/uavobjectfield.cpp | 2 +- .../src/plugins/uavobjects/uavobjectfield.h | 5 +- .../plugins/uavobjects/uavobjectmanager.cpp | 2 +- .../src/plugins/uavobjects/uavobjectmanager.h | 5 +- ground/src/plugins/uavobjects/uavobjects.pro | 4 +- .../src/plugins/uavobjects/uavobjectsinit.cpp | 2 +- .../src/plugins/uavobjects/uavobjectsinit.h | 18 +++--- .../plugins/uavobjects/uavobjectsplugin.cpp | 2 +- .../src/plugins/uavobjects/uavobjectsplugin.h | 5 +- ground/src/plugins/welcome/welcome_global.h | 2 +- 23 files changed, 181 insertions(+), 30 deletions(-) create mode 100644 ground/src/plugins/rawhid/RawHID.pluginspec create mode 100644 ground/src/plugins/rawhid/rawhid.pri create mode 100644 ground/src/plugins/rawhid/rawhid.pro create mode 100644 ground/src/plugins/rawhid/rawhid_dependencies.pri create mode 100644 ground/src/plugins/rawhid/rawhidplugin.cpp create mode 100644 ground/src/plugins/rawhid/rawhidplugin.h diff --git a/ground/src/plugins/plugins.pro b/ground/src/plugins/plugins.pro index f70dd70e2..fb1d246d7 100644 --- a/ground/src/plugins/plugins.pro +++ b/ground/src/plugins/plugins.pro @@ -18,6 +18,11 @@ plugin_coreplugin.subdir = coreplugin plugin_welcome.subdir = welcome plugin_welcome.depends = plugin_coreplugin +# RawHID plug-in +SUBDIRS += plugin_rawhid +plugin_rawhid.subdir = rawhid +plugin_rawhid.depends = plugin_coreplugin + # UAVObjects plug-in SUBDIRS += plugin_uavobjects plugin_uavobjects.subdir = uavobjects diff --git a/ground/src/plugins/rawhid/RawHID.pluginspec b/ground/src/plugins/rawhid/RawHID.pluginspec new file mode 100644 index 000000000..644bbfc95 --- /dev/null +++ b/ground/src/plugins/rawhid/RawHID.pluginspec @@ -0,0 +1,10 @@ + +The OpenPilot Project + (C) 2010 OpenPilot Project + GNU Public License (GPL) Version 3 + Connection to OpenPilot board using RawHID USB interface + http://www.openpilot.org + + + + diff --git a/ground/src/plugins/rawhid/rawhid.pri b/ground/src/plugins/rawhid/rawhid.pri new file mode 100644 index 000000000..2761db5be --- /dev/null +++ b/ground/src/plugins/rawhid/rawhid.pri @@ -0,0 +1,3 @@ +include(rawhid_dependencies.pri) + +LIBS *= -l$$qtLibraryTarget(RawHID) diff --git a/ground/src/plugins/rawhid/rawhid.pro b/ground/src/plugins/rawhid/rawhid.pro new file mode 100644 index 000000000..b28c8d97d --- /dev/null +++ b/ground/src/plugins/rawhid/rawhid.pro @@ -0,0 +1,15 @@ +TEMPLATE = lib +TARGET = RawHID +include(../../openpilotgcsplugin.pri) +include(rawhid_dependencies.pri) + +HEADERS += rawhidplugin.h + +SOURCES += rawhidplugin.cpp + +FORMS += + +RESOURCES += + +DEFINES += RAWHID_LIBRARY +OTHER_FILES += RawHID.pluginspec diff --git a/ground/src/plugins/rawhid/rawhid_dependencies.pri b/ground/src/plugins/rawhid/rawhid_dependencies.pri new file mode 100644 index 000000000..0e063b82b --- /dev/null +++ b/ground/src/plugins/rawhid/rawhid_dependencies.pri @@ -0,0 +1 @@ +include(../../plugins/coreplugin/coreplugin.pri) \ No newline at end of file diff --git a/ground/src/plugins/rawhid/rawhidplugin.cpp b/ground/src/plugins/rawhid/rawhidplugin.cpp new file mode 100644 index 000000000..b2fd5df4c --- /dev/null +++ b/ground/src/plugins/rawhid/rawhidplugin.cpp @@ -0,0 +1,59 @@ +/** + ****************************************************************************** + * + * @file rawhidplugin.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. + * @brief + * @see The GNU Public License (GPL) Version 3 + * @defgroup welcomeplugin + * @{ + * + *****************************************************************************/ +/* + * 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 "rawhidplugin.h" + +#include + +#include + +RawHIDPlugin::RawHIDPlugin() +{ + +} + +RawHIDPlugin::~RawHIDPlugin() +{ + +} + +void RawHIDPlugin::extensionsInitialized() +{ + +} + +bool RawHIDPlugin::initialize(const QStringList & arguments, QString * errorString) +{ + Q_UNUSED(arguments); + Q_UNUSED(errorString); + + return true; +} + + +Q_EXPORT_PLUGIN(RawHIDPlugin) diff --git a/ground/src/plugins/rawhid/rawhidplugin.h b/ground/src/plugins/rawhid/rawhidplugin.h new file mode 100644 index 000000000..c9f658520 --- /dev/null +++ b/ground/src/plugins/rawhid/rawhidplugin.h @@ -0,0 +1,50 @@ +/** + ****************************************************************************** + * + * @file rawhid.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. + * @brief + * @see The GNU Public License (GPL) Version 3 + * @defgroup welcomeplugin + * @{ + * + *****************************************************************************/ +/* + * 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 RAWHIDPLUGIN_H +#define RAWHIDPLUGIN_H + +#include + + +class RawHIDPlugin + : public ExtensionSystem::IPlugin +{ + Q_OBJECT + +public: + RawHIDPlugin(); + ~RawHIDPlugin(); + + bool initialize(const QStringList &arguments, QString *error_message); + + void extensionsInitialized(); +}; + + +#endif // RAWHIDPLUGIN_H diff --git a/ground/src/plugins/uavobjects/uavdataobject.cpp b/ground/src/plugins/uavobjects/uavdataobject.cpp index e170bb9be..0d7a7efd2 100644 --- a/ground/src/plugins/uavobjects/uavdataobject.cpp +++ b/ground/src/plugins/uavobjects/uavdataobject.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavdataobject.h b/ground/src/plugins/uavobjects/uavdataobject.h index 42ccf83eb..093c68e78 100644 --- a/ground/src/plugins/uavobjects/uavdataobject.h +++ b/ground/src/plugins/uavobjects/uavdataobject.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -28,12 +28,13 @@ #ifndef UAVDATAOBJECT_H #define UAVDATAOBJECT_H +#include "uavobjects_global.h" #include "uavobject.h" #include "uavobjectfield.h" #include "uavmetaobject.h" #include -class UAVDataObject: public UAVObject +class UAVOBJECTS_EXPORT UAVDataObject: public UAVObject { Q_OBJECT diff --git a/ground/src/plugins/uavobjects/uavmetaobject.cpp b/ground/src/plugins/uavobjects/uavmetaobject.cpp index f9e9ee5ef..0fcd85143 100644 --- a/ground/src/plugins/uavobjects/uavmetaobject.cpp +++ b/ground/src/plugins/uavobjects/uavmetaobject.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavmetaobject.h b/ground/src/plugins/uavobjects/uavmetaobject.h index 31b49a7dd..8487c7f16 100644 --- a/ground/src/plugins/uavobjects/uavmetaobject.h +++ b/ground/src/plugins/uavobjects/uavmetaobject.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -28,9 +28,10 @@ #ifndef UAVMETAOBJECT_H #define UAVMETAOBJECT_H +#include "uavobjects_global.h" #include "uavobject.h" -class UAVMetaObject: public UAVObject +class UAVOBJECTS_EXPORT UAVMetaObject: public UAVObject { Q_OBJECT diff --git a/ground/src/plugins/uavobjects/uavobject.cpp b/ground/src/plugins/uavobjects/uavobject.cpp index 8a5e57376..2722111e3 100644 --- a/ground/src/plugins/uavobjects/uavobject.cpp +++ b/ground/src/plugins/uavobjects/uavobject.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavobject.h b/ground/src/plugins/uavobjects/uavobject.h index 4f7954977..378861df7 100644 --- a/ground/src/plugins/uavobjects/uavobject.h +++ b/ground/src/plugins/uavobjects/uavobject.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -28,6 +28,7 @@ #ifndef UAVOBJECT_H #define UAVOBJECT_H +#include "uavobjects_global.h" #include #include #include @@ -38,7 +39,7 @@ class UAVObjectField; -class UAVObject: public QObject +class UAVOBJECTS_EXPORT UAVObject: public QObject { Q_OBJECT diff --git a/ground/src/plugins/uavobjects/uavobjectfield.cpp b/ground/src/plugins/uavobjects/uavobjectfield.cpp index 66efe0a23..f967ef6e8 100644 --- a/ground/src/plugins/uavobjects/uavobjectfield.cpp +++ b/ground/src/plugins/uavobjects/uavobjectfield.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavobjectfield.h b/ground/src/plugins/uavobjects/uavobjectfield.h index 29dc28e58..bd85bdae6 100644 --- a/ground/src/plugins/uavobjects/uavobjectfield.h +++ b/ground/src/plugins/uavobjects/uavobjectfield.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -28,11 +28,12 @@ #ifndef UAVOBJECTFIELD_H #define UAVOBJECTFIELD_H +#include "uavobjects_global.h" #include "uavobject.h" class UAVObject; -class UAVObjectField: public QObject +class UAVOBJECTS_EXPORT UAVObjectField: public QObject { Q_OBJECT diff --git a/ground/src/plugins/uavobjects/uavobjectmanager.cpp b/ground/src/plugins/uavobjects/uavobjectmanager.cpp index d7c596fa8..fde3eb031 100644 --- a/ground/src/plugins/uavobjects/uavobjectmanager.cpp +++ b/ground/src/plugins/uavobjects/uavobjectmanager.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavobjectmanager.h b/ground/src/plugins/uavobjects/uavobjectmanager.h index bdebe0955..3c742b19f 100644 --- a/ground/src/plugins/uavobjects/uavobjectmanager.h +++ b/ground/src/plugins/uavobjects/uavobjectmanager.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -28,6 +28,7 @@ #ifndef UAVOBJECTMANAGER_H #define UAVOBJECTMANAGER_H +#include "uavobjects_global.h" #include "uavobject.h" #include "uavdataobject.h" #include "uavmetaobject.h" @@ -35,7 +36,7 @@ #include #include -class UAVObjectManager: public QObject +class UAVOBJECTS_EXPORT UAVObjectManager: public QObject { Q_OBJECT diff --git a/ground/src/plugins/uavobjects/uavobjects.pro b/ground/src/plugins/uavobjects/uavobjects.pro index a2d2c3c18..9a5bfb8b9 100644 --- a/ground/src/plugins/uavobjects/uavobjects.pro +++ b/ground/src/plugins/uavobjects/uavobjects.pro @@ -4,7 +4,8 @@ TARGET = UAVObjects include(../../openpilotgcsplugin.pri) include(uavobjects_dependencies.pri) -HEADERS += uavobject.h \ +HEADERS += uavobjects_global.h \ + uavobject.h \ uavmetaobject.h \ uavobjectmanager.h \ uavdataobject.h \ @@ -20,4 +21,5 @@ SOURCES += uavobject.cpp \ uavobjectsinit.cpp \ uavobjectsplugin.cpp +DEFINES += UAVOBJECTS_LIBRARY OTHER_FILES += UAVObjects.pluginspec diff --git a/ground/src/plugins/uavobjects/uavobjectsinit.cpp b/ground/src/plugins/uavobjects/uavobjectsinit.cpp index 2c1fa5747..8abdd684c 100644 --- a/ground/src/plugins/uavobjects/uavobjectsinit.cpp +++ b/ground/src/plugins/uavobjects/uavobjectsinit.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavobjectsinit.h b/ground/src/plugins/uavobjects/uavobjectsinit.h index 32dfd7b9d..2543b6bc8 100644 --- a/ground/src/plugins/uavobjects/uavobjectsinit.h +++ b/ground/src/plugins/uavobjects/uavobjectsinit.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -25,11 +25,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef UAVOBJECTSINIT_H -#define UAVOBJECTSINIT_H - -#include "uavobjectmanager.h" - -void UAVObjectsInitialize(UAVObjectManager* objMngr); - -#endif // UAVOBJECTSINIT_H +#ifndef UAVOBJECTSINIT_H +#define UAVOBJECTSINIT_H + +#include "uavobjectmanager.h" + +void UAVObjectsInitialize(UAVObjectManager* objMngr); + +#endif // UAVOBJECTSINIT_H diff --git a/ground/src/plugins/uavobjects/uavobjectsplugin.cpp b/ground/src/plugins/uavobjects/uavobjectsplugin.cpp index 486335e22..3354610c9 100644 --- a/ground/src/plugins/uavobjects/uavobjectsplugin.cpp +++ b/ground/src/plugins/uavobjects/uavobjectsplugin.cpp @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ diff --git a/ground/src/plugins/uavobjects/uavobjectsplugin.h b/ground/src/plugins/uavobjects/uavobjectsplugin.h index 6a336ce52..e582b9acf 100644 --- a/ground/src/plugins/uavobjects/uavobjectsplugin.h +++ b/ground/src/plugins/uavobjects/uavobjectsplugin.h @@ -6,7 +6,7 @@ * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. * @brief * @see The GNU Public License (GPL) Version 3 - * @defgroup + * @defgroup uavobjects_plugin * @{ * *****************************************************************************/ @@ -28,11 +28,12 @@ #ifndef UAVOBJECTSPLUGIN_H #define UAVOBJECTSPLUGIN_H +#include "uavobjects_global.h" #include #include #include "uavobjectmanager.h" -class UAVObjectsPlugin: +class UAVOBJECTS_EXPORT UAVObjectsPlugin: public ExtensionSystem::IPlugin { Q_OBJECT diff --git a/ground/src/plugins/welcome/welcome_global.h b/ground/src/plugins/welcome/welcome_global.h index da5a9a8fb..64b13e705 100644 --- a/ground/src/plugins/welcome/welcome_global.h +++ b/ground/src/plugins/welcome/welcome_global.h @@ -37,4 +37,4 @@ # define WELCOME_EXPORT Q_DECL_IMPORT #endif -#endif // CPPEDITOR_GLOBAL_H +#endif // WELCOME_GLOBAL_H