Class: QgsRelationReferenceWidget

class qgis.gui.QgsRelationReferenceWidget(parent: QWidget)

Bases: PyQt5.QtWidgets.QWidget

Enums

Methods

actionEvent
allowAddFeatures Determines if a button for adding new features should be shown.
allowMapIdentification determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)
chainFilters Determines if the filters are chained
changeEvent
childEvent
closeEvent
connectNotify
contextMenuEvent
create
customEvent
deleteForeignKey unset the currently related feature
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
embedForm determines if the form of the related feature will be shown
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
foreignKey returns the related feature foreign key
hideEvent
init
initPainter
inputMethodEvent
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
mapIdentification activate the map tool to select a new related feature on the map
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
openForm open the form of the related feature in a new dialog
openFormButtonVisible determines the open form button is visible in the widget
orderByValue If the widget will order the combobox entries by value
paintEvent
readOnlySelector determines if the foreign key is shown in a combox box or a read-only line edit
receivers
referencedFeature Returns the related feature (from the referenced layer) if no feature is related, it returns an invalid feature
resizeEvent
sender
senderSignalIndex
setAllowAddFeatures Determines if a button for adding new features should be shown.
setAllowMapIdentification
setChainFilters Set if filters are chained.
setEditorContext
setEmbedForm
setFilterFields Sets the fields for which filter comboboxes will be created
setForeignKey this sets the related feature using from the foreign key
setOpenFormButtonVisible
setOrderByValue Sets if the widget will order the combobox entries by value
setReadOnlySelector
setRelation
setRelationEditable
sharedPainter
showEvent
showIndeterminateState Sets the widget to display in an indeterminate “mixed value” state.
tabletEvent
timerEvent
updateMicroFocus
wheelEvent

Signals

foreignKeyChanged foreignKeyChanged(self, Any) [signal]

Attributes

Fixed
Pan
Scale
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)
sharedPainter()
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()