[Tux4kids-commits] r1133 - in tux4kids-admin/trunk: . plugins plugins/dummy plugins/tuxmathPlugin
Michał Świtakowski
swistakers-guest at alioth.debian.org
Thu Jul 2 21:13:12 UTC 2009
Author: swistakers-guest
Date: 2009-07-02 21:13:09 +0000 (Thu, 02 Jul 2009)
New Revision: 1133
Added:
tux4kids-admin/trunk/plugins/tuxmathPlugin/
tux4kids-admin/trunk/plugins/tuxmathPlugin/CMakeLists.txt
tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.cpp
tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.h
tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.pro
Modified:
tux4kids-admin/trunk/CMakeLists.txt
tux4kids-admin/trunk/plugins/dummy/dummy.cpp
tux4kids-admin/trunk/plugins/dummy/dummy.h
tux4kids-admin/trunk/plugins/dummy/dummy.pro
tux4kids-admin/trunk/plugins/pluginInterface.h
tux4kids-admin/trunk/tux4kids-admin.pro
Log:
added plugin for tuxmath
Modified: tux4kids-admin/trunk/CMakeLists.txt
===================================================================
--- tux4kids-admin/trunk/CMakeLists.txt 2009-07-02 16:13:17 UTC (rev 1132)
+++ tux4kids-admin/trunk/CMakeLists.txt 2009-07-02 21:13:09 UTC (rev 1133)
@@ -2,6 +2,7 @@
add_subdirectory( src/ )
add_subdirectory( plugins/dummy/ )
+add_subdirectory( plugins/tuxmathPlugin )
find_package( Qt4 REQUIRED )
Modified: tux4kids-admin/trunk/plugins/dummy/dummy.cpp
===================================================================
--- tux4kids-admin/trunk/plugins/dummy/dummy.cpp 2009-07-02 16:13:17 UTC (rev 1132)
+++ tux4kids-admin/trunk/plugins/dummy/dummy.cpp 2009-07-02 21:13:09 UTC (rev 1133)
@@ -8,9 +8,14 @@
{
}
-QString DummyPlugin::name()
+QString DummyPlugin::name() const
{
return tr("dummy plugin");
}
-Q_EXPORT_PLUGIN2(dummyPlugin, DummyPlugin);
+QString DummyPlugin::version() const
+{
+ return "0.1";
+}
+
+Q_EXPORT_PLUGIN2(DummyPlugin, DummyPlugin);
Modified: tux4kids-admin/trunk/plugins/dummy/dummy.h
===================================================================
--- tux4kids-admin/trunk/plugins/dummy/dummy.h 2009-07-02 16:13:17 UTC (rev 1132)
+++ tux4kids-admin/trunk/plugins/dummy/dummy.h 2009-07-02 21:13:09 UTC (rev 1133)
@@ -14,7 +14,8 @@
DummyPlugin(QObject *parent = 0);
~DummyPlugin();
- QString name();
+ QString name() const;
+ QString version() const;
};
Modified: tux4kids-admin/trunk/plugins/dummy/dummy.pro
===================================================================
--- tux4kids-admin/trunk/plugins/dummy/dummy.pro 2009-07-02 16:13:17 UTC (rev 1132)
+++ tux4kids-admin/trunk/plugins/dummy/dummy.pro 2009-07-02 21:13:09 UTC (rev 1133)
@@ -6,7 +6,7 @@
SOURCES = dummy.cpp \
-TARGET = $$qtLibraryTarget(dummyPlugin)
+TARGET = $$qtLibraryTarget(DummyPlugin)
DESTDIR = ../
# Uncomment to use GCOV
Modified: tux4kids-admin/trunk/plugins/pluginInterface.h
===================================================================
--- tux4kids-admin/trunk/plugins/pluginInterface.h 2009-07-02 16:13:17 UTC (rev 1132)
+++ tux4kids-admin/trunk/plugins/pluginInterface.h 2009-07-02 21:13:09 UTC (rev 1133)
@@ -9,7 +9,10 @@
public:
virtual ~PluginInterface() {}
- virtual QString name() = 0;
+ virtual QString name() const = 0;
+ virtual QString version() const = 0;
+
+ //virtual QWidget *widget() = 0;
};
Q_DECLARE_INTERFACE(PluginInterface, "org.Tux4Kids.Tux4KidsPluginInterface/0.0.1");
Added: tux4kids-admin/trunk/plugins/tuxmathPlugin/CMakeLists.txt
===================================================================
--- tux4kids-admin/trunk/plugins/tuxmathPlugin/CMakeLists.txt (rev 0)
+++ tux4kids-admin/trunk/plugins/tuxmathPlugin/CMakeLists.txt 2009-07-02 21:13:09 UTC (rev 1133)
@@ -0,0 +1,24 @@
+PROJECT(tuxmathPlugin)
+cmake_minimum_required(VERSION 2.6)
+
+SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/../ )
+
+# enable warnings
+ADD_DEFINITIONS( -Wall )
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+ADD_DEFINITIONS(-DQT_PLUGIN)
+#ADD_DEFINITIONS(-DQT_NO_DEBUG)
+ADD_DEFINITIONS(-DQT_SHARED)
+
+SET(TUXMATH_PLUGIN_MOC_HEADERS tuxmathPlugin.h)
+SET(TUXMATH_PLUGIN_SOURCES tuxmathPlugin.cpp)
+
+FIND_PACKAGE( Qt4 REQUIRED )
+INCLUDE( ${QT_USE_FILE} )
+INCLUDE_DIRECTORIES( ../ ${CMAKE_CURRENT_BINARY_DIR} )
+
+QT4_WRAP_CPP( TUXMATH_PLUGIN_MOC_SOURCES ${TUXMATH_PLUGIN_MOC_HEADERS} )
+
+ADD_LIBRARY(TuxmathPlugin SHARED ${TUXMATH_PLUGIN_MOC_SOURCES} ${TUXMATH_PLUGIN_SOURCES} )
+TARGET_LINK_LIBRARIES( TuxmathPlugin ${QT_LIBRARIES} )
+
Added: tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.cpp
===================================================================
--- tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.cpp (rev 0)
+++ tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.cpp 2009-07-02 21:13:09 UTC (rev 1133)
@@ -0,0 +1,21 @@
+#include "tuxmathPlugin.h"
+
+TuxmathPlugin::TuxmathPlugin(QObject *parent) : QObject(parent)
+{
+}
+
+TuxmathPlugin::~TuxmathPlugin()
+{
+}
+
+QString TuxmathPlugin::name() const
+{
+ return tr("tuxmath plugin");
+}
+
+QString TuxmathPlugin::version() const
+{
+ return "0.0.1";
+}
+
+Q_EXPORT_PLUGIN2(TuxmathPlugin, TuxmathPlugin);
Added: tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.h
===================================================================
--- tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.h (rev 0)
+++ tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.h 2009-07-02 21:13:09 UTC (rev 1133)
@@ -0,0 +1,23 @@
+#ifndef TUXMATH_PLUGIN_H
+#define TUXMATH_PLUGIN_H
+
+#include <QObject>
+
+#include "pluginInterface.h"
+
+class TuxmathPlugin : public QObject, PluginInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(PluginInterface)
+
+public:
+ TuxmathPlugin(QObject *parent = 0);
+ ~TuxmathPlugin();
+
+ QString name() const;
+ QString version() const;
+
+
+};
+
+#endif
Added: tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.pro
===================================================================
--- tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.pro (rev 0)
+++ tux4kids-admin/trunk/plugins/tuxmathPlugin/tuxmathPlugin.pro 2009-07-02 21:13:09 UTC (rev 1133)
@@ -0,0 +1,14 @@
+TEMPLATE = lib
+CONFIG += plugin
+INCLUDEPATH += ../
+
+HEADERS = tuxmathPlugin.h \
+
+SOURCES = tuxmathPlugin.cpp \
+
+TARGET = $$qtLibraryTarget(TuxmathPlugin)
+DESTDIR = ../
+
+# Uncomment to use GCOV
+# QMAKE_CXXFLAGS+=-fprofile-arcs -ftest-coverage
+
Modified: tux4kids-admin/trunk/tux4kids-admin.pro
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin.pro 2009-07-02 16:13:17 UTC (rev 1132)
+++ tux4kids-admin/trunk/tux4kids-admin.pro 2009-07-02 21:13:09 UTC (rev 1133)
@@ -2,6 +2,7 @@
SUBDIRS = src \
plugins/dummy \
+ plugins/tuxmathPlugin
TRANSLATIONS = translations/tux4kids-admin_pl.ts \
More information about the Tux4kids-commits
mailing list