1 /* This file is part of KWordQuiz
2 Copyright (C) 2003 Peter Hedlund <peter@peterandlinda.com>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 Boston, MA 02111-1307, USA.
24 #include "wqlistitem.h"
25 #include "kwordquizview.h"
31 class WQQuiz
: public QObject
35 enum QuizType
{qtEditor
, qtFlash
, qtMultiple
, qtQA
};
36 enum QuizIcon
{qiLeftCol
, qiRightCol
, qiQuestion
, qiCorrect
, qiError
};
38 WQQuiz(KWordQuizView
* parent
, const char * name
=0);
40 void activateErrorList();
41 void activateBaseList();
45 bool checkAnswer(int i
, const QString
& );
46 QStringList
multiOptions(int i
);
47 QString
quizIcon(int i
, QuizIcon ico
);
48 QString
yourAnswer(int i
, const QString
& s
);
51 QuizType
quizType() const {return m_quizType
;}
52 void setQuizType(QuizType qt
);
54 int quizMode() const {return m_quizMode
;}
55 void setQuizMode(int qm
);
58 QString
question(int i
);
59 QString
blankAnswer(int i
);
60 QString
answer(int i
);
61 QString
langQuestion(int i
);
62 QString
langAnswer(int i
);
67 void checkingAnswer(int );
70 KWordQuizView
*m_table
;
73 static QPtrList
<WQListItem
> *m_list
;
74 static QPtrList
<WQListItem
> *m_errorList
;
75 static QPtrList
<WQListItem
> *m_quizList
;
78 QString m_correctBlank
;
79 QString m_answerBlank
;
81 void addToList(int aCol
, int bCol
);