-
Notifications
You must be signed in to change notification settings - Fork 0
/
qttesttrianglemenudialog.cpp
55 lines (45 loc) · 1.42 KB
/
qttesttrianglemenudialog.cpp
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
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#include "qttesttrianglemenudialog.h"
#include <QDesktopWidget>
#include <QKeyEvent>
#include "testtrianglemenudialog.h"
#include "qtaboutdialog.h"
#include "qttesttrianglemaindialog.h"
#include "qthideandshowdialog.h"
#include "ui_qttesttrianglemenudialog.h"
#pragma GCC diagnostic pop
ribi::QtTestTriangleMenuDialog::QtTestTriangleMenuDialog(QWidget *parent) noexcept :
QtHideAndShowDialog(parent),
ui(new Ui::QtTestTriangleMenuDialog)
{
ui->setupUi(this);
}
ribi::QtTestTriangleMenuDialog::~QtTestTriangleMenuDialog() noexcept
{
delete ui;
}
void ribi::QtTestTriangleMenuDialog::keyPressEvent(QKeyEvent * event) noexcept
{
if (event->key() == Qt::Key_Escape) { close(); return; }
}
void ribi::QtTestTriangleMenuDialog::on_button_about_clicked() noexcept
{
ribi::About a = TestTriangleMenuDialog().GetAbout();
a.AddLibrary("QtHideAndShowDialog version: " + QtHideAndShowDialog::GetVersion());
ribi::QtAboutDialog d(a);
d.setWindowIcon(this->windowIcon());
d.setStyleSheet(this->styleSheet());
this->ShowChild(&d);
}
void ribi::QtTestTriangleMenuDialog::on_button_quit_clicked() noexcept
{
close();
}
void ribi::QtTestTriangleMenuDialog::on_button_start_clicked() noexcept
{
QtTestTriangleMainDialog d;
ShowChild(&d);
}