/home/jon/Projects/gibberish/src/include/LessonWidget.h

00001 /******************************************************************************
00002  *
00003  * This file is part of Gibberish.
00004  *
00005  * Gibberish is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * Gibberish is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with Foobar; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  *
00019  *****************************************************************************/
00020 
00021 #ifndef H_LESSON_WIDGET
00022 #define H_LESSON_WIDGET
00023 
00024 #include <QWidget>
00025 
00026 #include "Lesson.h"
00027 
00032 class LessonWidget : public QWidget
00033 {
00034         Q_OBJECT
00035 
00036         public:
00037                 LessonWidget( QWidget * parent = 0 );
00038                 int getAnswerGiven();
00039                 QString getInstructions();
00040 
00041         public slots:
00042                 virtual void pauseLesson();
00043                 virtual void endLesson();
00044                 virtual bool checkAnswer( Questions* lQuestions ) = 0;
00045                 virtual void nextQuestion( Questions* lQuestions ) = 0;
00046 
00047         private:
00048                 int currentSelectedAnswer();
00049 
00050         protected:
00051                 int answerGiven;
00052                 QString instructions;
00053 };
00054 
00055 #include "ui_LessonWidgetFC.h"
00056 
00061 class LessonWidgetFC : public LessonWidget, private Ui::LessonWidgetFC
00062 {
00063         Q_OBJECT
00064 
00065         public:
00066                 LessonWidgetFC( QWidget* parent = 0 );
00067                 
00068         public slots:
00069                 virtual bool checkAnswer( Questions* lQuestions );
00070                 virtual void nextQuestion( Questions* lQuestions );
00071 
00072 };
00073 
00074 #include "ui_LessonWidgetMC.h"
00075 
00080 class LessonWidgetMC : public LessonWidget, private Ui::LessonWidgetMC
00081 {
00082         Q_OBJECT
00083 
00084         public:
00085                 LessonWidgetMC( QWidget* parent = 0 );
00086 
00087         public slots:
00088                 virtual bool checkAnswer( Questions* lQuestions );
00089                 virtual void nextQuestion( Questions* lQuestions );
00090 
00091         private:
00092                 int answerPos;                                          
00093                 int answerNumberLiteral1;       
00094                 int answerNumberLiteral2;       
00095                 int answerNumberLiteral3;       
00096 };
00097 
00098 #include "ui_LessonWidgetQA.h"
00099 
00104 class LessonWidgetQA : public LessonWidget, private Ui::LessonWidgetQA
00105 {
00106         Q_OBJECT
00107 
00108         public:
00109                 LessonWidgetQA( QWidget* parent = 0 );
00110 
00111         public slots:
00112                 virtual bool checkAnswer( Questions* lQuestions );
00113                 virtual void nextQuestion( Questions* lQuestions );
00114 };
00115 
00116 #endif

Generated on Sat Sep 16 21:02:41 2006 for Gibberish by  doxygen 1.4.6