-
Notifications
You must be signed in to change notification settings - Fork 0
/
menuwindow.h
56 lines (43 loc) · 1.07 KB
/
menuwindow.h
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
#ifndef MENUWINDOW_H
#define MENUWINDOW_H
#include <QMainWindow>
#include <QStackedWidget>
#include <QGraphicsPixmapItem>
#include <QGraphicsView>
#include <QGraphicsScene>
#include "gamemenu.h"
#include "GameSettings.h"
class QStackedWidget;
QT_BEGIN_NAMESPACE
namespace Ui { class MenuWindow; }
QT_END_NAMESPACE
class MenuWindow : public QMainWindow
{
Q_OBJECT
public:
MenuWindow(QWidget *parent = nullptr);
~MenuWindow();
void switchPage();
virtual void resizeEvent(QResizeEvent *event) override;
private:
Ui::MenuWindow *ui;
QGraphicsView menuView;
QGraphicsScene menuScene;
QGraphicsPixmapItem menuBackground;
QStackedWidget *gameMenu;
GameMenu *mainMenu;
GameMenu *chooseMenu;
signals:
void changeWidth();
void changeHeight();
public slots:
void hideMenu();
private slots:
void renderBackground(int width, int height);
void on_startButton_clicked();
void on_quitButtonMenu_clicked();
void reshow();
void on_returnButton_clicked();
void on_newGameButton_clicked();
};
#endif // MENUWINDOW_H