forked from HirojiFukuyama/qt_PC2DM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartwindow.cpp
60 lines (46 loc) · 975 Bytes
/
startwindow.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
56
57
58
#include "startwindow.h"
#include "mainwindow.h"
#include "info.h"
#include "help.h"
#include "ui_startwindow.h"
#include <QPainter>
#include <QStyleOption>
StartWindow::StartWindow(QWidget *parent) :
QWidget(parent),
ui(new Ui::StartWindow)
{
ui->setupUi(this);
}
StartWindow::~StartWindow()
{
delete ui;
}
void StartWindow::showMainWindow() {
this->hide();
MainWindow* w = new MainWindow(this);
connect(w, SIGNAL(execReg()), this, SLOT(show()));
w->setWindowTitle("游戏界面");
w->show();
}
void StartWindow::on_pushButton_clicked()
{
showMainWindow();
}
void StartWindow::on_pushButton_4_clicked()
{
close();
}
void StartWindow::on_pushButton_2_clicked()
{
info * i = new info(this);
i->setWindowTitle("详情");
i->setModal(true);
i->show();
}
void StartWindow::on_pushButton_3_clicked()
{
help * h = new help(this);
h->setWindowTitle("帮助");
h->setModal(true);
h->show();
}