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
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();
217 void digitizingFinished( );
219 enum class MultiEditFeatureType :
int
225 enum class MultiEditTreeWidgetRole :
int
227 FeatureType = Qt::UserRole + 1,
228 FeatureId = Qt::UserRole + 2
235 void updateUiSingleEdit();
236 void updateUiMultiEdit();
237 QTreeWidgetItem *createMultiEditTreeWidgetItem(
const QgsFeature &feature,
QgsVectorLayer *layer, MultiEditFeatureType type );
240 QPointer<QgsMessageBarItem> mMessageBarItem;
243 QToolButton *mToggleEditingButton =
nullptr;
244 QToolButton *mSaveEditsButton =
nullptr;
245 QToolButton *mAddFeatureButton =
nullptr;
246 QToolButton *mDuplicateFeatureButton =
nullptr;
247 QToolButton *mDeleteFeatureButton =
nullptr;
248 QToolButton *mLinkFeatureButton =
nullptr;
249 QToolButton *mUnlinkFeatureButton =
nullptr;
250 QToolButton *mZoomToFeatureButton =
nullptr;
251 QToolButton *mFormViewButton =
nullptr;
252 QToolButton *mTableViewButton =
nullptr;
253 QToolButton *mAddFeatureGeometryButton =
nullptr;
254 QLabel *mMultiEditInfoLabel =
nullptr;
255 QStackedWidget *mStackedWidget =
nullptr;
256 QWidget *mMultiEditStackedWidgetPage =
nullptr;
257 QTreeWidget *mMultiEditTreeWidget =
nullptr;
259 QButtonGroup *mViewModeButtonGroup =
nullptr;
262 Buttons mButtonsVisibility = Button::AllButtons;
263 bool mShowFirstFeature =
true;
264 bool mAllowAddChildFeatureWithNoGeometry =
true;
265 QString mFilterExpression;
267 QList<QTreeWidgetItem *> mMultiEditPreviousSelectedItems;
270 friend class TestQgsRelationEditorWidget;
This class contains context information for attribute editor widgets.