summaryrefslogtreecommitdiffstats
path: root/sigtools
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-06-06 16:33:26 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-06-06 16:33:26 -0400
commit1ae065382c31fc25e213eab230ef03b7df362226 (patch)
tree45e11d3ad4c723f8bd8c505c74929a27206c427b /sigtools
parentb66836bd1c15eee8258fd91cca1dc423c4b8dce1 (diff)
downloadsigen-1ae065382c31fc25e213eab230ef03b7df362226.tar.gz
sigen-1ae065382c31fc25e213eab230ef03b7df362226.tar.xz
sigen-1ae065382c31fc25e213eab230ef03b7df362226.zip
Add extensionto PluginLoader
Diffstat (limited to 'sigtools')
-rw-r--r--sigtools/PluginLoader.cpp8
-rw-r--r--sigtools/PluginLoader.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/sigtools/PluginLoader.cpp b/sigtools/PluginLoader.cpp
index 8de9e16e..2603c169 100644
--- a/sigtools/PluginLoader.cpp
+++ b/sigtools/PluginLoader.cpp
@@ -72,6 +72,14 @@ QIcon PluginLoader::icon(const QString& type, const QString& name)
return QIcon();
}
+QStringList PluginLoader::extensions(const QString& type, const QString& name)
+{
+ PluginBase* plugin = loader->factory(type, name);
+ if (plugin)
+ return plugin->extensions(name);
+ return QStringList();
+}
+
QSharedPointer<Game> PluginLoader::game(const QString& game)
{
return loader->game(game);
diff --git a/sigtools/PluginLoader.h b/sigtools/PluginLoader.h
index 6136e806..ce8b6dc7 100644
--- a/sigtools/PluginLoader.h
+++ b/sigtools/PluginLoader.h
@@ -54,6 +54,7 @@ namespace PluginLoader
SIGTOOLS_EXPORT QString description(const QString& type, const QString& name);
SIGTOOLS_EXPORT QIcon icon(const QString& type, const QString& name);
+ SIGTOOLS_EXPORT QStringList extensions(const QString& type, const QString& name);
SIGTOOLS_EXPORT QSharedPointer<Sigmod::Game> game(const QString& game);
SIGTOOLS_EXPORT Sigencore::Arena* arena(const QString& arena, Sigscript::GameWrapper* game, Sigscript::Config* parent);