[Tux4kids-commits] r1283 - in tux4kids-admin/trunk: libtux4kidsadmin tux4kids-admin/src
Michał Świtakowski
swistakers-guest at alioth.debian.org
Mon Jul 27 20:39:37 UTC 2009
Author: swistakers-guest
Date: 2009-07-27 20:39:35 +0000 (Mon, 27 Jul 2009)
New Revision: 1283
Added:
tux4kids-admin/trunk/libtux4kidsadmin/class.cpp
tux4kids-admin/trunk/libtux4kidsadmin/class.h
tux4kids-admin/trunk/libtux4kidsadmin/class_p.h
Removed:
tux4kids-admin/trunk/tux4kids-admin/src/class.cpp
tux4kids-admin/trunk/tux4kids-admin/src/class.h
Modified:
tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt
tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro
tux4kids-admin/trunk/libtux4kidsadmin/profileDir.cpp
tux4kids-admin/trunk/tux4kids-admin/src/src.pro
Log:
moved Class to the lib
Modified: tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt 2009-07-27 15:43:50 UTC (rev 1282)
+++ tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt 2009-07-27 20:39:35 UTC (rev 1283)
@@ -7,7 +7,8 @@
schoolData.cpp
studentDir.cpp
profileDirFactory.cpp
- schoolDatabase.cpp )
+ schoolDatabase.cpp
+ class.cpp )
SET(LIBTUX4KIDSADMIN_MOC_HEADERS
profileDir.h
Added: tux4kids-admin/trunk/libtux4kidsadmin/class.cpp
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/class.cpp (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/class.cpp 2009-07-27 20:39:35 UTC (rev 1283)
@@ -0,0 +1,47 @@
+#include "class.h"
+#include "class_p.h"
+
+/***************************** ClassPrivate *********************/
+
+ClassPrivate::ClassPrivate()
+{
+}
+
+ClassPrivate::~ClassPrivate()
+{
+}
+
+/***************************** Class *********************/
+
+Class::Class(QString name)
+ : d_ptr(new ClassPrivate())
+{
+ Q_D(Class);
+ d->name = name;
+}
+
+Class::Class(ClassPrivate &dd)
+ : d_ptr(&dd)
+{
+}
+
+Class::~Class()
+{
+ Q_D(Class);
+ delete d;
+}
+
+QString Class::name() const
+{
+ Q_D(const Class);
+ return d->name;
+}
+
+void Class::setName(QString name)
+{
+ Q_D(Class);
+ d->name = name;
+}
+
+
+
Added: tux4kids-admin/trunk/libtux4kidsadmin/class.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/class.h (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/class.h 2009-07-27 20:39:35 UTC (rev 1283)
@@ -0,0 +1,29 @@
+#ifndef CLASS_H
+#define CLASS_H
+
+#include <QtGlobal>
+#include <QString>
+
+#include "libtux4kidsadmin_global.h"
+
+class ClassPrivate;
+
+class LIBTUX4KIDSADMIN_SHARED_EXPORT Class
+{
+public:
+ Class(QString name = QString());
+ ~Class();
+
+ QString name() const;
+ void setName(QString name);
+
+protected:
+
+ ClassPrivate * const d_ptr;
+ Class(ClassPrivate &dd);
+
+private:
+ Q_DECLARE_PRIVATE(Class)
+};
+
+#endif // CLASS_H
Added: tux4kids-admin/trunk/libtux4kidsadmin/class_p.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/class_p.h (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/class_p.h 2009-07-27 20:39:35 UTC (rev 1283)
@@ -0,0 +1,21 @@
+#ifndef CLASS_P_H
+#define CLASS_P_H
+
+#include <QtGlobal>
+#include <QString>
+
+class ClassPrivate
+{
+public:
+ Q_DECLARE_PUBLIC(Class)
+
+ ClassPrivate();
+ virtual ~ClassPrivate();
+
+ Class *q_ptr;
+
+ QString name;
+
+};
+
+#endif // CLASS_P_H
Modified: tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro 2009-07-27 15:43:50 UTC (rev 1282)
+++ tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro 2009-07-27 20:39:35 UTC (rev 1283)
@@ -8,7 +8,8 @@
schoolData.cpp \
studentDir.cpp \
profileDirFactory.cpp \
- schoolDatabase.cpp
+ schoolDatabase.cpp \
+ class.cpp
HEADERS += libtux4kidsadmin.h \
libtux4kidsadmin_global.h \
profileDir.h \
@@ -20,4 +21,6 @@
profileDirFactory.h \
profileDirFactory_p.h \
schoolDatabase.h \
- schoolDatabase_p.h
+ schoolDatabase_p.h \
+ class.h \
+ class_p.h
Modified: tux4kids-admin/trunk/libtux4kidsadmin/profileDir.cpp
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/profileDir.cpp 2009-07-27 15:43:50 UTC (rev 1282)
+++ tux4kids-admin/trunk/libtux4kidsadmin/profileDir.cpp 2009-07-27 20:39:35 UTC (rev 1283)
@@ -67,12 +67,12 @@
QString ProfileDir::profileType(QString path)
{
QSettings tmp(path + "/attributes.ini");
- return tmp.value("profile_tmp", "unknown").toString();
+ return tmp.value("profile_type", "unknown").toString();
}
QString ProfileDir::type() const
{
Q_D(const ProfileDir);
- //d->attributes
+ d->attributes->value("profile_type");
}
Deleted: tux4kids-admin/trunk/tux4kids-admin/src/class.cpp
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/src/class.cpp 2009-07-27 15:43:50 UTC (rev 1282)
+++ tux4kids-admin/trunk/tux4kids-admin/src/class.cpp 2009-07-27 20:39:35 UTC (rev 1283)
@@ -1,16 +0,0 @@
-#include "class.h"
-
-Class::Class(QString name)
- : m_name(name)
-{
-}
-
-QString Class::name() const
-{
- return m_name;
-}
-
-void Class::setName(QString name)
-{
- m_name = name;
-}
Deleted: tux4kids-admin/trunk/tux4kids-admin/src/class.h
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/src/class.h 2009-07-27 15:43:50 UTC (rev 1282)
+++ tux4kids-admin/trunk/tux4kids-admin/src/class.h 2009-07-27 20:39:35 UTC (rev 1283)
@@ -1,24 +0,0 @@
-#ifndef CLASS_H
-#define CLASS_H
-
-#include <QList>
-#include <QPointer>
-#include <QString>
-
-class StudentDir;
-
-class Class
-{
-public:
- Class(QString name = QString());
-
- QString name() const;
- void setName(QString name);
-
-protected:
-
- QString m_name;
- QList< QPointer<StudentDir> > m_students;
-};
-
-#endif // CLASS_H
Modified: tux4kids-admin/trunk/tux4kids-admin/src/src.pro
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/src/src.pro 2009-07-27 15:43:50 UTC (rev 1282)
+++ tux4kids-admin/trunk/tux4kids-admin/src/src.pro 2009-07-27 20:39:35 UTC (rev 1283)
@@ -16,8 +16,7 @@
studentTableProxyModel.cpp \
manageClassesWidget.cpp \
classTableModel.cpp \
- manageClassDialog.cpp \
- class.cpp
+ manageClassDialog.cpp
HEADERS += mainWindow.h \
mainController.h \
pluginManager.h \
@@ -30,8 +29,7 @@
studentTableProxyModel.h \
manageClassesWidget.h \
classTableModel.h \
- manageClassDialog.h \
- class.h
+ manageClassDialog.h
FORMS += mainWindow.ui \
pluginManagerDialog.ui \
manageStudentsWidget.ui \
More information about the Tux4kids-commits
mailing list