16 #ifndef QGSRELATIONEDITOR_H
17 #define QGSRELATIONEDITOR_H
20 #include <QToolButton>
21 #include <QButtonGroup>
22 #include <QGridLayout>
88 if ( qobject_cast<QgsRelationEditorWidget *>( sipCpp ) )
89 sipType = sipType_QgsRelationEditorWidget;
99 Q_PROPERTY(
bool showLabel READ showLabel WRITE setShowLabel )
100 Q_PROPERTY( QgsAttributeEditorRelation::Buttons visibleButtons READ visibleButtons WRITE setVisibleButtons )
135 void setFeature(
const QgsFeature &feature,
bool update =
true );
161 bool showLabel()
const;
168 void setShowLabel(
bool showLabel );
182 Q_DECL_DEPRECATED
void setShowLinkButton(
bool showLinkButton )
SIP_DEPRECATED;
196 Q_DECL_DEPRECATED
void setShowUnlinkButton(
bool showUnlinkButton )
SIP_DEPRECATED;
203 Q_DECL_DEPRECATED
void setShowSaveChildEditsButton(
bool showChildEdits )
SIP_DEPRECATED;
210 Q_DECL_DEPRECATED
bool showSaveChildEditsButton() const
SIP_DEPRECATED;
228 bool forceSuppressFormPopup() const;
235 void setForceSuppressFormPopup(
bool forceSuppressFormPopup );
241 QVariant nmRelationId() const;
248 void setNmRelationId( const QVariant &nmRelationId = QVariant() );
254 QString label() const;
261 void setLabel( const QString &label = QString() );
277 void parentFormValueChanged( const QString &attribute, const QVariant &newValue );
281 void updateButtons();
284 void addFeatureGeometry();
285 void duplicateFeature();
288 void deleteSelectedFeatures();
290 void unlinkSelectedFeatures();
291 void zoomToSelectedFeatures();
293 void toggleEditing(
bool state );
294 void onCollapsedStateChanged(
bool collapsed );
296 void mapToolDeactivated();
297 void onKeyPressed( QKeyEvent *e );
298 void onDigitizingCompleted(
const QgsFeature &feature );
299 void onLinkFeatureDlgAccepted();
309 QPointer<QgsMessageBarItem> mMessageBarItem;
317 QToolButton *mToggleEditingButton =
nullptr;
318 QToolButton *mSaveEditsButton =
nullptr;
319 QToolButton *mAddFeatureButton =
nullptr;
320 QToolButton *mDuplicateFeatureButton =
nullptr;
321 QToolButton *mDeleteFeatureButton =
nullptr;
322 QToolButton *mLinkFeatureButton =
nullptr;
323 QToolButton *mUnlinkFeatureButton =
nullptr;
324 QToolButton *mZoomToFeatureButton =
nullptr;
325 QToolButton *mFormViewButton =
nullptr;
326 QToolButton *mTableViewButton =
nullptr;
327 QToolButton *mAddFeatureGeometryButton =
nullptr;
328 QGridLayout *mRelationLayout =
nullptr;
330 QButtonGroup *mViewModeButtonGroup =
nullptr;
332 QgsAttributeEditorRelation::Buttons mButtonsVisibility = QgsAttributeEditorRelation::Button::AllButtons;
333 bool mShowLabel =
true;
334 bool mVisible =
false;
335 bool mLayerInSameTransactionGroup =
false;
337 bool mForceSuppressFormPopup =
false;
338 QVariant mNmRelationId;
357 #endif // QGSRELATIONEDITOR_H