94 Q_PROPERTY( Buttons visibleButtons READ visibleButtons WRITE setVisibleButtons )
107 SaveChildEdits = 1 << 3,
108 AddChildFeature = 1 << 4,
109 DuplicateChildFeature = 1 << 5,
110 DeleteChildFeature = 1 << 6,
111 ZoomToChildFeature = 1 << 7,
112 AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature
115 Q_DECLARE_FLAGS( Buttons, Button )
147 void setVisibleButtons(
const Buttons &buttons );
152 Buttons visibleButtons()
const;
164 void duplicateSelectedFeatures();
169 void unlinkSelectedFeatures();
174 void deleteSelectedFeatures();
179 void zoomToSelectedFeatures();
184 QVariantMap config() const override;
189 void setConfig( const QVariantMap &config ) override;
192 void parentFormValueChanged( const QString &attribute, const QVariant &newValue ) override;
195 virtual
void updateUi() override;
196 void beforeSetRelationFeature( const
QgsRelation &newRelation, const
QgsFeature &newFeature ) override;
197 void afterSetRelationFeature() override;
199 void afterSetRelations() override;
203 void updateButtons();
206 void addFeatureGeometry();
209 void mapToolDeactivated();
210 void onDigitizingCompleted(
const QgsFeature &feature );
211 void onDigitizingCanceled( );
212 void multiEditItemSelectionChanged();
216 void digitizingFinished( );
218 enum class MultiEditFeatureType :
int
224 enum class MultiEditTreeWidgetRole :
int
226 FeatureType = Qt::UserRole + 1,
227 FeatureId = Qt::UserRole + 2
234 void updateUiSingleEdit();
235 void updateUiMultiEdit();
236 QTreeWidgetItem *createMultiEditTreeWidgetItem(
const QgsFeature &feature,
QgsVectorLayer *layer, MultiEditFeatureType type );
239 QPointer<QgsMessageBarItem> mMessageBarItem;
242 QToolButton *mToggleEditingButton =
nullptr;
243 QToolButton *mSaveEditsButton =
nullptr;
244 QToolButton *mAddFeatureButton =
nullptr;
245 QToolButton *mDuplicateFeatureButton =
nullptr;
246 QToolButton *mDeleteFeatureButton =
nullptr;
247 QToolButton *mLinkFeatureButton =
nullptr;
248 QToolButton *mUnlinkFeatureButton =
nullptr;
249 QToolButton *mZoomToFeatureButton =
nullptr;
250 QToolButton *mFormViewButton =
nullptr;
251 QToolButton *mTableViewButton =
nullptr;
252 QToolButton *mAddFeatureGeometryButton =
nullptr;
253 QLabel *mMultiEditInfoLabel =
nullptr;
254 QStackedWidget *mStackedWidget =
nullptr;
255 QWidget *mMultiEditStackedWidgetPage =
nullptr;
256 QTreeWidget *mMultiEditTreeWidget =
nullptr;
258 QButtonGroup *mViewModeButtonGroup =
nullptr;
261 Buttons mButtonsVisibility = Button::AllButtons;
262 bool mShowFirstFeature =
true;
263 bool mAllowAddChildFeatureWithNoGeometry =
true;
265 QList<QTreeWidgetItem *> mMultiEditPreviousSelectedItems;
268 friend class TestQgsRelationEditorWidget;
This class contains context information for attribute editor widgets.