-
Notifications
You must be signed in to change notification settings - Fork 1
/
maindialog.h
80 lines (65 loc) · 1.69 KB
/
maindialog.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/** \file maindialog.h
* \brief Contains the main dialog widget.
*/
#ifndef MAINDIALOG_H
#define MAINDIALOG_H
#include <QWidget>
#include <QCheckBox>
namespace DJ {
namespace Model {
class Contest;
class Group;
}
namespace View {
namespace Ui {
class MainDialog;
}
/** The main dialog (uses a Qt Designer form).
*/
class MainDialog : public QWidget
{
Q_OBJECT
public:
enum class DisplayMode {
LIVE,
LIVE_AND_FREEZE,
RESULTS
};
/** Constructs a new main dialog and initializes its widgets.
* \param parent The parent of this widget.
*/
explicit MainDialog(QWidget *parent = nullptr);
/** Destructs the main dialog.
*/
~MainDialog();
QString getProtocol();
QString getURL();
QString getUsername();
QString getPassword();
Model::Contest* getContest();
DisplayMode getDisplayMode();
void hideContest();
void displayContest(Model::Contest *contest, QHash<QString, Model::Group *> groups);
void setContestsComboboxData(QHash<QString, Model::Contest *> contests);
QHash<QString, Model::Group *> selectedGroups();
signals:
void aboutClicked();
void settingsClicked();
void connectClicked();
void startClicked();
void loadContestsClicked();
private slots:
void on_buttonAbout_clicked();
void on_buttonSettings_clicked();
void on_buttonConnect_clicked();
void on_buttonStart_clicked();
void on_loadContestsButton_clicked();
void groupCheckboxClicked(bool checked);
private:
Ui::MainDialog *ui;
QList<QCheckBox *> groupCheckboxes;
QHash<QString, Model::Group *> selectedGroupsHash;
};
} // namespace View
} // namespace DJ
#endif // MAINDIALOG_H