-
Notifications
You must be signed in to change notification settings - Fork 0
/
qtopenquestiondialog.h
58 lines (40 loc) · 1.56 KB
/
qtopenquestiondialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef QTOPENQUESTIONDIALOG_H
#define QTOPENQUESTIONDIALOG_H
#include "qthideandshowdialog.h"
#include "questiondialog.h"
#include "qtquestiondialog.h"
namespace Ui {
class QtOpenQuestionDialog;
}
namespace ribi {
struct Question;
struct OpenQuestion;
struct OpenQuestionDialog;
class QtOpenQuestionDialog : public QtQuestionDialog
{
Q_OBJECT
public:
explicit QtOpenQuestionDialog(QWidget *parent = 0);
///Will throw if the QuestionDialog is not an OpenQuestionDialog
//explicit QtOpenQuestionDialog(QWidget *parent = 0);
QtOpenQuestionDialog(const QtOpenQuestionDialog&) = delete;
QtOpenQuestionDialog& operator=(const QtOpenQuestionDialog&) = delete;
~QtOpenQuestionDialog() noexcept;
boost::shared_ptr<const QuestionDialog> GetDialog() const;
void SetDialog(const boost::shared_ptr<QuestionDialog>& dialog);
void SetOpenQuestionDialog(const boost::shared_ptr<OpenQuestionDialog>& dialog) noexcept;
static std::string GetVersion() noexcept;
static std::vector<std::string> GetVersionHistory() noexcept;
private slots:
void on_button_submit_clicked() noexcept;
void on_edit_answer_textChanged(const QString &arg1);
private:
Ui::QtOpenQuestionDialog *ui;
boost::shared_ptr<OpenQuestionDialog> m_openquestiondialog;
void OnOpenQuestionDialogChanged(OpenQuestionDialog * const open_question_dialog) noexcept;
void OnOpenQuestionChanged(const boost::shared_ptr<OpenQuestion>& open_question) noexcept;
void OnQuit() noexcept;
void OnSubmit(const bool was_answer_correct) noexcept;
};
} //~namespace ribi
#endif // QTOPENQUESTIONDIALOG_H