mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-17 00:09:36 -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
|
%TypeHeaderCode
|
||||||
#include "qgsjsonutils.h"
|
#include "qgsjsonutils.h"
|
||||||
%End
|
%End
|
||||||
|
public:
|
||||||
|
static const QMetaObject staticMetaObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static QgsFeatureList stringToFeatureList( const QString &string, const QgsFields &fields = QgsFields(), QTextCodec *encoding = 0 );
|
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
|
class CORE_EXPORT QgsJsonUtils
|
||||||
{
|
{
|
||||||
|
Q_GADGET
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -317,7 +319,7 @@ class CORE_EXPORT QgsJsonUtils
|
|||||||
* \param value value to encode
|
* \param value value to encode
|
||||||
* \returns encoded value
|
* \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.
|
* Exports all attributes from a QgsFeature as a JSON map type.
|
||||||
@ -351,7 +353,7 @@ class CORE_EXPORT QgsJsonUtils
|
|||||||
* the conversion is not possible.
|
* the conversion is not possible.
|
||||||
* \since QGIS 3.0
|
* \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