moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kwordquiz / src / qaview.h
blobcb7624b7456cc5106e5862a16a6366b80bcf584b
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.
19 #ifndef QAVIEW_H
20 #define QAVIEW_H
22 #include <kaction.h>
24 #include "qaviewbase.h"
26 #include "wqquiz.h"
27 #include "wqscore.h"
29 /**
30 @author Peter Hedlund
32 class QAView : public QAViewBase
34 Q_OBJECT
35 public:
36 QAView(QWidget *parent = 0, const char *name = 0, WFlags f = 0);
38 ~QAView();
40 void setQuiz(WQQuiz *quiz);
41 void init();
43 public slots:
44 void slotCheck();
45 void slotHint();
46 void slotRepeat();
47 void slotRestart();
48 void slotApplySettings();
49 void slotSpecChar(const QChar &);
51 private:
52 WQQuiz *m_quiz;
53 WQScore *m_score;
55 KAction* actCheck;
56 KAction* actHint;
57 KAction* actRepeat;
58 KAction* actRestart;
60 int m_question;
61 int m_error;
63 bool m_hintUsed;
65 void updateScore();
66 void showQuestion(int i);
69 #endif