#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)
// 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()));
}
}
}
+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)