QGIS API Documentation
3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
src
core
editform
qgsattributeeditorfield.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsattributeeditorfield.h - QgsAttributeEditorElement
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
#ifndef QGSATTRIBUTEEDITORFIELD_H
17
#define QGSATTRIBUTEEDITORFIELD_H
18
19
#include "qgis_core.h"
20
#include "
qgsattributeeditorelement.h
"
21
22
27
class
CORE_EXPORT
QgsAttributeEditorField
:
public
QgsAttributeEditorElement
28
{
29
public
:
30
38
QgsAttributeEditorField
(
const
QString &name,
int
idx,
QgsAttributeEditorElement
*parent )
39
:
QgsAttributeEditorElement
(
Qgis
::AttributeEditorType::Field, name, parent )
40
, mIdx( idx )
41
{}
42
46
int
idx
()
const
{
return
mIdx; }
47
48
QgsAttributeEditorElement
*
clone
(
QgsAttributeEditorElement
*parent )
const
override
SIP_FACTORY
;
49
50
private
:
51
void
saveConfiguration( QDomElement &elem, QDomDocument &doc )
const override
;
52
void
loadConfiguration(
const
QDomElement &element,
const
QString &layerId,
const
QgsReadWriteContext
&context,
const
QgsFields
&fields )
override
;
53
QString typeIdentifier()
const override
;
54
int
mIdx;
55
};
56
57
58
59
#endif
// QGSATTRIBUTEEDITORFIELD_H
Qgis
The Qgis class provides global constants for use throughout the application.
Definition
qgis.h:54
QgsAttributeEditorElement
This is an abstract base class for any elements of a drag and drop form.
Definition
qgsattributeeditorelement.h:43
QgsAttributeEditorElement::clone
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
QgsAttributeEditorField
This element will load a field's widget onto the form.
Definition
qgsattributeeditorfield.h:28
QgsAttributeEditorField::QgsAttributeEditorField
QgsAttributeEditorField(const QString &name, int idx, QgsAttributeEditorElement *parent)
Creates a new attribute editor element which represents a field.
Definition
qgsattributeeditorfield.h:38
QgsAttributeEditorField::idx
int idx() const
Returns the index of the field.
Definition
qgsattributeeditorfield.h:46
QgsFields
Container of fields for a vector layer.
Definition
qgsfields.h:46
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgsattributeeditorelement.h
Generated on Mon Oct 28 2024 22:06:03 for QGIS API Documentation by
1.9.8