Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace GameConstants{
- static Qt::WindowFlags windows_styles=Qt::Window|Qt::WindowMinimizeButtonHint;
- }
- class MenuWidget:public QWidget{
- Q_OBJECT
- public:
- MenuWidget(const QString& window_name = "", QWidget* parent = 0);
- };
- class GameWidget:public QWidget{
- Q_OBJECT
- public:
- GameWidget(const QString& window_title = GameConstants::window_title, QWidget* parent = 0);
- };
- class Game:public QObject{
- Q_OBJECT
- private:
- MenuWidget* menu_widget;
- GameWidget* game_widget;
- public:
- Game(QObject* parent = 0);
- };
- Game::Game(QObject *parent):QObject(parent){
- menu_widget = new MenuWidget(GameConstants::window_title);
- game_widget = new GameWidget(GameConstants::window_title);
- menu_widget->setWindowFlags(GameConstants::windows_styles);
- game_widget->setWindowFlags(GameConstants::windows_styles);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement