00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00026 #ifndef _H_QUESTIONS
00027 #define _H_QUESTIONS
00028
00029 #include <QList>
00030 #include <QString>
00031
00044 class Questions
00045 {
00046 public:
00047 Questions();
00048
00049 void addQuestion( QString question );
00050 void addAnswer( QString answer );
00051 void reset();
00052 int getQuestionNumberCount();
00053 int getQuestionNumberLiteral();
00054 int getQuestionNumberTotal();
00055
00056 int getNextQuestion( QString& question );
00057 int getNextAnswer( QString& answer );
00058 int getAnyQuestion( QString& question );
00059 int getAnyAnswer( QString& answer );
00060
00061 QList<QString> getQuestions();
00062 QList<QString> getAnswers();
00063 QList<int> getQuestionsAsked();
00064
00065 int generateRandomNumber( int min, int max );
00066
00067 private:
00068 int questionNumberLiteral;
00069 int questionNumberCount;
00070 QList<QString> questions;
00071 QList<QString> answers;
00072 QList<int> questionsAsked;
00073
00074 int generateQuestionNumber();
00075
00076 };
00077
00078 #endif