1 /***************************************************************************
5 copyright : (C) 2004 by Sebastian Stein
6 email : seb.kde@hpfsc.de
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #ifndef EXERCISECOMPARE_H
19 #define EXERCISECOMPARE_H
27 #include "exercisebase.h"
29 #include "ratiowidget.h"
39 /*! Constructs a QWidget, which shows the task to the user.
40 * The class also provides input fields, so that the user can enter the result.
41 * It also controls the interaction, so that the entered result gets checked
42 * and a new task can be generated.
43 * \author Sebastian Stein
45 class ExerciseCompare
: public ExerciseBase
51 ExerciseCompare(QWidget
* parent
= 0, const char * name
= 0);
56 /** force the creation of a new task */
63 /** class emits this signal, if the task was solved correctly by the user */
64 void signalExerciseSolvedCorrect();
66 /** class emits this signal, if the task was solved not correctly by the user
68 void signalExerciseSolvedWrong();
73 RatioWidget
* m_firstRatioWidget
;
74 RatioWidget
* m_secondRatioWidget
;
75 QPushButton
* m_checkButton
;
76 QPushButton
* m_signButton
;
79 QGridLayout
* baseGrid
;
81 QVBoxLayout
* realLayout
;
91 SignButtonState m_signButtonState
;
98 void slotCheckButtonClicked();
99 void slotSignButtonClicked();