diff --git a/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp b/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp index 722c8c073..26cd2071c 100644 --- a/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp +++ b/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp @@ -1,94 +1,95 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #include "MarbleDeclarativePlugin.h" #include "Coordinate.h" #include "DeclarativeMapThemeManager.h" #include "MarbleDeclarativeObject.h" #include "MarbleDeclarativeWidget.h" #include "PositionSource.h" #include "Bookmarks.h" #include "CloudSync.h" #include "cloudsync/MergeItem.h" #include "Tracking.h" #include "Routing.h" #include "Navigation.h" #include "Search.h" #include "RouteRequestModel.h" #include "Settings.h" #include "MapThemeModel.h" #include "NewstuffModel.h" #include "OfflineDataModel.h" #include "Placemark.h" #include "routing/SpeakersModel.h" #include "routing/VoiceNavigationModel.h" #include "routing/RoutingModel.h" #include "AbstractFloatItem.h" #include "RenderPlugin.h" #include "MarblePlacemarkModel.h" #include "DeclarativeDataPlugin.h" #include "SearchBackend.h" #include "MarbleQuickItem.h" #include #include #include void MarbleDeclarativePlugin::registerTypes( const char *uri ) { qRegisterMetaType("MarbleMap*"); //@uri org.kde.edu.marble qmlRegisterType( uri, 0, 20, "Coordinate" ); qmlRegisterType( uri, 0, 20, "Placemark" ); qmlRegisterType( uri, 0, 20, "PositionSource" ); qmlRegisterType( uri, 0, 20, "Bookmarks" ); qmlRegisterType( uri, 0, 20, "Tracking" ); qmlRegisterType( uri, 0, 20, "Routing" ); qmlRegisterType( uri, 0, 20, "Navigation" ); qmlRegisterType( uri, 0, 20, "Find" ); qmlRegisterType( uri, 0, 20, "CloudSync" ); qmlRegisterType( uri, 0, 20, "MergeItem" ); qmlRegisterType( uri, 0, 20, "RouteRequestModel" ); qmlRegisterType( uri, 0, 20, "Settings" ); qmlRegisterType( uri, 0, 20, "MarbleWidget" ); qmlRegisterType( uri, 0, 20, "MapThemeManager" ); qmlRegisterType( uri, 0, 20, "SpeakersModel" ); qmlRegisterType( uri, 0, 20, "VoiceNavigation" ); qmlRegisterType( uri, 0, 20, "NewstuffModel" ); qmlRegisterType( uri, 0, 20, "OfflineDataModel" ); qmlRegisterType( uri, 0, 20, "MapThemeModel" ); qmlRegisterType( uri, 0, 20, "DataLayer" ); qmlRegisterType(uri, 0, 20, "SearchBackend"); qRegisterMetaType("MarblePlacemarkModel*"); qmlRegisterType(uri, 0, 20, "MarbleItem"); qmlRegisterUncreatableType(uri, 1, 0, "MarblePlacemarkModel", "MarblePlacemarkModel is not instantiable"); qmlRegisterUncreatableType(uri, 0, 20, "RoutingModel", "RoutingModel is not instantiable"); qmlRegisterUncreatableType( uri, 0, 20, "BookmarksModel", "Do not create" ); qmlRegisterUncreatableType( uri, 0, 20, "FloatItem", "Do not create" ); qmlRegisterUncreatableType( uri, 0, 20, "RenderPlugin", "Do not create" ); + qmlRegisterUncreatableType( uri, 0, 20, "MarbleMap", "Do not create" ); } void MarbleDeclarativePlugin::initializeEngine( QQmlEngine *engine, const char *) { engine->addImageProvider( "maptheme", new MapThemeImageProvider ); // Register the global Marble object. Can be used in .qml files for requests like Marble.resolvePath("some/icon.png") if ( !engine->rootContext()->contextProperty( "Marble").isValid() ) { engine->rootContext()->setContextProperty( "Marble", new MarbleDeclarativeObject( this ) ); } } #include "moc_MarbleDeclarativePlugin.cpp" Q_EXPORT_PLUGIN2( MarbleDeclarativePlugin, MarbleDeclarativePlugin )