33 #include "qgsquickattributeformmodel.h" 34 #include "qgsquickattributeformmodelbase.h" 35 #include "qgsquickattributemodel.h" 47 #include "qgsquicksubmodel.h" 50 static QObject *_utilsProvider( QQmlEngine *engine, QJSEngine *scriptEngine )
53 Q_UNUSED( scriptEngine )
59 qRegisterMetaType< QList<QgsMapLayer *> >(
"QList<QgsMapLayer*>" );
60 qRegisterMetaType< QgsAttributes > (
"QgsAttributes" );
61 qRegisterMetaType< QgsCoordinateReferenceSystem >(
"QgsCoordinateReferenceSystem" );
62 qRegisterMetaType< QgsCoordinateTransformContext >(
"QgsCoordinateTransformContext" );
63 qRegisterMetaType< QgsFeature > (
"QgsFeature" );
64 qRegisterMetaType< QgsFeatureId > (
"QgsFeatureId" );
65 qRegisterMetaType< QgsPoint >(
"QgsPoint" );
66 qRegisterMetaType< QgsPointXY >(
"QgsPointXY" );
67 qRegisterMetaType< QgsQuickFeatureLayerPair >(
"QgsQuickFeatureLayerPair" );
68 qRegisterMetaType< QgsUnitTypes::SystemOfMeasurement >(
"QgsUnitTypes::SystemOfMeasurement" );
69 qRegisterMetaType< QgsUnitTypes::DistanceUnit >(
"QgsUnitTypes::DistanceUnit" );
70 qRegisterMetaType< QgsCoordinateFormatter::FormatFlags >(
"QgsCoordinateFormatter::FormatFlags" );
71 qRegisterMetaType< QgsCoordinateFormatter::Format >(
"QgsCoordinateFormatter::Format" );
73 qmlRegisterUncreatableType< QgsUnitTypes >( uri, 0, 1,
"QgsUnitTypes",
"Only enums from QgsUnitTypes can be used" );
75 qmlRegisterType< QgsProject >( uri, 0, 1,
"Project" );
76 qmlRegisterType< QgsQuickAttributeFormModel >( uri, 0, 1,
"AttributeFormModel" );
77 qmlRegisterType< QgsQuickAttributeModel >( uri, 0, 1,
"AttributeModel" );
78 qmlRegisterType< QgsQuickFeatureHighlight >( uri, 0, 1,
"FeatureHighlight" );
79 qmlRegisterType< QgsQuickCoordinateTransformer >( uri, 0, 1,
"CoordinateTransformer" );
80 qmlRegisterType< QgsQuickIdentifyKit >( uri, 0, 1,
"IdentifyKit" );
81 qmlRegisterType< QgsQuickMapCanvasMap >( uri, 0, 1,
"MapCanvasMap" );
82 qmlRegisterType< QgsQuickMapSettings >( uri, 0, 1,
"MapSettings" );
83 qmlRegisterType< QgsQuickMapTransform >( uri, 0, 1,
"MapTransform" );
84 qmlRegisterType< QgsQuickMessageLogModel >( uri, 0, 1,
"MessageLogModel" );
85 qmlRegisterType< QgsQuickPositionKit >( uri, 0, 1,
"PositionKit" );
86 qmlRegisterType< QgsQuickScaleBarKit >( uri, 0, 1,
"ScaleBarKit" );
87 qmlRegisterType< QgsQuickSubModel >( uri, 0, 1,
"SubModel" );
88 qmlRegisterType< QgsVectorLayer >( uri, 0, 1,
"VectorLayer" );
90 qmlRegisterSingletonType< QgsQuickUtils >( uri, 0, 1,
"Utils", _utilsProvider );
Encapsulating the common utilies for QgsQuick library.
void registerTypes(const char *uri)
Registers the QGIS QML types in the given uri.