-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameWindow.h
48 lines (36 loc) · 1.01 KB
/
GameWindow.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
/*
* File: GameWindow.h
* Author: brandon
*
* Created on June 2, 2011, 12:00 PM
*/
#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H
#include <QtGui/QApplication>
#include <QtGui/QWidget>
#include <QtGui/QFont>
#include <QtGui/QMenuBar>
#include <QtGui/QLayout>
#include "GLFrame.h"
class GameWindow : public QWidget {
Q_OBJECT
public:
GameWindow(QWidget* parent = 0) : QWidget(parent) {
GLFrame* glFrame = new GLFrame(this);
QMenuBar* menuBar = new QMenuBar(this);
/*
* Menu Bar
*/
// File Menu
QMenu* fileMenu = new QMenu(tr("File"), this);
QAction* exitAction = new QAction(tr("&Quit"), this); // Quit Option
fileMenu->addAction(exitAction);
menuBar->addMenu(fileMenu);
connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
QVBoxLayout *layout = new QVBoxLayout;
layout->setMenuBar(menuBar);
layout->addWidget(glFrame);
setLayout(layout);
}
};
#endif /* GAMEWINDOW_H */