[Tux4kids-commits] r1159 - in tux4kids-admin/trunk: . libtux4kidsadmin libtux4kidsadmin_tuxmath tux4kids-admin/src

Michał Świtakowski swistakers-guest at alioth.debian.org
Wed Jul 8 13:29:53 UTC 2009


Author: swistakers-guest
Date: 2009-07-08 13:29:50 +0000 (Wed, 08 Jul 2009)
New Revision: 1159

Added:
   tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.cpp
   tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.h
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.cpp
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.h
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.cpp
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.h
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.pro
   tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath_global.h
Modified:
   tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro
   tux4kids-admin/trunk/tux4kids-admin/src/mainController.cpp
   tux4kids-admin/trunk/tux4kids-admin/src/src.pro
Log:
added shared lib handling tuxmath that reimplements ApplicationDir class from tux4kidsadmin lib

Added: tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.cpp
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.cpp	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.cpp	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,11 @@
+#include "applicationDir.h"
+
+ApplicationDir::ApplicationDir(QObject *parent) : QObject(parent)
+{
+}
+
+QString ApplicationDir::foo()
+{
+	return "general";
+}
+

Added: tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.h	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/applicationDir.h	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,14 @@
+#ifndef APPLICATIONDIR_H
+#define APPLICATIONDIR_H
+
+#include <QObject>
+#include <QString>
+
+class ApplicationDir : public QObject
+{
+public:
+	ApplicationDir(QObject *parent = 0);
+	virtual QString foo();
+};
+
+#endif // APPLICATIONDIR_H

Modified: tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro	2009-07-07 22:24:37 UTC (rev 1158)
+++ tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro	2009-07-08 13:29:50 UTC (rev 1159)
@@ -1,11 +1,9 @@
-QT       -= gui
-
-TARGET = libtux4kidsadmin
+QT -= gui
+TARGET = tux4kidsadmin
 TEMPLATE = lib
-
 DEFINES += LIBTUX4KIDSADMIN_LIBRARY
-
-SOURCES += libtux4kidsadmin.cpp
-
-HEADERS += libtux4kidsadmin.h\
-        libtux4kidsadmin_global.h
+SOURCES += libtux4kidsadmin.cpp \
+    applicationDir.cpp
+HEADERS += libtux4kidsadmin.h \
+    libtux4kidsadmin_global.h \
+    applicationDir.h

Added: tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.cpp
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.cpp	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.cpp	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,10 @@
+#include "applicationDirTuxmath.h"
+
+ApplicationDirTuxmath::ApplicationDirTuxmath()
+{
+}
+
+QString ApplicationDirTuxmath::foo()
+{
+	return "tuxmath";
+}

Added: tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.h	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/applicationDirTuxmath.h	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,15 @@
+#ifndef APPLICATIONDIRTUXMATH_H
+#define APPLICATIONDIRTUXMATH_H
+
+#include <QString>
+
+#include "applicationDir.h"
+
+class ApplicationDirTuxmath : public ApplicationDir
+{
+public:
+	ApplicationDirTuxmath();
+	QString foo();
+};
+
+#endif // APPLICATIONDIRTUXMATH_H

Added: tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.cpp
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.cpp	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.cpp	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,6 @@
+#include "libtux4kidsadmin_tuxmath.h"
+
+
+Libtux4kidsadminTuxmath::Libtux4kidsadminTuxmath()
+{
+}

Added: tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.h	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.h	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,11 @@
+#ifndef LIBTUX4KIDSADMIN_TUXMATH_H
+#define LIBTUX4KIDSADMIN_TUXMATH_H
+
+#include "libtux4kidsadmin_tuxmath_global.h"
+
+class LIBTUX4KIDSADMIN_TUXMATHSHARED_EXPORT Libtux4kidsadminTuxmath {
+public:
+    Libtux4kidsadminTuxmath();
+};
+
+#endif // LIBTUX4KIDSADMIN_TUXMATH_H

Added: tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.pro
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.pro	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath.pro	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,10 @@
+QT -= gui
+TARGET = tux4kidsadmintuxmath
+TEMPLATE = lib
+DEFINES += LIBTUX4KIDSADMIN_TUXMATH_LIBRARY
+SOURCES += libtux4kidsadmin_tuxmath.cpp \
+    applicationDirTuxmath.cpp
+HEADERS += libtux4kidsadmin_tuxmath.h \
+    libtux4kidsadmin_tuxmath_global.h \
+    applicationDirTuxmath.h
+INCLUDEPATH += ../libtux4kidsadmin

Added: tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath_global.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath_global.h	                        (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin_tuxmath/libtux4kidsadmin_tuxmath_global.h	2009-07-08 13:29:50 UTC (rev 1159)
@@ -0,0 +1,12 @@
+#ifndef LIBTUX4KIDSADMIN_TUXMATH_GLOBAL_H
+#define LIBTUX4KIDSADMIN_TUXMATH_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(LIBTUX4KIDSADMIN_TUXMATH_LIBRARY)
+#  define LIBTUX4KIDSADMIN_TUXMATHSHARED_EXPORT Q_DECL_EXPORT
+#else
+#  define LIBTUX4KIDSADMIN_TUXMATHSHARED_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // LIBTUX4KIDSADMIN_TUXMATH_GLOBAL_H

Modified: tux4kids-admin/trunk/tux4kids-admin/src/mainController.cpp
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/src/mainController.cpp	2009-07-07 22:24:37 UTC (rev 1158)
+++ tux4kids-admin/trunk/tux4kids-admin/src/mainController.cpp	2009-07-08 13:29:50 UTC (rev 1159)
@@ -2,6 +2,8 @@
 #include <QApplication>
 
 #include "mainController.h"
+#include "applicationDir.h"
+#include "applicationDirTuxmath.h"
 
 MainController::MainController()
 {
@@ -11,6 +13,16 @@
 	if (m_pluginManager.empty()) {
 		qDebug() << tr("Failed to load plugins");
 	}
+
+	qDebug() << "let's create ApplicationDir object";
+	ApplicationDir appdir;
+	qDebug() << "it said" << appdir.foo();
+
+	qDebug() << "let's create ApplicationDir object";
+	ApplicationDirTuxmath appdir2;
+	qDebug() << "it said" << appdir2.foo();
+
+
 }
 
 MainController::~MainController()

Modified: tux4kids-admin/trunk/tux4kids-admin/src/src.pro
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/src/src.pro	2009-07-07 22:24:37 UTC (rev 1158)
+++ tux4kids-admin/trunk/tux4kids-admin/src/src.pro	2009-07-08 13:29:50 UTC (rev 1159)
@@ -1,6 +1,9 @@
 TARGET = ../tux4kids-admin
 TEMPLATE = app
-INCLUDEPATH += ../plugins/
+INCLUDEPATH += ../plugins/ \
+	       ../../libtux4kidsadmin \
+	       ../../libtux4kidsadmin_tuxmath
+
 SOURCES += main.cpp \
     mainWindow.cpp \
     mainController.cpp \
@@ -16,3 +19,6 @@
     errorLog.h
 FORMS += mainWindow.ui \
     pluginManagerDialog.ui
+LIBS += -ltux4kidsadmin -L../../libtux4kidsadmin
+LIBS += -ltux4kidsadmintuxmath -L../../libtux4kidsadmin_tuxmath
+




More information about the Tux4kids-commits mailing list