Times and turns in dialog now buttons, but black buttons smaller
[chessclock] / main.cpp
index b54e0f9..394c7f4 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,70 +1,46 @@
 /**************************************************************************
 
-    Chess Clock
+   Chess Clock
 
-    Copyright (c) Arto Hyvättinen 2010
+   This file is part of Chess Clock software.
 
-    This file is part of Chess Clock software.
+   (This file) Copyright (c) Heli Hyvättinen 2011
 
-    Chess Clock is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
+   Chess Clock is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-    Chess Clock is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+   Chess Clock is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
 
 **************************************************************************/
 
+#include <QtGui/QApplication>
+#include <QtDeclarative>
+#include "classes/wrappedclockswidget.h"
+#include "chessclockview.h"
+#include "classes/settings.h"
 
-/*! @mainpage Chess Clock
-
-  @author Arto Hyvättinen
-  @version 0.1.0
-
-
-    Chess Clock
-
-    Game clock for chess players with N900. Support many game controls.
-
-    Copyright &copy; Arto Hyvättinen 2010
-
-    Chess Clock is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    Chess Clock is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-
-
-  */
 
+Q_DECL_EXPORT int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
 
-#include <QtGui/QApplication>
-#include "chessclockwindow.h"
+    app.setApplicationName("Chess Clock");
+    app.setOrganizationName("Chess Clock");
 
-int main(int argc, char *argv[])
-{
-    QApplication a(argc, argv);
-    a.setApplicationName( a.tr("Chess Clock","Application name") );
-    a.setOrganizationName("Chess Clock");
-    a.setOrganizationDomain("chessclock.garage.maemo.org");
-    a.setApplicationVersion("0.1.0");
+    app.setStyleSheet("* {color: white}");
 
-    ChessClockWindow w;
+    qmlRegisterType<WrappedClocksWidget>("ChessClocks", 1, 0, "WrappedClocksWidget");
+    qmlRegisterType<Settings>("ChessClocks", 1, 0, "Settings");
 
-#if defined(Q_WS_S60)
-    w.showMaximized();
-#else
-    w.show();
-#endif
+    ChessClockView view;
+    view.setSource(QUrl("qrc:/qml/main.qml"));
 
-    return a.exec();
+    view.showFullScreen();
+    return app.exec();
 }