2 #include "mainwindow.h"
3 #include "dialogs/platformdialog.h"
5 MainWindow::MainWindow()
7 setWindowTitle("EmuFront");
15 void MainWindow::createActions()
17 configPlatformAction = new QAction(tr("&Platforms"), this);
18 configPlatformAction->setStatusTip(tr("Configure platforms"));
19 connect(configPlatformAction, SIGNAL(triggered()),
20 this, SLOT(configurePlatforms()));
22 exitAction = new QAction(tr("&Exit"), this);
23 exitAction->setShortcut(tr("Ctrl+Q"));
24 exitAction->setStatusTip(tr("Exit EmuFront"));
25 connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
28 void MainWindow::configurePlatforms()
32 platformDialog = new PlatformDialog(this);
34 platformDialog->show();
35 platformDialog->raise();
36 platformDialog->activateWindow();
39 void MainWindow::createMenus()
41 fileMenu = menuBar()->addMenu(tr("&File"));
42 fileMenu->addAction(exitAction);
44 configMenu = menuBar()->addMenu(tr("&Config"));
45 configMenu->addAction(configPlatformAction);
48 void MainWindow::createStatusBar()
50 messageLabel = new QLabel;
51 statusBar()->addWidget(messageLabel);
54 void MainWindow::readSettings()
58 void MainWindow::writeSettings()
62 void MainWindow::closeEvent(QCloseEvent *event)
69 bool MainWindow::okToContinue()