QGIS/python/core/fieldformatter/qgsvaluerelationfieldformatter.sip.in
Alessandro Pasotti 4f05ed1dd7 [bugfix] value relation widget with Allow multiple selection doesn't resolve
Now it will accept arrays as well as string representations of arrays

Added a test

Fixes #16967 value relation widget with Allow multiple selection doesn't resolve the values anymore
2018-03-15 15:11:52 +01:00

88 lines
2.8 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/fieldformatter/qgsvaluerelationfieldformatter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsValueRelationFieldFormatter : QgsFieldFormatter
{
%Docstring
Field formatter for a value relation field.
A value relation field formatter looks up the values from
features on another layer.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsvaluerelationfieldformatter.h"
%End
public:
struct ValueRelationItem
{
ValueRelationItem( const QVariant &key, const QString &value );
%Docstring
Constructor for ValueRelationItem
%End
ValueRelationItem();
%Docstring
Constructor for ValueRelationItem
%End
QVariant key;
QString value;
};
typedef QVector < QgsValueRelationFieldFormatter::ValueRelationItem > ValueRelationCache;
QgsValueRelationFieldFormatter();
%Docstring
Constructor for QgsValueRelationFieldFormatter.
%End
virtual QString id() const;
virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
virtual QVariant sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const;
virtual QVariant createCache( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config ) const;
static QgsValueRelationFieldFormatter::ValueRelationCache createCache( const QVariantMap &config );
%Docstring
Create a cache for a value relation field.
This can be used to keep the value map in the local memory
if doing multiple lookups in a loop.
.. versionadded:: 3.0
%End
static QStringList valueToStringList( const QVariant &value );
%Docstring
Utility to convert an array or a string representation of and array ``value`` to a string list
:param value: The value to be converted
:return: A string list
.. versionadded:: 3.2
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/fieldformatter/qgsvaluerelationfieldformatter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/