Class: QgsLayoutViewToolAddItem¶
-
class
qgis.gui.
QgsLayoutViewToolAddItem
(view: QgsLayoutView)¶ Bases:
QgsLayoutViewTool
Constructs a
QgsLayoutViewToolAddItem
for the given layoutview
.Layout view tool for adding items to a layout.
New in version 3.0.
- Parameters
view –
-
childEvent
(self, QChildEvent)¶
-
connectNotify
(self, QMetaMethod)¶
-
createdItem
¶ Emitted when an item has been created using the tool. [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 atstartViewPoint
and ended atendViewPoint
should be considered a “click and drag”. IfFalse
is returned, the operation should be instead treated as just a click onstartViewPoint
.
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
itemMetadataId
(self) → int¶ Returns the item metadata id for items created by the tool.
See also
- Return type
int
-
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 fromQgsLayoutItemGuiRegistry
.See also
- Parameters
metadataId (int) –
-
timerEvent
(self, QTimerEvent)¶