QGIS API Documentation
3.99.0-Master (d270888f95f)
Loading...
Searching...
No Matches
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
#include <QDomElement>
19
#include <QString>
20
21
using namespace
Qt::StringLiterals;
22
23
QgsAttributeEditorElement
*
QgsAttributeEditorField::clone
(
QgsAttributeEditorElement
*
parent
)
const
24
{
25
QgsAttributeEditorField
*element =
new
QgsAttributeEditorField
(
name
(), mIdx,
parent
);
26
element->
mLabelStyle
=
mLabelStyle
;
27
return
element;
28
}
29
30
31
void
QgsAttributeEditorField::saveConfiguration( QDomElement &elem, QDomDocument &doc )
const
32
{
33
Q_UNUSED( doc )
34
elem.setAttribute( u
"index"
_s, mIdx );
35
}
36
37
void
QgsAttributeEditorField::loadConfiguration(
const
QDomElement &element,
const
QString &layerId,
const
QgsReadWriteContext
&context,
const
QgsFields
&fields )
38
{
39
Q_UNUSED( element )
40
Q_UNUSED( layerId )
41
Q_UNUSED( context )
42
Q_UNUSED( fields )
43
}
44
45
QString QgsAttributeEditorField::typeIdentifier()
const
46
{
47
return
u
"attributeEditorField"
_s;
48
}
QgsAttributeEditorElement::mLabelStyle
LabelStyle mLabelStyle
Definition
qgsattributeeditorelement.h:239
QgsAttributeEditorElement::parent
QgsAttributeEditorElement * parent() const
Gets the parent of this element.
Definition
qgsattributeeditorelement.h:148
QgsAttributeEditorElement::QgsAttributeEditorElement
QgsAttributeEditorElement(Qgis::AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
Constructor.
Definition
qgsattributeeditorelement.h:115
QgsAttributeEditorElement::name
QString name() const
Returns the name of this element.
Definition
qgsattributeeditorelement.h:135
QgsAttributeEditorField::clone
QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const override
Returns a clone of this element.
Definition
qgsattributeeditorfield.cpp:23
QgsAttributeEditorField::QgsAttributeEditorField
QgsAttributeEditorField(const QString &name, int idx, QgsAttributeEditorElement *parent)
Creates a new attribute editor element which represents a field.
Definition
qgsattributeeditorfield.h:37
QgsFields
Container of fields for a vector layer.
Definition
qgsfields.h:46
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:38
qgsattributeeditorfield.h
Generated on
for QGIS API Documentation by
1.15.0