summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-04-10 02:35:28 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-04-10 02:35:40 -0400
commit7aad54f033b468c84b5897a29d0587b6d0c8c5ab (patch)
treef3f5fd25f718e5b9a3780c4ea8cdf5b2ffa915f9 /plugins
parent0b1fee77bb11f0cb8bf29756032b231e60168ae8 (diff)
Add basic factory for Arena -- Kross bridge
Diffstat (limited to 'plugins')
-rw-r--r--plugins/arena/CMakeLists.txt1
-rw-r--r--plugins/arena/kross/CMakeLists.txt36
-rw-r--r--plugins/arena/kross/SigenArenaKross.cpp64
-rw-r--r--plugins/arena/kross/SigenArenaKross.h41
-rw-r--r--plugins/arena/kross/sigen_arena_kross.desktop16
5 files changed, 158 insertions, 0 deletions
diff --git a/plugins/arena/CMakeLists.txt b/plugins/arena/CMakeLists.txt
index f8053948..9b042242 100644
--- a/plugins/arena/CMakeLists.txt
+++ b/plugins/arena/CMakeLists.txt
@@ -1 +1,2 @@
add_subdirectory(standard)
+add_subdirectory(kross)
diff --git a/plugins/arena/kross/CMakeLists.txt b/plugins/arena/kross/CMakeLists.txt
new file mode 100644
index 00000000..23dd22f5
--- /dev/null
+++ b/plugins/arena/kross/CMakeLists.txt
@@ -0,0 +1,36 @@
+project(sigen_arena_kross)
+
+set(sigen_arena_kross_SRCS
+ SigenArenaKross.cpp
+)
+set(sigen_arena_kross_SERVICES
+ sigen_arena_kross.desktop
+)
+
+kde4_add_plugin(sigen_arena_kross
+ ${sigen_arena_kross_SRCS}
+)
+target_link_libraries(sigen_arena_kross
+ ${QT_QTCORE_LIBRARY}
+ ${KDE4_KDEUI_LIBRARY}
+ ${KDE4_KROSSCORE_LIBRARY}
+ sigencoreplugins
+)
+
+install(
+ TARGETS
+ sigen_arena_kross
+ DESTINATION
+ ${PLUGIN_INSTALL_DIR}
+ COMPONENT
+ plugins
+)
+
+install(
+ FILES
+ ${sigen_arena_kross_SERVICES}
+ DESTINATION
+ ${SERVICES_INSTALL_DIR}
+ COMPONENT
+ plugins
+)
diff --git a/plugins/arena/kross/SigenArenaKross.cpp b/plugins/arena/kross/SigenArenaKross.cpp
new file mode 100644
index 00000000..362640e4
--- /dev/null
+++ b/plugins/arena/kross/SigenArenaKross.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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 "SigenArenaKross.h"
+
+// Sigencore includes
+#include <sigencore/Arena.h>
+
+// KDE includes
+#include <KIcon>
+
+SIGEN_ARENA_PLUGIN_VERSION(SigenArenaKross, "sigen_arena_kross", 000101)
+
+using namespace Sigscript;
+using namespace Sigencore;
+using namespace Sigencore::Plugins;
+
+SigenArenaKross::SigenArenaKross(QObject* parent, const QVariantList& args) :
+ ArenaPlugin(parent, args)
+{
+}
+
+SigenArenaKross::~SigenArenaKross()
+{
+}
+
+QStringList SigenArenaKross::classList() const
+{
+ return QStringList();
+}
+
+QString SigenArenaKross::description(const QString& name) const
+{
+ return "(Unknown arena)";
+}
+
+QIcon SigenArenaKross::icon(const QString& name)
+{
+ return KIcon();
+}
+
+Arena* SigenArenaKross::createArena(const QString& name, GameWrapper* game, Config* parent)
+{
+ return NULL;
+}
+
+void SigenArenaKross::cleanupArena(Arena* arena)
+{
+}
diff --git a/plugins/arena/kross/SigenArenaKross.h b/plugins/arena/kross/SigenArenaKross.h
new file mode 100644
index 00000000..d8c3d226
--- /dev/null
+++ b/plugins/arena/kross/SigenArenaKross.h
@@ -0,0 +1,41 @@
+/*
+ * 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 ARENAPLUGIN_SIGENARENAKROSS
+#define ARENAPLUGIN_SIGENARENAKROSS
+
+// Sigencore plugin includes
+#include <sigencore/plugins/ArenaPlugin.h>
+
+class SigenArenaKross : public Sigencore::Plugins::ArenaPlugin
+{
+ Q_OBJECT
+
+ public:
+ SigenArenaKross(QObject* parent, const QVariantList& args);
+ ~SigenArenaKross();
+
+ QStringList classList() const;
+ QString description(const QString& name) const;
+ QIcon icon(const QString& name);
+ protected:
+ Sigencore::Arena* createArena(const QString& name, Sigscript::GameWrapper* game, Sigscript::Config* parent);
+ protected slots:
+ void cleanupArena(Sigencore::Arena* arena);
+};
+
+#endif
diff --git a/plugins/arena/kross/sigen_arena_kross.desktop b/plugins/arena/kross/sigen_arena_kross.desktop
new file mode 100644
index 00000000..9eff157c
--- /dev/null
+++ b/plugins/arena/kross/sigen_arena_kross.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Type=Service
+X-KDE-ServiceTypes=Sigen/Arena
+Icon=sigen-arenaplugin
+Name=Sigen Arena Kross bridge
+X-Sigen-MinVersion=000101
+X-KDE-Library=sigen_arena_kross
+X-KDE-PluginInfo-Author=Ben Boeckel
+X-KDE-PluginInfo-Email=MathStuf@gmail.com
+X-KDE-PluginInfo-Name=sigen_arena_kross
+X-KDE-PluginInfo-Version=0.1.1
+X-KDE-PluginInfo-Website=
+X-KDE-PluginInfo-Category=arena
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPLv3
+X-KDE-PluginInfo-EnabledByDefault=true