1 // SPDX-License-Identifier: LGPL-2.1-or-later 2 // 3 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org> 4 // 5 6 #include <QApplication> 7 #include <QQmlApplicationEngine> 8 #include <QtQuick> 9 10 #include "declarative/MarbleDeclarativePlugin.h" 11 #include <MarbleGlobal.h> 12 13 using namespace Marble; 14 15 #ifdef Q_OS_ANDROID 16 // Declare symbol of main method as exported as needed by Qt-on-Android, 17 // where the Dalvik-native QtActivity class needs to find and invoke it 18 // on loading the "app" module 19 extern "C" Q_DECL_EXPORT 20 #endif main(int argc,char ** argv)21int main(int argc, char ** argv) 22 { 23 QApplication app(argc, argv); 24 25 #ifdef Q_OS_ANDROID 26 MarbleGlobal::Profiles profiles = MarbleGlobal::SmallScreen | MarbleGlobal::HighResolution; 27 MarbleGlobal::getInstance()->setProfiles( profiles ); 28 #endif 29 30 MarbleDeclarativePlugin declarativePlugin; 31 const char uri[] = "org.kde.marble"; 32 declarativePlugin.registerTypes(uri); 33 34 QQmlApplicationEngine engine; 35 engine.load(QUrl("qrc:/MainScreen.qml")); 36 37 return app.exec(); 38 } 39