kanagram
Go to the documentation of this file.
22 #include <KDE/KGlobal>
23 #include <KDE/KStandardDirs>
24 #include <KDE/KComponentData>
25 #include <kdeclarative.h>
27 #include <QtDeclarative/QDeclarativeView>
28 #include <QtDeclarative/QDeclarativeContext>
29 #include <QtGui/QApplication>
31 #include <QtCore/QUrl>
33 int main(
int argc,
char** argv )
35 QApplication app( argc, argv );
36 app.setOrganizationName(
"KDE Kanagram" );
37 app.setApplicationName(
"Kanagram Harmattan Frontend" );
40 QDeclarativeContext *ctxt = view.rootContext();
42 KGlobal::dirs()->addResourceDir(
"data",
"/opt/kanagram/share/");
45 ctxt->setContextProperty(
"kanagramGame", kanagramGame);
48 ctxt->setContextProperty(
"kanagramEngineHelper", &kanagramEngineHelper);
50 KComponentData data(
"kanagram-harmattan");
52 KDeclarative kdeclarative;
53 kdeclarative.setDeclarativeEngine(view.engine());
54 kdeclarative.initialize();
56 kdeclarative.setupBindings();
58 view.setSource(QUrl(
"qrc:/main.qml"));
59 view.showFullScreen();
int main(int argc, char **argv)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:35 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.