-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.cpp
45 lines (37 loc) · 865 Bytes
/
menu.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
#include "menu.h"
#include "ui_menu.h"
#include<QMessageBox>
#include<QPixmap>
#include<QPalette>
#include <QBitmap>
#include<QBrush>
menu::menu(QWidget *parent) :
QWidget(parent),
ui(new Ui::menu)
{
ui->setupUi(this);
// QPixmap bgImages(":/back/menu1.jpg");
// QPalette bgPalette = palette();
// bgPalette.setBrush(QPalette::Background,bgImages);
// this->setPalette(bgPalette);
}
menu::~menu()
{
delete ui;
}
void menu::on_pushButton_start_clicked()
{
emit startplay();
hide();
}
//ÐźÅ
void menu::on_pushButton_quit_clicked()
{
int ret=QMessageBox::warning(this,tr("WARNING"),tr("Do you really want to quit?"),QMessageBox::Abort);
if(ret==QMessageBox::Abort)
QApplication::exit(0);
}
void menu::on_pushButton_set_clicked()
{
emit setMenuf();
}