summaryrefslogtreecommitdiffstats
path: root/kanagram/src/leitnersystem.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch)
treed3bb9f5d25a2dc09ca81adecf39621d871534297 /kanagram/src/leitnersystem.h
downloadtdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz
tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kanagram/src/leitnersystem.h')
-rw-r--r--kanagram/src/leitnersystem.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/kanagram/src/leitnersystem.h b/kanagram/src/leitnersystem.h
new file mode 100644
index 00000000..87e583d9
--- /dev/null
+++ b/kanagram/src/leitnersystem.h
@@ -0,0 +1,67 @@
+//
+// C++ Interface: leitnersystem
+//
+// Description:
+//
+//
+// Author: Martin Pfeiffer <martin-pfeiffer-bensheim@web.de>, (C) 2005
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qvaluelist.h>
+#include "leitnerbox.h"
+
+#ifndef LEITNERSYSTEM_H
+#define LEITNERSYSTEM_H
+
+
+/**
+@author Martin Pfeiffer
+*/
+class LeitnerSystem
+{
+public:
+ LeitnerSystem();
+ LeitnerSystem( QValueList<LeitnerBox>& boxes, QString name );
+
+ ~LeitnerSystem();
+
+ int getNumberOfBoxes(); //returns the number of boxes in the system
+ QStringList getBoxNameList(); //returns a list with the boxes names
+
+ QString& getSystemName(); //returns the systems name
+ void setSystemName( const QString& name ); //sets the systems name
+
+ LeitnerBox* getBoxWithNumber( int number ); //returns box by number
+ LeitnerBox* getBoxWithName( const QString& name );//returns box by name
+ int getNumber( LeitnerBox* box );
+ const QString& getBox( int i );
+
+ const QString& getNextBox( QString& previousBox ); //returns the next box for the next question
+
+ const QString& getCorrectBox( int box ); //returns the correct word box of "int box"
+ const QString& getWrongBox( int box ); //returns the wrong word box of "int box"
+ int getWrongBoxNumber( int box );
+ int getCorrectBoxNumber( int box );
+ void setCorrectBox( const QString& box, const QString& correctWordBox );
+ void setWrongBox( const QString& box, const QString& wrongWordBox );
+ bool setBoxName( int box, const QString& name );
+ bool setBoxName( LeitnerBox* box, const QString& name );
+
+ //inserts a box with number, name, correct and wrong word box
+ bool insertBox( const QString& name, int correctWordBox, int wrongWordBox );
+ bool insertBox( const QString& name );
+ void deleteBox( int box );
+ void deleteBox( LeitnerBox* box );
+
+private:
+ QString m_systemName; //the systems name
+
+ QValueList<LeitnerBox> m_boxes;
+};
+
+#endif