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();
212 void mapToolDeactivated();
213 void onDigitizingCompleted(
const QgsFeature &feature );
214 void onDigitizingCanceled( );
215 void multiEditItemSelectionChanged();
220 void digitizingFinished( );
222 enum class MultiEditFeatureType :
int
228 enum class MultiEditTreeWidgetRole :
int
230 FeatureType = Qt::UserRole + 1,
231 FeatureId = Qt::UserRole + 2
238 void updateUiSingleEdit();
239 void updateUiMultiEdit();
240 QTreeWidgetItem *createMultiEditTreeWidgetItem(
const QgsFeature &feature,
QgsVectorLayer *layer, MultiEditFeatureType type );
243 QPointer<QgsMessageBarItem> mMessageBarItem;
246 QToolButton *mToggleEditingButton =
nullptr;
247 QToolButton *mSaveEditsButton =
nullptr;
248 QToolButton *mAddFeatureButton =
nullptr;
249 QToolButton *mDuplicateFeatureButton =
nullptr;
250 QToolButton *mDeleteFeatureButton =
nullptr;
251 QToolButton *mLinkFeatureButton =
nullptr;
252 QToolButton *mUnlinkFeatureButton =
nullptr;
253 QToolButton *mZoomToFeatureButton =
nullptr;
254 QToolButton *mFormViewButton =
nullptr;
255 QToolButton *mTableViewButton =
nullptr;
256 QToolButton *mAddFeatureGeometryButton =
nullptr;
257 QLabel *mMultiEditInfoLabel =
nullptr;
258 QStackedWidget *mStackedWidget =
nullptr;
259 QWidget *mMultiEditStackedWidgetPage =
nullptr;
260 QTreeWidget *mMultiEditTreeWidget =
nullptr;
262 QButtonGroup *mViewModeButtonGroup =
nullptr;
265 Buttons mButtonsVisibility = Button::AllButtons;
266 bool mShowFirstFeature =
true;
267 bool mAllowAddChildFeatureWithNoGeometry =
true;
268 QString mFilterExpression;
270 QList<QTreeWidgetItem *> mMultiEditPreviousSelectedItems;
273 friend class TestQgsRelationEditorWidget;
This class contains context information for attribute editor widgets.