Class: QgsLayoutItemBaseWidget¶
-
class
qgis.gui.
QgsLayoutItemBaseWidget
(parent: QWidget, layoutObject: QgsLayoutObject)¶ Bases:
qgis._gui.QgsPanelWidget
Constructor for QgsLayoutItemBaseWidget, linked with the specified
layoutObject
.A base class for property widgets for layout items. All layout item widgets should inherit from this base class.
New in version 3.0: Enums
Methods
Returns the current layout context coverage layer (if set).
Returns the atlas for the layout (if available)
Returns the layout object associated with this widget.
Registers a data defined
button
, setting up its initial value, connections and description.Sets the the layout designer interface in which the widget is being shown.
Sets the current
item
to show in the widget.Attempts to update the widget to show the properties for the specified
item
.Sets the
string
to use to describe the current report type (e.g.Updates a previously registered data defined button to reflect the item’s current properties.
Signals
Attributes
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
coverageLayer
(self) → QgsVectorLayer¶ Returns the current layout context coverage layer (if set).
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
layoutAtlas
(self) → QgsLayoutAtlas¶ Returns the atlas for the layout (if available)
-
layoutObject
(self) → QgsLayoutObject¶ Returns the layout object associated with this widget.
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
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.
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setDesignerInterface
(self, iface: QgsLayoutDesignerInterface)¶ Sets the the layout designer interface in which the widget is being shown.
New in version 3.6.
-
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
.
-
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.
-
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.
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateDataDefinedButton
(self, button: QgsPropertyOverrideButton)¶ Updates a previously registered data defined button to reflect the item’s current properties.
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-