Subgroup: other
Class: QgsActionMenu¶
-
class
qgis.gui.
QgsActionMenu
(layer: QgsVectorLayer, feature: QgsFeature, actionScope: str, parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QMenu
Constructs a new QgsActionMenu
Parameters: - layer – The layer that this action will be run upon.
- feature – The feature that this action will be run upon. Make sure that this feature is available for the lifetime of this object.
- parent – The usual QWidget parent.
- actionScope – The action scope this menu will run in
QgsActionMenu(layer: QgsVectorLayer, fid: int, actionScope: str, parent: QWidget = None) Constructs a new QgsActionMenu
Parameters: - layer – The layer that this action will be run upon.
- fid – The feature id of the feature for which this action will be run.
- parent – The usual QWidget parent.
- actionScope – The action scope this menu will run in
This class is a menu that is populated automatically with the actions defined for a given layer.
Methods
actionEvent
changeEvent
childEvent
closeEvent
columnCount
connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
enterEvent
event
expressionContextScope
Returns an expression context scope used to resolve underlying actions. focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
hideEvent
initPainter
initStyleOption
inputMethodEvent
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
paintEvent
receivers
resizeEvent
sender
senderSignalIndex
setExpressionContextScope
Sets an expression context scope used to resolve underlying actions. setFeature
Change the feature on which actions are performed setMode
Change the mode of the actions sharedPainter
showEvent
tabletEvent
timerEvent
updateMicroFocus
wheelEvent
Signals
reinit
reinit(self) [signal] Attributes
AttributeAction
Invalid
MapLayerAction
-
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.
-
setMode
(self, mode: QgsAttributeForm.Mode)¶ Change the mode of the actions
Parameters: mode – The mode of the attribute form
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶