Subgroup: Relation

Class: QgsRelationReferenceWidget

class qgis.gui.QgsRelationReferenceWidget(parent: QWidget)

Bases: PyQt5.QtWidgets.QWidget

Methods

acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
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)
autoFillBackground
backgroundRole
baseSize
blockSignals
chainFilters Determines if the filters are chained
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
close
closeEvent
colorCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
create
createWindowContainer
cursor
customEvent
deleteForeignKey unset the currently related feature
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
embedForm determines if the form of the related feature will be shown
ensurePolished
enterEvent
event
eventFilter
find
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
foreignKey returns the related feature foreign key
frameGeometry
frameSize
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse grabMouse(self, Union[QCursor, Qt.CursorShape])
grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
init
initPainter
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapIdentification activate the map tool to select a new related feature on the map
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
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
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
readOnlySelector determines if the foreign key is shown in a combox box or a read-only line edit
receivers
rect
referencedFeature return the related feature (from the referenced layer)
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
repaint repaint(self, int, int, int, int)
resize resize(self, int, int)
resizeEvent
restoreGeometry
saveGeometry
scroll scroll(self, int, int, QRect)
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAllowAddFeatures Determines if a button for adding new features should be shown.
setAllowMapIdentification
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setChainFilters Set if filters are chained.
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCursor
setDisabled
setEditorContext
setEmbedForm
setEnabled
setFilterFields Set the fields for which filter comboboxes will be created
setFixedHeight
setFixedSize setFixedSize(self, int, int)
setFixedWidth
setFocus setFocus(self, Qt.FocusReason)
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setForeignKey this sets the related feature using from the foreign key
setGeometry setGeometry(self, int, int, int, int)
setGraphicsEffect
setHidden
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask setMask(self, QRegion)
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setMouseTracking
setObjectName
setOpenFormButtonVisible
setOrderByValue Set if the widget will order the combobox entries by value
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setProperty
setReadOnlySelector
setRelation
setRelationEditable
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showIndeterminateState Sets the widget to display in an indeterminate “mixed value” state.
showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update update(self, QRect)
updateGeometry
updateMicroFocus
updatesEnabled
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y

Attributes

DrawChildren
DrawWindowBackground
Fixed
IgnoreMask
Pan
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
Scale
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
foreignKeyChanged foreignKeyChanged(self, Any) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
staticMetaObject
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
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

return 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])

Set 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)

Set 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()