/
qgsattributeeditorelement.sip.in
133 lines (105 loc) · 3.82 KB
/
qgsattributeeditorelement.sip.in
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/editform/qgsattributeeditorelement.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeEditorElement /Abstract/
{
%Docstring
This is an abstract base class for any elements of a drag and drop form.
This can either be a container which will be represented on the screen
as a tab widget or a collapsible group box. Or it can be a field which will
then be represented based on the QgsEditorWidget type and configuration.
Or it can be a relation and embed the form of several children of another
layer.
%End
%TypeHeaderCode
#include "qgsattributeeditorelement.h"
%End
%ConvertToSubClassCode
switch ( sipCpp->type() )
{
case QgsAttributeEditorElement::AeTypeContainer:
sipType = sipType_QgsAttributeEditorContainer;
break;
case QgsAttributeEditorElement::AeTypeField:
sipType = sipType_QgsAttributeEditorField;
break;
case QgsAttributeEditorElement::AeTypeRelation:
sipType = sipType_QgsAttributeEditorRelation;
break;
default:
sipType = nullptr;
break;
}
%End
public:
enum AttributeEditorType
{
AeTypeContainer,
AeTypeField,
AeTypeRelation,
AeTypeInvalid,
AeTypeQmlElement,
AeTypeHtmlElement
};
QgsAttributeEditorElement( AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent = 0 );
%Docstring
Constructor
:param type: The type of the new element.
:param name:
:param parent:
%End
virtual ~QgsAttributeEditorElement();
static QgsAttributeEditorElement *create( const QDomElement &element, const QString &layerId, const QgsFields &fields, const QgsReadWriteContext &context, QgsAttributeEditorElement *parent = 0 ) /Factory/;
%Docstring
Constructs the editor element from the given element
.. versionadded:: 3.18
%End
QString name() const;
%Docstring
Returns the name of this element
:return: The name for this element
%End
AttributeEditorType type() const;
%Docstring
The type of this element
:return: The type
%End
QgsAttributeEditorElement *parent() const;
%Docstring
Gets the parent of this element.
.. versionadded:: 3.0
%End
QDomElement toDomElement( QDomDocument &doc ) const;
%Docstring
Gets the XML Dom element to save this element.
:param doc: The QDomDocument which is used to create new XML elements
:return: A DOM element to serialize this element
%End
virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const = 0 /Factory/;
%Docstring
Returns a clone of this element. To be implemented by subclasses.
.. versionadded:: 3.0
%End
bool showLabel() const;
%Docstring
Controls if this element should be labeled with a title (field, relation or groupname).
.. versionadded:: 2.18
%End
void setShowLabel( bool showLabel );
%Docstring
Controls if this element should be labeled with a title (field, relation or groupname).
.. versionadded:: 2.18
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/editform/qgsattributeeditorelement.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/