#include "joystick.h"
#include "qdeclarativetoucharea.h"
#include <QList>
+#include <QObject>
+#include "qmlappviewer.h"
QString selectQmlMain(QStringList inportPaths,QString cmdParam,QString activeUI,uiListModel &uiList);
+
+
+
// MacOSX sdl hack so that SDL won't hijack main
#undef main
#ifdef QT_IOS
QString activeUi=mardroneSettings->value("activeUI","ardrone_plainqml.qml").toString();
#else
- QString activeUi=mardroneSettings->value("activeUI","ardrone_android.qml").toString();
+ QString activeUi=mardroneSettings->value("activeUI","ardrone_harmattan.qml").toString();
// QString activeUi=mardroneSettings->value("activeUI","ardrone_desktop.qml").toString();
#endif
qDebug() << "activeUI=" << activeUi;
setDefault=true;
};
- QDeclarativeView window;
+ // QDeclarativeView window;
+ QmlAppViewer window;
window.rootContext()->setContextProperty("MArdrone",window.window());
QObject::connect((QObject*)window.engine(), SIGNAL(quit()), &app, SLOT(quit()));
+
// Check available UI's
window.engine()->addImportPath(":/gauges/");
window.engine()->addImportPath("qrc:");
if((screenGeometry.height()<=800) && (screenGeometry.width()<=1024)) window.window()->showFullScreen();
else window.window()->show();
}
+ QObject::connect(&window, SIGNAL(backKey()), window.rootObject(), SLOT(backKey()));
return app.exec();
}
if(!validUi) activeUI=((uiListElement*)uiList.get(0))->file();
return(activeUI);
}
+