-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqttronmenudialog.cpp
More file actions
56 lines (46 loc) · 1.01 KB
/
qttronmenudialog.cpp
File metadata and controls
56 lines (46 loc) · 1.01 KB
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
#include "qttronmenudialog.h"
#include "qtaboutdialog.h"
#include "tronmenudialog.h"
#include "qttrongamedialog.h"
#include "ui_qttronmenudialog.h"
#include "testtimer.h"
#include "trace.h"
ribi::tron::QtTronMenuDialog::QtTronMenuDialog(QWidget *parent)
: QtHideAndShowDialog(parent),
ui(new Ui::QtTronMenuDialog)
{
#ifndef NDEBUG
Test();
#endif
ui->setupUi(this);
}
ribi::tron::QtTronMenuDialog::~QtTronMenuDialog() noexcept
{
delete ui;
}
void ribi::tron::QtTronMenuDialog::on_button_start_clicked()
{
QtTronGameDialog d;
this->ShowChild(&d);
}
void ribi::tron::QtTronMenuDialog::on_button_about_clicked()
{
QtAboutDialog d(TronMenuDialog().GetAbout());
this->ShowChild(&d);
}
void ribi::tron::QtTronMenuDialog::on_button_quit_clicked()
{
this->close();
}
#ifndef NDEBUG
void ribi::tron::QtTronMenuDialog::Test() noexcept
{
{
static bool is_tested{false};
if (is_tested) return;
is_tested = true;
}
const TestTimer test_timer(__func__,__FILE__,1.0);
QtTronGameDialog();
}
#endif