-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqtgraycodermenudialog.cpp
More file actions
53 lines (45 loc) · 1.34 KB
/
qtgraycodermenudialog.cpp
File metadata and controls
53 lines (45 loc) · 1.34 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
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "qtgraycodermenudialog.h"
#include <QDesktopWidget>
#include <QKeyEvent>
#include "graycodermenudialog.h"
#include "qtaboutdialog.h"
#include "qtgraycodermaindialog.h"
#include "qthideandshowdialog.h"
#include "ui_qtgraycodermenudialog.h"
#pragma GCC diagnostic pop
ribi::QtGrayCoderMenuDialog::QtGrayCoderMenuDialog(QWidget *parent) noexcept :
QtHideAndShowDialog(parent),
ui(new Ui::QtGrayCoderMenuDialog)
{
ui->setupUi(this);
}
ribi::QtGrayCoderMenuDialog::~QtGrayCoderMenuDialog() noexcept
{
delete ui;
}
void ribi::QtGrayCoderMenuDialog::keyPressEvent(QKeyEvent * event) noexcept
{
if (event->key() == Qt::Key_Escape) { close(); return; }
}
void ribi::QtGrayCoderMenuDialog::on_button_about_clicked() noexcept
{
ribi::About a = ribi::GrayCoderMenuDialog().GetAbout();
a.AddLibrary("QtHideAndShowDialog version: " + QtHideAndShowDialog::GetVersion());
ribi::QtAboutDialog d(a);
d.setWindowIcon(this->windowIcon());
d.setStyleSheet(this->styleSheet());
this->ShowChild(&d);
}
void ribi::QtGrayCoderMenuDialog::on_button_quit_clicked() noexcept
{
close();
}
void ribi::QtGrayCoderMenuDialog::on_button_start_clicked() noexcept
{
QtGrayCoderMainDialog d;
d.setWindowIcon(this->windowIcon());
d.setStyleSheet(this->styleSheet());
ShowChild(&d);
}