QGIS API Documentation
3.6.0-Noosa (5873452)
|
This element will load a relation editor onto the form. More...
#include <qgsattributeeditorelement.h>
Public Member Functions | |
Q_DECL_DEPRECATED | QgsAttributeEditorRelation (const QString &name, const QString &relationId, QgsAttributeEditorElement *parent) |
Q_DECL_DEPRECATED | QgsAttributeEditorRelation (const QString &name, const QgsRelation &relation, QgsAttributeEditorElement *parent) |
QgsAttributeEditorRelation (const QString &relationId, QgsAttributeEditorElement *parent) | |
Creates a new element which embeds a relation. More... | |
QgsAttributeEditorRelation (const QgsRelation &relation, QgsAttributeEditorElement *parent) | |
Creates a new element which embeds a relation. More... | |
QgsAttributeEditorElement * | clone (QgsAttributeEditorElement *parent) const override |
Returns a clone of this element. More... | |
bool | init (QgsRelationManager *relManager) |
Initializes the relation from the id. More... | |
const QgsRelation & | relation () const |
Gets the id of the relation which shall be embedded. More... | |
void | setShowLinkButton (bool showLinkButton) |
Determines if the "link feature" button should be shown. More... | |
void | setShowUnlinkButton (bool showUnlinkButton) |
Determines if the "unlink feature" button should be shown. More... | |
bool | showLinkButton () const |
Determines if the "link feature" button should be shown. More... | |
bool | showUnlinkButton () const |
Determines if the "unlink feature" button should be shown. More... | |
Public Member Functions inherited from QgsAttributeEditorElement | |
QgsAttributeEditorElement (AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr) | |
Constructor. More... | |
virtual | ~QgsAttributeEditorElement ()=default |
QString | name () const |
Returns the name of this element. More... | |
QgsAttributeEditorElement * | parent () const |
Gets the parent of this element. More... | |
void | setShowLabel (bool showLabel) |
Controls if this element should be labeled with a title (field, relation or groupname). More... | |
bool | showLabel () const |
Controls if this element should be labeled with a title (field, relation or groupname). More... | |
QDomElement | toDomElement (QDomDocument &doc) const |
Gets the XML Dom element to save this element. More... | |
AttributeEditorType | type () const |
The type of this element. More... | |
Additional Inherited Members | |
Public Types inherited from QgsAttributeEditorElement | |
enum | AttributeEditorType { AeTypeContainer, AeTypeField, AeTypeRelation, AeTypeInvalid, AeTypeQmlElement } |
Protected Attributes inherited from QgsAttributeEditorElement | |
QString | mName |
QgsAttributeEditorElement * | mParent = nullptr |
bool | mShowLabel |
AttributeEditorType | mType |
This element will load a relation editor onto the form.
Definition at line 315 of file qgsattributeeditorelement.h.
|
inline |
The name parameter is not used for anything and overwritten by the relationId internally.
Definition at line 322 of file qgsattributeeditorelement.h.
|
inline |
The name parameter is not used for anything and overwritten by the relationId internally.
Definition at line 330 of file qgsattributeeditorelement.h.
|
inline |
Creates a new element which embeds a relation.
relationId | The id of the relation to embed |
parent | The parent (used as container) |
Definition at line 342 of file qgsattributeeditorelement.h.
|
inline |
Creates a new element which embeds a relation.
relation | The relation to embed |
parent | The parent (used as container) |
Definition at line 353 of file qgsattributeeditorelement.h.
|
overridevirtual |
Returns a clone of this element.
To be implemented by subclasses.
Implements QgsAttributeEditorElement.
Definition at line 83 of file qgsattributeeditorelement.cpp.
bool QgsAttributeEditorRelation::init | ( | QgsRelationManager * | relManager | ) |
Initializes the relation from the id.
relManager | The relation manager to use for the initialization |
Definition at line 77 of file qgsattributeeditorelement.cpp.
|
inline |
Gets the id of the relation which shall be embedded.
Definition at line 365 of file qgsattributeeditorelement.h.
void QgsAttributeEditorRelation::setShowLinkButton | ( | bool | showLinkButton | ) |
Determines if the "link feature" button should be shown.
Definition at line 139 of file qgsattributeeditorelement.cpp.
void QgsAttributeEditorRelation::setShowUnlinkButton | ( | bool | showUnlinkButton | ) |
Determines if the "unlink feature" button should be shown.
Definition at line 149 of file qgsattributeeditorelement.cpp.
bool QgsAttributeEditorRelation::showLinkButton | ( | ) | const |
Determines if the "link feature" button should be shown.
Definition at line 134 of file qgsattributeeditorelement.cpp.
bool QgsAttributeEditorRelation::showUnlinkButton | ( | ) | const |
Determines if the "unlink feature" button should be shown.
Definition at line 144 of file qgsattributeeditorelement.cpp.