Esempio n. 1
0
MainWindow::MainWindow() {
    // Calls each group layout & widget to be created
    createCharGroupBox();
    createQuestionGroupBox();
    createYourCharGroupBox();
    createMiscGroupBox();
    createGameWidget();
    createMainMenuWidget();

    // Creates a stacked widget to shift between the main menu and game
    stack = new QStackedWidget;
    stack->addWidget(mainMenuWidget);
    stack->addWidget(gameWidget);
    setCentralWidget(stack);

    // Creates the menu and status bar for the main window
    createActions();
    createMenu();
    createStatusBar();

    // Sets title to window, color, and size
    setWindowTitle(tr("Go Fish"));
    setStyleSheet("QMainWindow{background-color:#1d2020}");
    setFixedSize(1280,1000);
//    showFullScreen();
}
Esempio n. 2
0
MainWindow::MainWindow(QWidget *parent) :
	QMainWindow(parent)
{

    m_gameWidget = createGameWidget();
    setCentralWidget(m_gameWidget);
    setMinimumSize(800, 600);
    createActions();
    createMenus();
    createToolbar();
}
Esempio n. 3
0
MainWindow::MainWindow(){
    // Calls the functions that creates the widgets for the stack, menu bar, menu bar actions, & status bar
    createMainWindowMenu();
    createGameWidget();
    createActions();
    createMenus();
    createStatusBar();

    // Creates a stacked widget as the central widget that holds the menu and game widgets
    stack = new QStackedWidget();
    stack->addWidget(menuWidget);
    stack->addWidget(gameWidget);
    setCentralWidget(stack) ;

    // Sets the title, background, & window size
    setWindowTitle(tr("Brick Break"));
    setStyleSheet("QMainWindow{background-image:url(:/Resource/images/Background.png)}");
    setFixedSize(600,450);
}