Class: QgsLayoutViewToolAddNodeItem

class qgis.gui.QgsLayoutViewToolAddNodeItem

Bases: QgsLayoutViewTool

Layout view tool for adding node based items to a layout.

New in version 3.0.

QgsLayoutViewToolAddNodeItem(view: QgsLayoutView) Constructs a QgsLayoutViewToolAddNodeItem for the given layout view.

Methods

childEvent

connectNotify

customEvent

deactivate

disconnectNotify

isClickAndDrag

Returns True if a mouse press/release operation which started at startViewPoint and ended at endViewPoint should be considered a "click and drag".

isSignalConnected

itemMetadataId

Returns the item metadata id for items created by the tool.

keyPressEvent

param event

layoutMoveEvent

param event

layoutPressEvent

param event

layoutReleaseEvent

param event

receivers

sender

senderSignalIndex

setFlags

Sets the combination of flags that will be used for the tool.

setItemMetadataId

Sets the item metadata metadataId for items created by the tool.

timerEvent

Signals

createdItem

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
createdItem

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

customEvent(self, QEvent)
deactivate(self)
disconnectNotify(self, QMetaMethod)
isClickAndDrag(self, startViewPoint: QPoint, endViewPoint: QPoint) bool

Returns True if a mouse press/release operation which started at startViewPoint and ended at endViewPoint should be considered a “click and drag”. If False is returned, the operation should be instead treated as just a click on startViewPoint.

isSignalConnected(self, QMetaMethod) bool
itemMetadataId(self) int

Returns the item metadata id for items created by the tool.

Return type

int

keyPressEvent(self, event: QKeyEvent)
Parameters

event (QKeyEvent) –

layoutMoveEvent(self, event: QgsLayoutViewMouseEvent)
Parameters

event (QgsLayoutViewMouseEvent) –

layoutPressEvent(self, event: QgsLayoutViewMouseEvent)
Parameters

event (QgsLayoutViewMouseEvent) –

layoutReleaseEvent(self, event: QgsLayoutViewMouseEvent)
Parameters

event (QgsLayoutViewMouseEvent) –

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
setFlags(self, flags: Union[QgsLayoutViewTool.Flags, QgsLayoutViewTool.Flag])

Sets the combination of flags that will be used for the tool.

See also

flags()

setItemMetadataId(self, metadataId: int)

Sets the item metadata metadataId for items created by the tool.

The metadataId associates the current tool behavior with a metadata entry from QgsLayoutItemGuiRegistry.

See also

itemMetadataId()

Parameters

metadataId (int) –

timerEvent(self, QTimerEvent)