File indexing completed on 2024-04-14 03:40:29

0001 /***************************************************************************
0002  *   Copyright (C) 2004 by Albert Astals Cid                               *
0003  *   aacid@kde.org                                                         *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef ANSWER_H
0012 #define ANSWER_H
0013 
0014 #include <QVariant>
0015 
0016 class QGridLayout;
0017 
0018 class userAnswer
0019 {
0020     public:
0021         userAnswer();
0022         userAnswer(const userAnswer &qa);
0023         
0024         userAnswer &operator=(const userAnswer &qa);
0025         
0026         void setQuestion(const QVariant &question);
0027         void setAnswer(const QVariant &answer);
0028         void setAnswerCorrect(bool correct);
0029         void setCorrectAnswer(const QVariant &correctAnswer);
0030         
0031         void putWidgets(QWidget *w, QGridLayout *lay, int row, int margin) const;
0032         
0033     private:
0034         QVariant p_question, p_answer, p_correctAnswer;
0035         bool p_correct;
0036 };
0037 
0038 #endif