[Tux4kids-commits] r1284 - tux4kids-admin/trunk/libtux4kidsadmin
Michał Świtakowski
swistakers-guest at alioth.debian.org
Mon Jul 27 20:56:53 UTC 2009
Author: swistakers-guest
Date: 2009-07-27 20:56:51 +0000 (Mon, 27 Jul 2009)
New Revision: 1284
Added:
tux4kids-admin/trunk/libtux4kidsadmin/teacher.cpp
tux4kids-admin/trunk/libtux4kidsadmin/teacher.h
tux4kids-admin/trunk/libtux4kidsadmin/teacher_p.h
Modified:
tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt
tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro
Log:
added Teacher class
Modified: tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt 2009-07-27 20:39:35 UTC (rev 1283)
+++ tux4kids-admin/trunk/libtux4kidsadmin/CMakeLists.txt 2009-07-27 20:56:51 UTC (rev 1284)
@@ -8,7 +8,8 @@
studentDir.cpp
profileDirFactory.cpp
schoolDatabase.cpp
- class.cpp )
+ class.cpp
+ teacher.cpp )
SET(LIBTUX4KIDSADMIN_MOC_HEADERS
profileDir.h
Modified: tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro 2009-07-27 20:39:35 UTC (rev 1283)
+++ tux4kids-admin/trunk/libtux4kidsadmin/libtux4kidsadmin.pro 2009-07-27 20:56:51 UTC (rev 1284)
@@ -9,7 +9,8 @@
studentDir.cpp \
profileDirFactory.cpp \
schoolDatabase.cpp \
- class.cpp
+ class.cpp \
+ teacher.cpp
HEADERS += libtux4kidsadmin.h \
libtux4kidsadmin_global.h \
profileDir.h \
@@ -23,4 +24,6 @@
schoolDatabase.h \
schoolDatabase_p.h \
class.h \
- class_p.h
+ class_p.h \
+ teacher.h \
+ teacher_p.h
Added: tux4kids-admin/trunk/libtux4kidsadmin/teacher.cpp
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/teacher.cpp (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/teacher.cpp 2009-07-27 20:56:51 UTC (rev 1284)
@@ -0,0 +1,59 @@
+#include "teacher.h"
+#include "teacher_p.h"
+
+/***************************** TeacherPrivate *********************/
+
+TeacherPrivate::TeacherPrivate()
+{
+}
+
+TeacherPrivate::~TeacherPrivate()
+{
+}
+
+/***************************** Teacher *********************/
+
+Teacher::Teacher(QString firstName, QString lastName)
+ : d_ptr(new TeacherPrivate())
+{
+ Q_D(Teacher);
+ d->firstName = firstName;
+ d->lastName = lastName;
+}
+
+Teacher::Teacher(TeacherPrivate &dd)
+ : d_ptr(&dd)
+{
+}
+
+Teacher::~Teacher()
+{
+ Q_D(Teacher);
+ delete d;
+}
+
+QString Teacher::firstName() const
+{
+ Q_D(const Teacher);
+ return d->firstName;
+}
+
+QString Teacher::lastName() const
+{
+ Q_D(const Teacher);
+ return d->lastName;
+}
+
+void Teacher::setFirstName(QString firstName)
+{
+ Q_D(Teacher);
+ d->firstName = firstName;
+}
+
+void Teacher::setLastName(QString lastName)
+{
+ Q_D(Teacher);
+ d->lastName = lastName;
+}
+
+
Added: tux4kids-admin/trunk/libtux4kidsadmin/teacher.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/teacher.h (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/teacher.h 2009-07-27 20:56:51 UTC (rev 1284)
@@ -0,0 +1,31 @@
+#ifndef TEACHER_H
+#define TEACHER_H
+
+#include <QtGlobal>
+#include <QString>
+
+#include "libtux4kidsadmin_global.h"
+
+class TeacherPrivate;
+
+class LIBTUX4KIDSADMIN_SHARED_EXPORT Teacher
+{
+public:
+ Teacher(QString firstName, QString lastName);
+ ~Teacher();
+
+ QString firstName() const;
+ QString lastName() const;
+ void setFirstName(QString firstName);
+ void setLastName(QString lastName);
+
+protected:
+
+ TeacherPrivate * const d_ptr;
+ Teacher(TeacherPrivate &dd);
+
+private:
+ Q_DECLARE_PRIVATE(Teacher)
+};
+
+#endif // TEACHER_H
Added: tux4kids-admin/trunk/libtux4kidsadmin/teacher_p.h
===================================================================
--- tux4kids-admin/trunk/libtux4kidsadmin/teacher_p.h (rev 0)
+++ tux4kids-admin/trunk/libtux4kidsadmin/teacher_p.h 2009-07-27 20:56:51 UTC (rev 1284)
@@ -0,0 +1,22 @@
+#ifndef TEACHER_P_H
+#define TEACHER_P_H
+
+#include <QtGlobal>
+#include <QString>
+
+class TeacherPrivate
+{
+public:
+ Q_DECLARE_PUBLIC(Teacher)
+
+ TeacherPrivate();
+ virtual ~TeacherPrivate();
+
+ Teacher *q_ptr;
+
+ QString firstName;
+ QString lastName;
+
+};
+
+#endif // TEACHER_P_H
More information about the Tux4kids-commits
mailing list