From 9c20801b9cbfd2e0fa5488a8f61039037719bce6 Mon Sep 17 00:00:00 2001 From: dankers Date: Mon, 8 Mar 2010 01:45:42 +0000 Subject: [PATCH] Update and add the DoNothing Plugin to SVN, these will not be compiled by default but needs to remain as a template for plugin authors. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@267 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../plugins/donothing/DoNothing.pluginspec | 10 ++++++ ground/src/plugins/donothing/donothing.pro | 11 +++++++ .../src/plugins/donothing/donothingplugin.cpp | 32 +++++++++++++++++++ .../src/plugins/donothing/donothingplugin.h | 17 ++++++++++ ground/src/plugins/plugins.pro | 9 +++++- 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 ground/src/plugins/donothing/DoNothing.pluginspec create mode 100644 ground/src/plugins/donothing/donothing.pro create mode 100644 ground/src/plugins/donothing/donothingplugin.cpp create mode 100644 ground/src/plugins/donothing/donothingplugin.h diff --git a/ground/src/plugins/donothing/DoNothing.pluginspec b/ground/src/plugins/donothing/DoNothing.pluginspec new file mode 100644 index 000000000..6457b7844 --- /dev/null +++ b/ground/src/plugins/donothing/DoNothing.pluginspec @@ -0,0 +1,10 @@ + + The OpenPilot Project + (C) 2010 OpenPilot Project + Your License goes here + A plugin that does nothing! + http://www.openpilot.org + + + + diff --git a/ground/src/plugins/donothing/donothing.pro b/ground/src/plugins/donothing/donothing.pro new file mode 100644 index 000000000..00521a894 --- /dev/null +++ b/ground/src/plugins/donothing/donothing.pro @@ -0,0 +1,11 @@ + +TEMPLATE = lib +TARGET = DoNothing + +include(../../openpilotgcsplugin.pri) +include(../../plugins/coreplugin/coreplugin.pri) + +HEADERS += donothingplugin.h +SOURCES += donothingplugin.cpp + +OTHER_FILES += DoNothing.pluginspec \ No newline at end of file diff --git a/ground/src/plugins/donothing/donothingplugin.cpp b/ground/src/plugins/donothing/donothingplugin.cpp new file mode 100644 index 000000000..c86c89bce --- /dev/null +++ b/ground/src/plugins/donothing/donothingplugin.cpp @@ -0,0 +1,32 @@ +#include "donothingplugin.h" +#include +#include + +DoNothingPlugin::DoNothingPlugin() +{ + // Do nothing +} + +DoNothingPlugin::~DoNothingPlugin() +{ + // Do nothing +} + +bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg) +{ + Q_UNUSED(args); + Q_UNUSED(errMsg); + + return true; +} + +void DoNothingPlugin::extensionsInitialized() +{ + // Do nothing +} + +void DoNothingPlugin::shutdown() +{ + // Do nothing +} +Q_EXPORT_PLUGIN(DoNothingPlugin) diff --git a/ground/src/plugins/donothing/donothingplugin.h b/ground/src/plugins/donothing/donothingplugin.h new file mode 100644 index 000000000..557aec0c9 --- /dev/null +++ b/ground/src/plugins/donothing/donothingplugin.h @@ -0,0 +1,17 @@ +#ifndef DONOTHINGPLUGIN_H +#define DONOTHINGPLUGIN_H + +#include + +class DoNothingPlugin : public ExtensionSystem::IPlugin +{ +public: + DoNothingPlugin(); + ~DoNothingPlugin(); + + void extensionsInitialized(); + bool initialize(const QStringList & arguments, QString * errorString); + void shutdown(); +}; + +#endif // DONOTHINGPLUGIN_H \ No newline at end of file diff --git a/ground/src/plugins/plugins.pro b/ground/src/plugins/plugins.pro index 8ac2a2e2b..ee8078953 100644 --- a/ground/src/plugins/plugins.pro +++ b/ground/src/plugins/plugins.pro @@ -5,9 +5,16 @@ TEMPLATE = subdirs SUBDIRS = plugin_coreplugin \ plugin_welcome - + +# Blank Template Plugin, not compiled by default +SUBDIRS += plugin_donothing +plugin_donothing.subdir = donothing +plugin_donothing.depends = plugin_coreplugin + +# Core Plugin plugin_coreplugin.subdir = coreplugin +# Welcome Plugin plugin_welcome.subdir = welcome plugin_welcome.depends = plugin_coreplugin