Class: QgsRelationReferenceWidget¶
-
class
qgis.gui.
QgsRelationReferenceWidget
(parent: QWidget)¶ Bases:
PyQt5.QtWidgets.QWidget
Enums
Methods
Determines if a button for adding new features should be shown.
determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)
Determines if the filters are chained
unset the currently related feature
determines if the form of the related feature will be shown
returns the related feature foreign key
activate the map tool to select a new related feature on the map
open the form of the related feature in a new dialog
determines the open form button is visible in the widget
If the widget will order the combobox entries by value
determines if the foreign key is shown in a combox box or a read-only line edit
Returns the related feature (from the referenced layer) if no feature is related, it returns an invalid feature
Determines if a button for adding new features should be shown.
Set if filters are chained.
Sets the fields for which filter comboboxes will be created
this sets the related feature using from the foreign key
Sets if the widget will order the combobox entries by value
Sets the widget to display in an indeterminate “mixed value” state.
Signals
foreignKeyChanged(self, Any) [signal]
Attributes
-
class
CanvasExtent
¶ Bases:
int
-
Fixed
= 0¶
-
Pan
= 1¶
-
Scale
= 2¶
-
actionEvent
()¶
-
allowAddFeatures
(self) → bool¶ Determines if a button for adding new features should be shown.
New in version 2.16.
-
allowMapIdentification
(self) → bool¶ determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)
-
chainFilters
(self) → bool¶ Determines if the filters are chained
- Returns
True if filters are chained
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
deleteForeignKey
(self)¶ unset the currently related feature
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
embedForm
(self) → bool¶ determines if the form of the related feature will be shown
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
foreignKey
(self) → Any¶ returns the related feature foreign key
-
foreignKeyChanged
¶ foreignKeyChanged(self, Any) [signal]
-
hideEvent
()¶
-
init
(self)¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
mapIdentification
(self)¶ activate the map tool to select a new related feature on the map
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
openForm
(self)¶ open the form of the related feature in a new dialog
-
openFormButtonVisible
(self) → bool¶ determines the open form button is visible in the widget
-
orderByValue
(self) → bool¶ If the widget will order the combobox entries by value
-
paintEvent
()¶
-
readOnlySelector
(self) → bool¶ determines if the foreign key is shown in a combox box or a read-only line edit
-
receivers
()¶
-
referencedFeature
(self) → QgsFeature¶ Returns the related feature (from the referenced layer) if no feature is related, it returns an invalid feature
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAllowAddFeatures
(self, allowAddFeatures: bool)¶ Determines if a button for adding new features should be shown.
New in version 2.16.
-
setAllowMapIdentification
(self, allowMapIdentification: bool)¶
-
setChainFilters
(self, chainFilters: bool)¶ Set if filters are chained. Chained filters restrict the option of subsequent filters based on the selection of a previous filter.
- Parameters
chainFilters – If chaining should be enabled
-
setEditorContext
(self, context: QgsAttributeEditorContext, canvas: QgsMapCanvas, messageBar: QgsMessageBar)¶
-
setEmbedForm
(self, display: bool)¶
-
setFilterFields
(self, filterFields: Iterable[str])¶ Sets the fields for which filter comboboxes will be created
-
setForeignKey
(self, value: Any)¶ this sets the related feature using from the foreign key
-
setOpenFormButtonVisible
(self, openFormButtonVisible: bool)¶
-
setOrderByValue
(self, orderByValue: bool)¶ Sets if the widget will order the combobox entries by value
-
setReadOnlySelector
(self, readOnly: bool)¶
-
setRelation
(self, relation: QgsRelation, allowNullValue: bool)¶
-
setRelationEditable
(self, editable: bool)¶
-
showEvent
(self, e: QShowEvent)¶
-
showIndeterminateState
(self)¶ Sets the widget to display in an indeterminate “mixed value” state.
New in version 2.16.
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
class