/
qgsvaluerelationfieldformatter.sip
77 lines (57 loc) · 2.57 KB
/
qgsvaluerelationfieldformatter.sip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/************************************************************************
* 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
:rtype: QgsValueRelationFieldFormatter.ValueRelationCache
%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 *
************************************************************************/