File indexing completed on 2024-03-24 03:51:17
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 #include <QApplication> 0007 #include <QQmlApplicationEngine> 0008 #include <QtQuick> 0009 0010 #include "declarative/MarbleDeclarativePlugin.h" 0011 #include <MarbleGlobal.h> 0012 0013 using namespace Marble; 0014 0015 #ifdef Q_OS_ANDROID 0016 // Declare symbol of main method as exported as needed by Qt-on-Android, 0017 // where the Dalvik-native QtActivity class needs to find and invoke it 0018 // on loading the "app" module 0019 extern "C" Q_DECL_EXPORT 0020 #endif 0021 int main(int argc, char ** argv) 0022 { 0023 QApplication app(argc, argv); 0024 0025 #ifdef Q_OS_ANDROID 0026 MarbleGlobal::Profiles profiles = MarbleGlobal::SmallScreen | MarbleGlobal::HighResolution; 0027 MarbleGlobal::getInstance()->setProfiles( profiles ); 0028 #endif 0029 0030 MarbleDeclarativePlugin declarativePlugin; 0031 const char uri[] = "org.kde.marble"; 0032 declarativePlugin.registerTypes(uri); 0033 0034 QQmlApplicationEngine engine; 0035 engine.load(QUrl("qrc:/MainScreen.qml")); 0036 0037 return app.exec(); 0038 }