Subgroup: other

Class: QgsActionMenu

class qgis.gui.QgsActionMenu

Bases: PyQt5.QtWidgets.QMenu

This class is a menu that is populated automatically with the actions defined for a given layer.

Methods

acceptDrops
accessibleDescription
accessibleName
actionAt
actionEvent
actionGeometry
actions
activateWindow
activeAction
addAction addAction(self, str) -> QAction
addActions
addMenu addMenu(self, str) -> QMenu
addSection addSection(self, QIcon, str) -> QAction
addSeparator
adjustSize
autoFillBackground
backgroundRole
baseSize
blockSignals
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clear
clearFocus
clearMask
close
closeEvent
colorCount
columnCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
create
createWindowContainer
cursor
customEvent
defaultAction
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
exec exec(self, QPoint, action: QAction = None) -> QAction
exec_ exec_(self, QPoint, action: QAction = None) -> QAction
expressionContextScope Returns an expression context scope used to resolve underlying actions.
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
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
hideTearOffMenu
icon
inherits
initPainter
initStyleOption
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
insertMenu
insertSection insertSection(self, QAction, QIcon, str) -> QAction
insertSeparator
installEventFilter
isActiveWindow
isAncestorOf
isEmpty
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isTearOffEnabled
isTearOffMenuVisible
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
menuAction
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
popup
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
receivers
rect
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
separatorsCollapsible
setAcceptDrops
setAccessibleDescription
setAccessibleName
setActiveAction
setAsDockMenu
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCursor
setDefaultAction
setDisabled
setEnabled
setExpressionContextScope Sets an expression context scope used to resolve underlying actions.
setFeature Change the feature on which actions are performed
setFixedHeight
setFixedSize setFixedSize(self, int, int)
setFixedWidth
setFocus setFocus(self, Qt.FocusReason)
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry setGeometry(self, int, int, int, int)
setGraphicsEffect
setHidden
setIcon
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask setMask(self, QRegion)
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setMouseTracking
setNoReplayFor
setObjectName
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setProperty
setSeparatorsCollapsible
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setTearOffEnabled
setTitle
setToolTip
setToolTipDuration
setToolTipsVisible
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
showTearOffMenu showTearOffMenu(self, QPoint)
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
title
toolTip
toolTipDuration
toolTipsVisible
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

AttributeAction
DrawChildren
DrawWindowBackground
IgnoreMask
Invalid
MapLayerAction
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
aboutToHide aboutToHide(self) [signal]
aboutToShow aboutToShow(self) [signal]
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
hovered hovered(self, QAction) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
reinit reinit(self) [signal]
staticMetaObject
triggered triggered(self, QAction) [signal]
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
class ActionData

Bases: sip.wrapper

Constructor for ActionData.

QgsActionMenu.ActionData(action: QgsAction, featureId: int, mapLayer: QgsMapLayer)

QgsActionMenu.ActionData(action: QgsMapLayerAction, featureId: int, mapLayer: QgsMapLayer)

QgsActionMenu.ActionData(QgsActionMenu.ActionData)

actionData
actionType
featureId
mapLayer
class ActionType

Bases: int

AttributeAction = 2
Invalid = 0
MapLayerAction = 1
actionEvent()
changeEvent()
childEvent()
closeEvent()
columnCount()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
expressionContextScope(self) → QgsExpressionContextScope

Returns an expression context scope used to resolve underlying actions.

New in version 3.0.

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
initStyleOption()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
reinit

reinit(self) [signal]

resizeEvent()
sender()
senderSignalIndex()
setExpressionContextScope(self, scope: QgsExpressionContextScope)

Sets an expression context scope used to resolve underlying actions.

New in version 3.0.

setFeature(self, feature: QgsFeature)

Change the feature on which actions are performed

Parameters:feature – A feature. Will not take ownership. It’s the callers responsibility to keep the feature

as long as the menu is displayed and the action is running.

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()