int main(int argc, char *argv[])
{
QApplication a(argc, argv);
+ a.setApplicationName("Ghosts Overboard");
+ a.setApplicationVersion("0.0.1");
MainWindow w;
#if defined(Q_WS_S60)
w.showMaximized();
#include <QDebug>
#include <QAction>
#include <QMenuBar>
+#include <QMessageBox>
+#include <QApplication>
{
paused_ = false;
+ setWindowIcon(QIcon(":/pix/laiva_10aave.png"));
+
pScene_ = new SeaScene ();
pView_ = new QGraphicsView ();
menuBar()->addAction(pPauseAction);
QAction * pRestartLevelAction = new QAction(tr("Restart level"),this);
- pRestartLevelAction->setCheckable(true);
addAction(pRestartLevelAction);
connect(pRestartLevelAction,SIGNAL(triggered()),this,SLOT(restartLevel()));
menuBar()->addAction(pRestartLevelAction);
+ QAction * pAboutAction = new QAction(tr("About"),this);
+ addAction(pAboutAction);
+ connect(pAboutAction,SIGNAL(triggered()),this,SLOT(about()));
+ menuBar()->addAction(pAboutAction);
+
//the boundaries of the scene are set to match the size of the view window, which is not
//available in the constructor --> timer needed
{
pScene_->setupMap(5,5,5);
}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About %1").arg(QApplication::applicationName()),
+ tr("Version %1"
+ "<p>Copyright 2011 Heli Hyvättinen"
+ "<p>License: General Public License v2"
+ ).arg(QApplication::applicationVersion()));
+
+
+
+}