mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Make a couple of QgsJsonUtils accessible via QML environment
This commit is contained in:
parent
25b89e01ed
commit
256dc35a09
@ -273,6 +273,9 @@ Helper utilities for working with JSON and GeoJSON conversions.
|
||||
%TypeHeaderCode
|
||||
#include "qgsjsonutils.h"
|
||||
%End
|
||||
public:
|
||||
static const QMetaObject staticMetaObject;
|
||||
|
||||
public:
|
||||
|
||||
static QgsFeatureList stringToFeatureList( const QString &string, const QgsFields &fields = QgsFields(), QTextCodec *encoding = 0 );
|
||||
|
@ -290,6 +290,8 @@ class CORE_EXPORT QgsJsonExporter
|
||||
|
||||
class CORE_EXPORT QgsJsonUtils
|
||||
{
|
||||
Q_GADGET
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
@ -317,7 +319,7 @@ class CORE_EXPORT QgsJsonUtils
|
||||
* \param value value to encode
|
||||
* \returns encoded value
|
||||
*/
|
||||
static QString encodeValue( const QVariant &value );
|
||||
Q_INVOKABLE static QString encodeValue( const QVariant &value );
|
||||
|
||||
/**
|
||||
* Exports all attributes from a QgsFeature as a JSON map type.
|
||||
@ -351,7 +353,7 @@ class CORE_EXPORT QgsJsonUtils
|
||||
* the conversion is not possible.
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
static QVariantList parseArray( const QString &json, QVariant::Type type = QVariant::Invalid );
|
||||
Q_INVOKABLE static QVariantList parseArray( const QString &json, QVariant::Type type = QVariant::Invalid );
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user