40 static QObject *_utilsProvider( QQmlEngine *engine, QJSEngine *scriptEngine )
43 Q_UNUSED( scriptEngine )
49 qRegisterMetaType< QList<QgsMapLayer *> >(
"QList<QgsMapLayer*>" );
50 qRegisterMetaType< QgsAttributes > (
"QgsAttributes" );
51 qRegisterMetaType< QgsCoordinateReferenceSystem >(
"QgsCoordinateReferenceSystem" );
52 qRegisterMetaType< QgsCoordinateTransformContext >(
"QgsCoordinateTransformContext" );
53 qRegisterMetaType< QgsFeature > (
"QgsFeature" );
54 qRegisterMetaType< QgsFeatureId > (
"QgsFeatureId" );
55 qRegisterMetaType< QgsPoint >(
"QgsPoint" );
56 qRegisterMetaType< QgsPointXY >(
"QgsPointXY" );
57 qRegisterMetaType< QgsUnitTypes::SystemOfMeasurement >(
"QgsUnitTypes::SystemOfMeasurement" );
58 qRegisterMetaType< QgsUnitTypes::DistanceUnit >(
"QgsUnitTypes::DistanceUnit" );
59 qRegisterMetaType< QgsCoordinateFormatter::FormatFlags >(
"QgsCoordinateFormatter::FormatFlags" );
60 qRegisterMetaType< QgsCoordinateFormatter::Format >(
"QgsCoordinateFormatter::Format" );
61 qRegisterMetaType< QVariant::Type >(
"QVariant::Type" );
63 qmlRegisterUncreatableType< QgsUnitTypes >( uri, 0, 1,
"QgsUnitTypes",
"Only enums from QgsUnitTypes can be used" );
64 qmlRegisterType< QgsProject >( uri, 0, 1,
"Project" );
65 qmlRegisterType< QgsQuickMapCanvasMap >( uri, 0, 1,
"MapCanvasMap" );
66 qmlRegisterType< QgsQuickMapSettings >( uri, 0, 1,
"MapSettings" );
67 qmlRegisterType< QgsQuickMapTransform >( uri, 0, 1,
"MapTransform" );
68 qmlRegisterType< QgsVectorLayer >( uri, 0, 1,
"VectorLayer" );
70 qmlRegisterSingletonType< QgsQuickUtils >( uri, 0, 1,
"Utils", _utilsProvider );
void registerTypes(const char *uri)
Registers the QGIS QML types in the given uri.
Encapsulating the common utilities for QgsQuick library.