92 Q_PROPERTY(
Buttons visibleButtons READ visibleButtons WRITE setVisibleButtons )
104 SaveChildEdits = 1 << 3,
105 AddChildFeature = 1 << 4,
106 DuplicateChildFeature = 1 << 5,
107 DeleteChildFeature = 1 << 6,
108 ZoomToChildFeature = 1 << 7,
109 AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature
144 void setVisibleButtons(
const Buttons &buttons );
149 Buttons visibleButtons()
const;
161 void duplicateSelectedFeatures();
166 void unlinkSelectedFeatures();
171 void deleteSelectedFeatures();
176 void zoomToSelectedFeatures();
181 QVariantMap config() const override;
186 void setConfig( const QVariantMap &config ) override;
189 void parentFormValueChanged( const QString &attribute, const QVariant &newValue ) override;
192 virtual
void updateUi() override;
193 void beforeSetRelationFeature( const
QgsRelation &newRelation, const
QgsFeature &newFeature ) override;
194 void afterSetRelationFeature() override;
196 void afterSetRelations() override;
200 void updateButtons();
203 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;
264 QString mFilterExpression;
266 QList<QTreeWidgetItem *> mMultiEditPreviousSelectedItems;
269 friend class TestQgsRelationEditorWidget;
This class contains context information for attribute editor widgets.