/**************************************************************************
- 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 "classes/settings.h"
+#include <MDeclarativeCache>
-/*! @mainpage Chess Clock
-
- @author Arto Hyvättinen
- @version 1.1
-
-
- Chess Clock
-
- Game clock for chess players with N900. Support many game controls.
-
- Copyright © 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.
-
-@todo Game log
- */
+Q_DECL_EXPORT int main(int argc, char *argv[])
+{
+ QApplication * pApp = MDeclarativeCache::qApplication(argc, argv);
-#include <QtGui/QApplication>
-#include "chessclockwindow.h"
+ pApp->setApplicationName("Chess Clock");
+ pApp->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("1.1.2");
+ pApp->setStyleSheet("* {color: white}");
- ChessClockWindow w;
+ qmlRegisterType<WrappedClocksWidget>("ChessClocks", 1, 2, "WrappedClocksWidget");
+ qmlRegisterType<Settings>("ChessClocks", 1, 2, "Settings");
-#if defined(Q_WS_S60)
- w.showMaximized();
-#else
- w.show();
-#endif
+ QDeclarativeView * pView = MDeclarativeCache::qDeclarativeView();
+ pView->setSource(QUrl("qrc:/qml/main.qml"));
- return a.exec();
+ pView->showFullScreen();
+ return pApp->exec();
}