#ifndef QUESTIONANSWERWIDGET_H
#define QUESTIONANSWERWIDGET_H

#include "checkbox.h"
#include <time.h>
#include <QtWidgets>
#include <QtGui>

class QuestionAnswerWidget : public QWidget
{
  Q_OBJECT
  private:
    QLabel *tlQuestion;
    QList< CheckBox* > cbAnswers;
    QList< bool > isAnswerTrue;//speichert welche "Checkbox" die richtige Antwort hat
                               //bsp: isAnswerTrue[0] = true; cbAnswers[0] = irgendeine richtige Antwort
                               //     isAnswerTrue[3] = false; cbAnswers[3] = irgendeine falsche Antwort
    QList< int > answerIds;//speichert welche Checkbox welche AnswerId hat
  public:
    explicit QuestionAnswerWidget( QWidget *parent = 0 );
    void setValues( QString question, QList< QString > trueAnswers, QList< int > trueAnswerIds,
                    QList< QString > falseAnswers, QList< int > falseAnswerIds );
    void setWidget( int cbCount );
    bool getResult( void );
    void highlightAnswers( void );
    void setCBsEnabled( bool state );
    QList< int > getAnswerIds( void );
    QList< bool > getIsAnswerTrue( void );
};

#endif // QUESTIONANSWERWIDGET_H
