Class: QgsLayoutItemBaseWidget¶
-
class
qgis.gui.
QgsLayoutItemBaseWidget
(parent: QWidget, layoutObject: QgsLayoutObject)¶ Bases:
QgsPanelWidget
Constructor for
QgsLayoutItemBaseWidget
, linked with the specifiedlayoutObject
.A base class for property widgets for layout items. All layout item widgets should inherit from this base class.
New in version 3.0.
- Parameters
parent (QWidget) –
layoutObject –
-
actionEvent
(self, QActionEvent)¶
-
changeEvent
(self, QEvent)¶
-
childEvent
(self, QChildEvent)¶
-
closeEvent
(self, QCloseEvent)¶
-
connectNotify
(self, QMetaMethod)¶
-
contextMenuEvent
(self, QContextMenuEvent)¶
-
coverageLayer
(self) → QgsVectorLayer¶ Returns the current layout context coverage layer (if set).
- Return type
-
create
(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
-
customEvent
(self, QEvent)¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
dropEvent
(self, QDropEvent)¶
-
enterEvent
(self, QEvent)¶
-
event
(self, QEvent) → bool¶
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPreviousChild
(self) → bool¶
-
hideEvent
(self, QHideEvent)¶
-
initPainter
(self, QPainter)¶
-
inputMethodEvent
(self, QInputMethodEvent)¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
keyPressEvent
(self, event: QKeyEvent)¶ Overridden key press event to handle the esc event on the widget.
- Parameters
event – The key event
-
keyReleaseEvent
(self, QKeyEvent)¶
-
layoutAtlas
(self) → QgsLayoutAtlas¶ Returns the atlas for the layout (if available)
- Return type
-
layoutObject
(self) → QgsLayoutObject¶ Returns the layout object associated with this widget.
- Return type
-
leaveEvent
(self, QEvent)¶
-
metric
(self, QPaintDevice.PaintDeviceMetric) → int¶
-
mouseDoubleClickEvent
(self, QMouseEvent)¶
-
mouseMoveEvent
(self, QMouseEvent)¶
-
mousePressEvent
(self, QMouseEvent)¶
-
mouseReleaseEvent
(self, QMouseEvent)¶
-
moveEvent
(self, QMoveEvent)¶
-
nativeEvent
(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
-
paintEvent
(self, QPaintEvent)¶
-
receivers
(self, PYQT_SIGNAL) → int¶
-
registerDataDefinedButton
(self, button: QgsPropertyOverrideButton, property: QgsLayoutObject.DataDefinedProperty)¶ Registers a data defined
button
, setting up its initial value, connections and description. The corresponding propertykey
must be specified.- Parameters
button (QgsPropertyOverrideButton) –
property (QgsLayoutObject.DataDefinedProperty) –
-
resizeEvent
(self, QResizeEvent)¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setDesignerInterface
(self, iface: QgsLayoutDesignerInterface)¶ Sets the the layout designer interface in which the widget is being shown.
New in version 3.6.
- Parameters
iface (QgsLayoutDesignerInterface) –
-
setItem
(self, item: QgsLayoutItem) → bool¶ Sets the current
item
to show in the widget. IfTrue
is returned,item
was an acceptable type for display in this widget and the widget has been updated to matchitem
’s properties.If
False
is returned, then the widget could not be successfully updated to show the properties ofitem
.- Parameters
item (QgsLayoutItem) –
- Return type
bool
-
setMasterLayout
(self, masterLayout: QgsMasterLayoutInterface)¶ Sets the master layout associated with the item.
New in version 3.10.
- Parameters
masterLayout (QgsMasterLayoutInterface) –
-
setNewItem
(self, item: QgsLayoutItem) → bool¶ Attempts to update the widget to show the properties for the specified
item
.Subclasses can override this if they support changing items in place.
Implementations must return
True
if the item was accepted and the widget was updated.- Parameters
item (QgsLayoutItem) –
- Return type
bool
-
setReportTypeString
(self, string: str)¶ Sets the
string
to use to describe the current report type (e.g. “atlas” or “report”). Subclasses which display this text to users should override this and update their widget labels accordingly.- Parameters
string (str) –
-
showEvent
(self, QShowEvent)¶
-
tabletEvent
(self, QTabletEvent)¶
-
timerEvent
(self, QTimerEvent)¶
-
updateDataDefinedButton
(self, button: QgsPropertyOverrideButton)¶ Updates a previously registered data defined button to reflect the item’s current properties.
- Parameters
button (QgsPropertyOverrideButton) –
-
updateMicroFocus
(self)¶
-
wheelEvent
(self, QWheelEvent)¶