|
QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
#include <qgsrelationeditorwidget.h>

Public Slots | |
| void | parentFormValueChanged (const QString &attribute, const QVariant &newValue) |
| Called when an attribute value in the parent widget has changed to newValue. More... | |
Public Slots inherited from QgsCollapsibleGroupBoxBasic | |
| void | checkClicked (bool ckd) |
| void | checkToggled (bool ckd) |
| void | toggleCollapsed () |
Public Member Functions | |
| QgsRelationEditorWidget (QWidget *parent=nullptr) | |
| QgsAttributeEditorContext | editorContext () const |
| Returns the attribute editor context. More... | |
| QgsFeature | feature () const |
| Returns the widget's current feature. More... | |
| QgsIFeatureSelectionManager * | featureSelectionManager () |
| The feature selection manager is responsible for the selected features which are currently being edited. More... | |
| bool | forceSuppressFormPopup () const |
| Determines the force suppress form popup status that is configured for this widget. More... | |
| QString | label () const |
| Determines the label of this element. More... | |
| QVariant | nmRelationId () const |
| Determines the relation id of the second relation involved in an N:M relation. More... | |
| void | setEditorContext (const QgsAttributeEditorContext &context) |
| Sets the editor context. More... | |
| void | setFeature (const QgsFeature &feature, bool update=true) |
Sets the feature being edited and updates the UI unless update is set to false. More... | |
| void | setForceSuppressFormPopup (bool forceSuppressFormPopup) |
| Sets force suppress form popup status with forceSuppressFormPopup configured for this widget. More... | |
| void | setLabel (const QString &label=QString()) |
| Sets label for this element If it's empty it takes the relation id as label. More... | |
| void | setNmRelationId (const QVariant &nmRelationId=QVariant()) |
| Sets nmRelationId for the relation id of the second relation involved in an N:M relation. More... | |
| void | setRelationFeature (const QgsRelation &relation, const QgsFeature &feature) |
| Sets the relation and the feature. More... | |
| void | setRelations (const QgsRelation &relation, const QgsRelation &nmrelation) |
| Set the relation(s) for this widget If only one relation is set, it will act as a simple 1:N relation widget If both relations are set, it will act as an N:M relation widget inserting and deleting entries on the intermediate table as required. More... | |
| void | setShowLabel (bool showLabel) |
| Defines if a title label should be shown for this widget. More... | |
| Q_DECL_DEPRECATED void | setShowLinkButton (bool showLinkButton) |
| Determines if the "link feature" button should be shown. More... | |
| Q_DECL_DEPRECATED void | setShowSaveChildEditsButton (bool showChildEdits) |
| Determines if the "Save child layer edits" button should be shown. More... | |
| Q_DECL_DEPRECATED void | setShowUnlinkButton (bool showUnlinkButton) |
| Determines if the "unlink feature" button should be shown. More... | |
| void | setViewMode (QgsDualView::ViewMode mode) |
| Define the view mode for the dual view. More... | |
| void | setVisibleButtons (const QgsAttributeEditorRelation::Buttons &buttons) |
| Defines the buttons which are shown. More... | |
| bool | showLabel () const |
| Defines if a title label should be shown for this widget. More... | |
| Q_DECL_DEPRECATED bool | showLinkButton () const |
| Determines if the "link feature" button should be shown. More... | |
| Q_DECL_DEPRECATED bool | showSaveChildEditsButton () const |
| Determines if the "Save child layer edits" button should be shown. More... | |
| Q_DECL_DEPRECATED bool | showUnlinkButton () const |
| Determines if the "unlink feature" button should be shown. More... | |
| QgsDualView::ViewMode | viewMode () |
| Gets the view mode for the dual view. More... | |
| QgsAttributeEditorRelation::Buttons | visibleButtons () const |
| Returns the buttons which are shown. More... | |
Public Member Functions inherited from QgsCollapsibleGroupBox | |
| QgsCollapsibleGroupBox (const QString &title, QWidget *parent=nullptr, QgsSettings *settings=nullptr) | |
| QgsCollapsibleGroupBox (QWidget *parent=nullptr, QgsSettings *settings=nullptr) | |
| ~QgsCollapsibleGroupBox () override | |
| bool | saveCheckedState () |
| bool | saveCollapsedState () |
| void | setSaveCheckedState (bool save) |
Set this to true to save/restore checked state. More... | |
| void | setSaveCollapsedState (bool save) |
Sets this to false to not save/restore collapsed state. More... | |
| void | setSettingGroup (const QString &group) |
| Sets this to a defined string to share save/restore states across different parent dialogs. More... | |
| void | setSettings (QgsSettings *settings) |
| QString | settingGroup () const |
| Returns the name of the setting group in which the collapsed state will be saved. More... | |
Public Member Functions inherited from QgsCollapsibleGroupBoxBasic | |
| QgsCollapsibleGroupBoxBasic (const QString &title, QWidget *parent=nullptr) | |
| QgsCollapsibleGroupBoxBasic (QWidget *parent=nullptr) | |
| bool | isCollapsed () const |
| Returns the current collapsed state of this group box. More... | |
| bool | scrollOnExpand () |
If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's contents when expanded. More... | |
| void | setCollapsed (bool collapse) |
| Collapse or uncollapse this groupbox. More... | |
| void | setScrollOnExpand (bool scroll) |
Sets this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded. More... | |
| void | setSyncGroup (const QString &grp) |
| Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key. More... | |
| QString | syncGroup () const |
| Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key. More... | |
Properties | |
| bool | showLabel |
| QgsDualView::ViewMode | viewMode |
| QgsAttributeEditorRelation::Buttons | visibleButtons |
Properties inherited from QgsCollapsibleGroupBox | |
| bool | saveCheckedState |
| Shall the checked state of this group box be saved and loaded persistently in QgsSettings. More... | |
| bool | saveCollapsedState |
| Shall the collapsed state of this group box be saved and loaded persistently in QgsSettings. More... | |
Properties inherited from QgsCollapsibleGroupBoxBasic | |
| bool | collapsed |
| The collapsed state of this group box. More... | |
| bool | scrollOnExpand |
If this property is set to true, a parent scroll area will try to make sure that the whole group box is visible when uncollapsing it. More... | |
| QString | syncGroup |
| An optional group to be collapsed and uncollapsed in sync with this group box if the Alt-modifier is pressed while collapsing / uncollapsing. More... | |
Additional Inherited Members | |
Signals inherited from QgsCollapsibleGroupBoxBasic | |
| void | collapsedStateChanged (bool collapsed) |
| Signal emitted when groupbox collapsed/expanded state is changed, and when first shown. More... | |
Protected Slots inherited from QgsCollapsibleGroupBox | |
| void | loadState () |
| Will load the collapsed and checked state. More... | |
| void | saveState () const |
| Will save the collapsed and checked state. More... | |
Protected Member Functions inherited from QgsCollapsibleGroupBox | |
| void | init () |
| QString | saveKey () const |
| void | showEvent (QShowEvent *event) override |
Protected Member Functions inherited from QgsCollapsibleGroupBoxBasic | |
| void | changeEvent (QEvent *event) override |
| void | clearModifiers () |
| void | collapseExpandFixes () |
| Visual fixes for when group box is collapsed/expanded. More... | |
| void | init () |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | showEvent (QShowEvent *event) override |
| QRect | titleRect () const |
| void | updateStyle () |
Protected Attributes inherited from QgsCollapsibleGroupBox | |
| bool | mDelSettings |
| bool | mSaveCheckedState |
| bool | mSaveCollapsedState |
| QString | mSettingGroup |
| QPointer< QgsSettings > | mSettings |
Protected Attributes inherited from QgsCollapsibleGroupBoxBasic | |
| bool | mAltDown |
| QgsGroupBoxCollapseButton * | mCollapseButton = nullptr |
| bool | mCollapsed |
| QIcon | mCollapseIcon |
| QIcon | mExpandIcon |
| bool | mInitFlat |
| bool | mInitFlatChecked |
| QScrollArea * | mParentScrollArea = nullptr |
| bool | mScrollOnExpand |
| bool | mShiftDown |
| bool | mShown |
| QString | mSyncGroup |
| QWidget * | mSyncParent = nullptr |
| bool | mTitleClicked |
Definition at line 83 of file qgsrelationeditorwidget.h.
| QgsRelationEditorWidget::QgsRelationEditorWidget | ( | QWidget * | parent = nullptr | ) |
| parent | parent widget |
Definition at line 94 of file qgsrelationeditorwidget.cpp.
| QgsAttributeEditorContext QgsRelationEditorWidget::editorContext | ( | ) | const |
Returns the attribute editor context.
Definition at line 380 of file qgsrelationeditorwidget.cpp.
| QgsFeature QgsRelationEditorWidget::feature | ( | ) | const |
Returns the widget's current feature.
Definition at line 1086 of file qgsrelationeditorwidget.cpp.
| QgsIFeatureSelectionManager * QgsRelationEditorWidget::featureSelectionManager | ( | ) |
The feature selection manager is responsible for the selected features which are currently being edited.
Definition at line 385 of file qgsrelationeditorwidget.cpp.
| bool QgsRelationEditorWidget::forceSuppressFormPopup | ( | ) | const |
Determines the force suppress form popup status that is configured for this widget.
Definition at line 985 of file qgsrelationeditorwidget.cpp.
| QString QgsRelationEditorWidget::label | ( | ) | const |
Determines the label of this element.
Definition at line 1000 of file qgsrelationeditorwidget.cpp.
| QVariant QgsRelationEditorWidget::nmRelationId | ( | ) | const |
Determines the relation id of the second relation involved in an N:M relation.
Definition at line 995 of file qgsrelationeditorwidget.cpp.
|
slot |
Called when an attribute value in the parent widget has changed to newValue.
Definition at line 1017 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setEditorContext | ( | const QgsAttributeEditorContext & | context | ) |
Sets the editor context.
Definition at line 367 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setFeature | ( | const QgsFeature & | feature, |
| bool | update = true |
||
| ) |
Sets the feature being edited and updates the UI unless update is set to false.
Definition at line 396 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setForceSuppressFormPopup | ( | bool | forceSuppressFormPopup | ) |
Sets force suppress form popup status with forceSuppressFormPopup configured for this widget.
Definition at line 980 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setLabel | ( | const QString & | label = QString() | ) |
Sets label for this element If it's empty it takes the relation id as label.
Definition at line 1005 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setNmRelationId | ( | const QVariant & | nmRelationId = QVariant() | ) |
Sets nmRelationId for the relation id of the second relation involved in an N:M relation.
If it's empty, then it's considered as a 1:M relationship.
Definition at line 990 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setRelationFeature | ( | const QgsRelation & | relation, |
| const QgsFeature & | feature | ||
| ) |
Sets the relation and the feature.
Definition at line 220 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setRelations | ( | const QgsRelation & | relation, |
| const QgsRelation & | nmrelation | ||
| ) |
Set the relation(s) for this widget If only one relation is set, it will act as a simple 1:N relation widget If both relations are set, it will act as an N:M relation widget inserting and deleting entries on the intermediate table as required.
| relation | Relation referencing the edited table |
| nmrelation | Optional reference from the referencing table to a 3rd N:M table |
Definition at line 297 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setShowLabel | ( | bool | showLabel | ) |
Defines if a title label should be shown for this widget.
Definition at line 1027 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setShowLinkButton | ( | bool | showLinkButton | ) |
Determines if the "link feature" button should be shown.
Definition at line 934 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setShowSaveChildEditsButton | ( | bool | showChildEdits | ) |
Determines if the "Save child layer edits" button should be shown.
Definition at line 944 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setShowUnlinkButton | ( | bool | showUnlinkButton | ) |
Determines if the "unlink feature" button should be shown.
Definition at line 1012 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setViewMode | ( | QgsDualView::ViewMode | mode | ) |
Define the view mode for the dual view.
Definition at line 390 of file qgsrelationeditorwidget.cpp.
| void QgsRelationEditorWidget::setVisibleButtons | ( | const QgsAttributeEditorRelation::Buttons & | buttons | ) |
Defines the buttons which are shown.
Definition at line 954 of file qgsrelationeditorwidget.cpp.
| bool QgsRelationEditorWidget::showLabel | ( | ) | const |
Defines if a title label should be shown for this widget.
Definition at line 1022 of file qgsrelationeditorwidget.cpp.
| bool QgsRelationEditorWidget::showLinkButton | ( | ) | const |
Determines if the "link feature" button should be shown.
Definition at line 929 of file qgsrelationeditorwidget.cpp.
| bool QgsRelationEditorWidget::showSaveChildEditsButton | ( | ) | const |
Determines if the "Save child layer edits" button should be shown.
Definition at line 949 of file qgsrelationeditorwidget.cpp.
| bool QgsRelationEditorWidget::showUnlinkButton | ( | ) | const |
Determines if the "unlink feature" button should be shown.
Definition at line 939 of file qgsrelationeditorwidget.cpp.
|
inline |
Gets the view mode for the dual view.
Definition at line 114 of file qgsrelationeditorwidget.h.
| QgsAttributeEditorRelation::Buttons QgsRelationEditorWidget::visibleButtons | ( | ) | const |
Returns the buttons which are shown.
Definition at line 960 of file qgsrelationeditorwidget.cpp.
|
readwrite |
Definition at line 1 of file qgsrelationeditorwidget.h.
|
readwrite |
Definition at line 1 of file qgsrelationeditorwidget.h.
|
readwrite |
Definition at line 1 of file qgsrelationeditorwidget.h.