Added Visit web page action
[chessclock] / chessclockwindow.cpp
index 0ab4e48..b2f9d47 100644 (file)
 #include "classes/startwidget.h"
 #include "classes/timecontrol.h"
 
+// Time controls
 #include "classes/timecontrol/notimecontrol.h"
 #include "classes/timecontrol/fischertimecontrol.h"
+#include "classes/timecontrol/fischeraftertimecontrol.h"
+#include "classes/timecontrol/delaytimecontrol.h"
+#include "classes/timecontrol/delayaftertimecontrol.h"
+#include "classes/timecontrol/hourglasstimecontrol.h"
 
 #include <QIcon>
 #include <QApplication>
 #include <QMenuBar>
 #include <QMessageBox>
 #include <QStackedWidget>
+#include <QProcess>
 
 ChessClockWindow::ChessClockWindow(QWidget *parent)
     : QMainWindow(parent)
@@ -58,6 +64,7 @@ ChessClockWindow::ChessClockWindow(QWidget *parent)
     // Set up menu
     menuBar()->addAction( tr("Pause"), this, SLOT(pause()));
     menuBar()->addAction( tr("New game"), this, SLOT(newGame()));
+    menuBar()->addAction( tr("Visit web page"), this, SLOT(visitWeb()));
 
 }
 
@@ -84,10 +91,20 @@ void ChessClockWindow::newGame()
     }
 }
 
+void ChessClockWindow::visitWeb()
+{
+    QProcess::execute(QString("browser --url=chessclock.garage.maemo.org"));
+}
+
+
 void ChessClockWindow::initTimeControls()
 {
     start_->addTimeControl( new NoTimeControl );
     start_->addTimeControl( new FischerTimeControl);
+    start_->addTimeControl( new FischerAfterTimeControl);
+    start_->addTimeControl( new DelayTimeControl );
+    start_->addTimeControl( new DelayAfterTimeControl);
+    start_->addTimeControl( new HourGlassTimeControl);
 }
 
 void ChessClockWindow::startGame(TimeControl *timecontrol)