QGIS API Documentation
3.30.0-'s-Hertogenbosch (f186b8efe0)
src
core
editform
qgsattributeeditorfield.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsattributeeditorfield.cpp - QgsAttributeEditorField
3
4
---------------------
5
begin : 12.01.2021
6
copyright : (C) 2021 by Denis Rouzaud
7
email :
[email protected]
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#include "
qgsattributeeditorfield.h
"
17
18
QgsAttributeEditorElement
*
QgsAttributeEditorField::clone
(
QgsAttributeEditorElement
*parent )
const
19
{
20
QgsAttributeEditorField
*element =
new
QgsAttributeEditorField
(
name
(), mIdx,
parent
);
21
element->
mLabelStyle
=
mLabelStyle
;
22
return
element;
23
}
24
25
26
void
QgsAttributeEditorField::saveConfiguration( QDomElement &elem, QDomDocument &doc )
const
27
{
28
Q_UNUSED( doc )
29
elem.setAttribute( QStringLiteral(
"index"
), mIdx );
30
}
31
32
void
QgsAttributeEditorField::loadConfiguration(
const
QDomElement &element,
const
QString &layerId,
const
QgsReadWriteContext
&context,
const
QgsFields
&fields )
33
{
34
Q_UNUSED( element )
35
Q_UNUSED( layerId )
36
Q_UNUSED( context )
37
Q_UNUSED( fields )
38
}
39
40
QString QgsAttributeEditorField::typeIdentifier()
const
41
{
42
return
QStringLiteral(
"attributeEditorField"
);
43
}
QgsAttributeEditorElement
This is an abstract base class for any elements of a drag and drop form.
Definition:
qgsattributeeditorelement.h:38
QgsAttributeEditorElement::mLabelStyle
LabelStyle mLabelStyle
Definition:
qgsattributeeditorelement.h:210
QgsAttributeEditorElement::parent
QgsAttributeEditorElement * parent() const
Gets the parent of this element.
Definition:
qgsattributeeditorelement.h:158
QgsAttributeEditorElement::name
QString name() const
Returns the name of this element.
Definition:
qgsattributeeditorelement.h:144
QgsAttributeEditorField
This element will load a field's widget onto the form.
Definition:
qgsattributeeditorfield.h:28
QgsAttributeEditorField::clone
QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const override
Returns a clone of this element.
Definition:
qgsattributeeditorfield.cpp:18
QgsAttributeEditorField::QgsAttributeEditorField
QgsAttributeEditorField(const QString &name, int idx, QgsAttributeEditorElement *parent)
Creates a new attribute editor element which represents a field.
Definition:
qgsattributeeditorfield.h:38
QgsFields
Container of fields for a vector layer.
Definition:
qgsfields.h:45
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:35
qgsattributeeditorfield.h
Generated on Sun Mar 5 2023 20:41:05 for QGIS API Documentation by
1.9.4