Class: QgsLegendPatchShapeButton¶
- class qgis.gui.QgsLegendPatchShapeButton¶
Bases:
PyQt5.QtWidgets.QToolButton
A button for creating and modifying
QgsLegendPatchShape
settings.New in version 3.14.
QgsLegendPatchShapeButton(parent: QWidget = None, dialogTitle: str = ‘’) Construct a new patch shape button with the specified
parent
widget. UsedialogTitle
string to define the title to show in the legend patch shape widget.Methods
- param e:
Returns the title for the symbol settings dialog window.
Returns the message bar associated with the widget.
- rtype:
QSize
- param e:
- param event:
Sets the
title
for the symbol settings dialog window.Sets the message
bar
associated with the widget.Sets the symbol to use for previewing the legend patch shape.
Sets the
shape
for the button.Sets the symbol
type
which the button requires.Resets the shape to the default shape.
Returns the current shape defined by the button.
- param e:
- rtype:
QSize
Returns the symbol type which the button requires.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- actionEvent(self, QActionEvent)¶
- changeEvent(self, e: QEvent)¶
- Parameters:
e (QEvent) –
- changed¶
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
- checkStateSet(self)¶
- childEvent(self, QChildEvent)¶
- closeEvent(self, QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- dialogTitle(self) str ¶
Returns the title for the symbol settings dialog window.
See also
- Return type:
str
- 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)¶
- hitButton(self, QPoint) bool ¶
- initPainter(self, QPainter)¶
- initStyleOption(self, QStyleOptionToolButton)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- messageBar(self) QgsMessageBar ¶
Returns the message bar associated with the widget.
See also
New in version 3.6.
- Return type:
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- minimumSizeHint(self) QSize ¶
- Return type:
QSize
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, e: QMouseEvent)¶
- Parameters:
e (QMouseEvent) –
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- nextCheckState(self)¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- resizeEvent(self, event: QResizeEvent)¶
- Parameters:
event (QResizeEvent) –
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setDialogTitle(self, title: str)¶
Sets the
title
for the symbol settings dialog window.See also
- Parameters:
title (str) –
- setMessageBar(self, bar: QgsMessageBar)¶
Sets the message
bar
associated with the widget. This allows the widget to push feedback messages to the appropriate message bar.See also
New in version 3.6.
- Parameters:
bar (QgsMessageBar) –
- setPreviewSymbol(self, symbol: QgsSymbol)¶
Sets the symbol to use for previewing the legend patch shape.
Ownership is transferred to the button. It is the caller’s responsibility to ensure that the symbol type matches the button’s
symbolType()
- Parameters:
symbol (QgsSymbol) –
- setShape(self, shape: QgsLegendPatchShape)¶
Sets the
shape
for the button.See also
See also
- Parameters:
shape (QgsLegendPatchShape) –
- setSymbolType(self, type: Qgis.SymbolType)¶
Sets the symbol
type
which the button requires. If the type differs from the current symbol type, the symbol will be reset to a default symbol style of the new type.See also
- Parameters:
type (Qgis.SymbolType) –
- setToDefault(self)¶
Resets the shape to the default shape.
- shape(self) QgsLegendPatchShape ¶
Returns the current shape defined by the button.
See also
See also
- Return type:
- showEvent(self, e: QShowEvent)¶
- Parameters:
e (QShowEvent) –
- sizeHint(self) QSize ¶
- Return type:
QSize
- symbolType(self) Qgis.SymbolType ¶
Returns the symbol type which the button requires.
See also
- Return type:
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶