16 #ifndef QGSRELATIONEDITORWIDGET_H 
   17 #define QGSRELATIONEDITORWIDGET_H 
   20 #include <QToolButton> 
   21 #include <QButtonGroup> 
   22 #include <QGridLayout> 
   25 #include "ui_qgsrelationeditorconfigwidgetbase.h" 
   92     Q_PROPERTY( Buttons visibleButtons READ visibleButtons WRITE setVisibleButtons )
 
  105       SaveChildEdits = 1 << 3, 
 
  106       AddChildFeature = 1 << 4, 
 
  107       DuplicateChildFeature = 1 << 5, 
 
  108       DeleteChildFeature = 1 << 6, 
 
  109       ZoomToChildFeature = 1 << 7, 
 
  110       AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature 
 
  113     Q_DECLARE_FLAGS( Buttons, Button )
 
  145     void setVisibleButtons( 
const Buttons &buttons );
 
  150     Buttons visibleButtons() 
const;
 
  162     void duplicateSelectedFeatures();
 
  167     void unlinkSelectedFeatures();
 
  172     void deleteSelectedFeatures();
 
  177     void zoomToSelectedFeatures();
 
  182     QVariantMap config() const override;
 
  187     void setConfig( const QVariantMap &config ) override;
 
  190     void parentFormValueChanged( const QString &attribute, const QVariant &newValue ) override;
 
  193     virtual 
void updateUi() override;
 
  194     void beforeSetRelationFeature( const 
QgsRelation &newRelation, const 
QgsFeature &newFeature ) override;
 
  195     void afterSetRelationFeature() override;
 
  197     void afterSetRelations() override;
 
  201     void updateButtons();
 
  203     void addFeatureGeometry();
 
  206     void mapToolDeactivated();
 
  207     void onKeyPressed( QKeyEvent *e );
 
  208     void onDigitizingCompleted( 
const QgsFeature &feature );
 
  216     QPointer<QgsMessageBarItem> mMessageBarItem;
 
  219     QToolButton *mToggleEditingButton = 
nullptr;
 
  220     QToolButton *mSaveEditsButton = 
nullptr;
 
  221     QToolButton *mAddFeatureButton = 
nullptr;
 
  222     QToolButton *mDuplicateFeatureButton = 
nullptr;
 
  223     QToolButton *mDeleteFeatureButton = 
nullptr;
 
  224     QToolButton *mLinkFeatureButton = 
nullptr;
 
  225     QToolButton *mUnlinkFeatureButton = 
nullptr;
 
  226     QToolButton *mZoomToFeatureButton = 
nullptr;
 
  227     QToolButton *mFormViewButton = 
nullptr;
 
  228     QToolButton *mTableViewButton = 
nullptr;
 
  229     QToolButton *mAddFeatureGeometryButton = 
nullptr;
 
  231     QButtonGroup *mViewModeButtonGroup = 
nullptr;
 
  234     Buttons mButtonsVisibility = Button::AllButtons;
 
  270     void setConfig( 
const QVariantMap &config );
 
  289     QString type() 
const override;
 
  291     QString name() 
const override;
 
This class contains context information for attribute editor widgets.
This widget is used to show the attributes of a set of features of a QgsVectorLayer.
ViewMode
The view modes, in which this widget can present information.
@ AttributeEditor
Show a list of the features, where one can be chosen and the according attribute dialog will be prese...
This class wraps a request for features to a vector layer (or directly its vector data provider).
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Is an interface class to abstract feature selection handling.
int selectedFeatureCount() override
Returns the number of features that are selected in this layer.
const QgsFeatureIds & selectedFeatureIds() const override
Returns reference to identifiers of selected features.
Represents a vector layer which manages a vector based data sets.
QSet< QgsFeatureId > QgsFeatureIds
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features