16 #ifndef QGSATTRIBUTEEDITORELEMENT_H
17 #define QGSATTRIBUTEEDITORELEMENT_H
19 #include "qgis_core.h"
43 switch ( sipCpp->type() )
46 sipType = sipType_QgsAttributeEditorContainer;
49 sipType = sipType_QgsAttributeEditorField;
52 sipType = sipType_QgsAttributeEditorRelation;
92 QString
name()
const {
return mName; }
115 QDomElement toDomElement( QDomDocument &doc )
const;
129 bool showLabel()
const;
135 void setShowLabel(
bool showLabel );
152 virtual void saveConfiguration( QDomElement &elem )
const = 0;
160 virtual QString typeIdentifier()
const = 0;
183 , mIsGroupBox( true )
185 , mBackgroundColor( backgroundColor )
217 QList<QgsAttributeEditorElement *>
children()
const {
return mChildren; }
226 virtual QList<QgsAttributeEditorElement *> findElements( AttributeEditorType type )
const;
236 void setName(
const QString &name );
241 int columnCount()
const;
246 void setColumnCount(
int columnCount );
278 QColor backgroundColor()
const;
283 void setBackgroundColor(
const QColor &backgroundColor );
286 void saveConfiguration( QDomElement &elem )
const override;
287 QString typeIdentifier()
const override;
290 QList<QgsAttributeEditorElement *> mChildren;
293 QColor mBackgroundColor;
319 int idx()
const {
return mIdx; }
324 void saveConfiguration( QDomElement &elem )
const override;
325 QString typeIdentifier()
const override;
342 , mRelationId( relationId )
350 , mRelationId( relation.id() )
351 , mRelation( relation )
362 , mRelationId( relationId )
373 , mRelationId( relation.id() )
374 , mRelation( relation )
400 bool showLinkButton()
const;
407 void setShowLinkButton(
bool showLinkButton );
414 bool showUnlinkButton()
const;
421 void setShowUnlinkButton(
bool showUnlinkButton );
428 void setShowSaveChildEditsButton(
bool showSaveChildEditsButton );
435 bool showSaveChildEditsButton( )
const;
439 void saveConfiguration( QDomElement &elem )
const override;
440 QString typeIdentifier()
const override;
443 bool mShowLinkButton =
true;
444 bool mShowUnlinkButton =
true;
445 bool mShowSaveChildEditsButton =
true;
475 QString qmlCode()
const;
480 void setQmlCode(
const QString &qmlCode );
483 void saveConfiguration( QDomElement &elem )
const override;
484 QString typeIdentifier()
const override;
516 QString htmlCode()
const;
521 void setHtmlCode(
const QString &htmlCode );
524 void saveConfiguration( QDomElement &elem )
const override;
525 QString typeIdentifier()
const override;
530 #endif // QGSATTRIBUTEEDITORELEMENT_H