16 #ifndef QGSATTRIBUTEEDITORELEMENT_H
17 #define QGSATTRIBUTEEDITORELEMENT_H
19 #include "qgis_core.h"
44 switch ( sipCpp->type() )
47 sipType = sipType_QgsAttributeEditorContainer;
50 sipType = sipType_QgsAttributeEditorField;
53 sipType = sipType_QgsAttributeEditorRelation;
93 QString
name()
const {
return mName; }
116 QDomElement toDomElement( QDomDocument &doc )
const;
130 bool showLabel()
const;
136 void setShowLabel(
bool showLabel );
153 virtual void saveConfiguration( QDomElement &elem )
const = 0;
161 virtual QString typeIdentifier()
const = 0;
184 , mIsGroupBox( true )
186 , mBackgroundColor( backgroundColor )
218 QList<QgsAttributeEditorElement *>
children()
const {
return mChildren; }
227 virtual QList<QgsAttributeEditorElement *> findElements( AttributeEditorType type )
const;
237 void setName(
const QString &name );
242 int columnCount()
const;
247 void setColumnCount(
int columnCount );
279 QColor backgroundColor()
const;
284 void setBackgroundColor(
const QColor &backgroundColor );
287 void saveConfiguration( QDomElement &elem )
const override;
288 QString typeIdentifier()
const override;
291 QList<QgsAttributeEditorElement *> mChildren;
294 QColor mBackgroundColor;
320 int idx()
const {
return mIdx; }
325 void saveConfiguration( QDomElement &elem )
const override;
326 QString typeIdentifier()
const override;
347 SaveChildEdits = 1 << 3,
348 AddChildFeature = 1 << 4,
349 DuplicateChildFeature = 1 << 5,
350 DeleteChildFeature = 1 << 6,
351 ZoomToChildFeature = 1 << 7,
352 AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature
355 Q_DECLARE_FLAGS( Buttons, Button )
363 , mRelationId( relationId )
371 , mRelationId( relation.id() )
372 , mRelation( relation )
383 , mRelationId( relationId )
394 , mRelationId( relation.id() )
395 , mRelation( relation )
428 Q_DECL_DEPRECATED
void setShowLinkButton(
bool showLinkButton )
SIP_DEPRECATED;
442 Q_DECL_DEPRECATED
void setShowUnlinkButton(
bool showUnlinkButton )
SIP_DEPRECATED;
449 Q_DECL_DEPRECATED
void setShowSaveChildEditsButton(
bool showChildEdits )
SIP_DEPRECATED;
456 Q_DECL_DEPRECATED
bool showSaveChildEditsButton() const
SIP_DEPRECATED;
474 bool forceSuppressFormPopup()
const;
482 void setForceSuppressFormPopup(
bool forceSuppressFormPopup );
488 QVariant nmRelationId()
const;
495 void setNmRelationId(
const QVariant &nmRelationId = QVariant() );
501 QString label()
const;
508 void setLabel(
const QString &label = QString() );
511 void saveConfiguration( QDomElement &elem )
const override;
512 QString typeIdentifier()
const override;
515 Buttons mButtons = Buttons( Button::AllButtons );
516 bool mForceSuppressFormPopup =
false;
517 QVariant mNmRelationId;
551 QString qmlCode()
const;
556 void setQmlCode(
const QString &qmlCode );
559 void saveConfiguration( QDomElement &elem )
const override;
560 QString typeIdentifier()
const override;
592 QString htmlCode()
const;
597 void setHtmlCode(
const QString &htmlCode );
600 void saveConfiguration( QDomElement &elem )
const override;
601 QString typeIdentifier()
const override;
606 #endif // QGSATTRIBUTEEDITORELEMENT_H