QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgsattributeeditortextelement.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsattributeeditortextelement.h - QgsAttributeEditorTextElement
3
4 ---------------------
5 begin : 28.12.2022
6 copyright : (C) 2022 by Alessandro Pasotti
7 email : elpaso at itopen dot it
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 QGSATTRIBUTEEDITORTEXTELEMENT_H
17#define QGSATTRIBUTEEDITORTEXTELEMENT_H
18
19#include "qgis_core.h"
21
22
23
31{
32 public:
33
41 : QgsAttributeEditorElement( Qgis::AttributeEditorType::TextElement, name, parent )
42 {}
43
45
49 QString text() const;
50
54 void setText( const QString &text );
55
56 private:
57 void saveConfiguration( QDomElement &elem, QDomDocument &doc ) const override;
58 void loadConfiguration( const QDomElement &element, const QString &layerId, const QgsReadWriteContext &context, const QgsFields &fields ) override;
59 QString typeIdentifier() const override;
60 QString mText;
61};
62
63
64#endif // QGSATTRIBUTEEDITORTEXTELEMENT_H
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:54
This is an abstract base class for any elements of a drag and drop form.
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
An attribute editor widget that will represent arbitrary text code.
QgsAttributeEditorTextElement(const QString &name, QgsAttributeEditorElement *parent)
Creates a new element which can display text.
Container of fields for a vector layer.
Definition: qgsfields.h:45
The class is used as a container of context for various read/write operations on other objects.
#define SIP_FACTORY
Definition: qgis_sip.h:76