diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-03-26 07:27:41 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-03-26 07:27:41 -0400 |
commit | ef69b64492c2fb751d457ca3d4741ee823a01205 (patch) | |
tree | 9d718fc41e156ac6a32f15d712447d9579e693f7 | |
parent | b199d7ba7f8d2f0ace6a85f9ea5718676d9e2180 (diff) | |
download | sigen-ef69b64492c2fb751d457ca3d4741ee823a01205.tar.gz sigen-ef69b64492c2fb751d457ca3d4741ee823a01205.tar.xz sigen-ef69b64492c2fb751d457ca3d4741ee823a01205.zip |
Add PluginBase class for all plugins
-rw-r--r-- | sigencore/plugins/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sigencore/plugins/PluginBase.cpp | 31 | ||||
-rw-r--r-- | sigencore/plugins/PluginBase.h | 48 |
3 files changed, 81 insertions, 0 deletions
diff --git a/sigencore/plugins/CMakeLists.txt b/sigencore/plugins/CMakeLists.txt index d062e31c..c945d964 100644 --- a/sigencore/plugins/CMakeLists.txt +++ b/sigencore/plugins/CMakeLists.txt @@ -3,11 +3,13 @@ project(plugins) set(sigencoreplugins_HEADERS ArenaPlugin.h CanvasPlugin.h + PluginBase.h Global.h ) set(sigencoreplugins_SRCS ArenaPlugin.cpp CanvasPlugin.cpp + PluginBase.cpp ) set(sigencoreplugins_SERVICETYPES sigen_arena.desktop diff --git a/sigencore/plugins/PluginBase.cpp b/sigencore/plugins/PluginBase.cpp new file mode 100644 index 00000000..f53ff2e2 --- /dev/null +++ b/sigencore/plugins/PluginBase.cpp @@ -0,0 +1,31 @@ +/* + * Copyright 2009 Ben Boeckel <MathStuf@gmail.com> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +// Header include +#include "PluginBase.h" + +using namespace Sigencore::Plugins; + +PluginBase::PluginBase(QObject* parent, const QVariantList& args) : + QObject(parent) +{ + Q_UNUSED(args) +} + +PluginBase::~PluginBase() +{ +} diff --git a/sigencore/plugins/PluginBase.h b/sigencore/plugins/PluginBase.h new file mode 100644 index 00000000..e19815b7 --- /dev/null +++ b/sigencore/plugins/PluginBase.h @@ -0,0 +1,48 @@ +/* + * Copyright 2009 Ben Boeckel <MathStuf@gmail.com> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef SIGENCOREPLUGINS_PLUGINBASE +#define SIGENCOREPLUGINS_PLUGINBASE + +// Sigencore plugin includes +#include "Global.h" + +// Qt includes +#include <QtCore/QStringList> +#include <QtCore/QVariantList> +#include <QtGui/QIcon> + +namespace Sigencore +{ +namespace Plugins +{ +class SIGENCOREPLUGINS_EXPORT PluginBase : public QObject +{ + Q_OBJECT + + public: + PluginBase(QObject* parent, const QVariantList& args); + virtual ~PluginBase(); + + virtual QStringList classList() const = 0; + virtual QString description(const QString& name) const = 0; + virtual QIcon icon(const QString& name) = 0; +}; +} +} + +#endif |