Class: QgsFieldConditionalFormatWidget

class qgis.gui.QgsFieldConditionalFormatWidget

Bases: QgsPanelWidget

A widget for customizing conditional formatting options.

QgsFieldConditionalFormatWidget(parent: Optional[QWidget] = None) Constructor for QgsFieldConditionalFormatWidget.

Methods

actionEvent

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

defaultPresets

Returns a list of the default presets.

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

editStyle

Switches the widget to the edit style mode for the specified style, where index is the index of the conditional style to edit and style is the initial definition of the style.

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

Overridden key press event to handle the esc event on the widget.

keyReleaseEvent

leaveEvent

loadStyle

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

reset

Resets the formatting options to their default state.

resizeEvent

sender

senderSignalIndex

setLayer

Sets the vector layer associated with the widget.

setPresets

Sets the preset styles that can be used for quick pick.

sharedPainter

showEvent

tabletEvent

timerEvent

updateMicroFocus

viewRules

Switches the widget to the rules page.

wheelEvent

Signals

rulesUpdated

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

actionEvent(self, a0: QActionEvent | None)
changeEvent(self, a0: QEvent | None)
childEvent(self, a0: QChildEvent | None)
closeEvent(self, a0: QCloseEvent | None)
connectNotify(self, signal: QMetaMethod)
contextMenuEvent(self, a0: QContextMenuEvent | None)
create(self, window: PyQt5.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, a0: QEvent | None)
defaultPresets() List[QgsConditionalStyle]

Returns a list of the default presets. Normally used when the widget is created, however calling setPresets() will override the default styles.

Return type:

List[QgsConditionalStyle]

destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, a0: QDragEnterEvent | None)
dragLeaveEvent(self, a0: QDragLeaveEvent | None)
dragMoveEvent(self, a0: QDragMoveEvent | None)
dropEvent(self, a0: QDropEvent | None)
editStyle(self, index: int, style: QgsConditionalStyle)

Switches the widget to the edit style mode for the specified style, where index is the index of the conditional style to edit and style is the initial definition of the style.

Parameters:
enterEvent(self, a0: QEvent | None)
event(self, a0: QEvent | None) bool
focusInEvent(self, a0: QFocusEvent | None)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: QFocusEvent | None)
focusPreviousChild(self) bool
hideEvent(self, a0: QHideEvent | None)
initPainter(self, painter: QPainter | None)
inputMethodEvent(self, a0: QInputMethodEvent | None)
isSignalConnected(self, signal: QMetaMethod) bool
keyPressEvent(self, event: QKeyEvent | None)

Overridden key press event to handle the esc event on the widget.

Parameters:

event – The key event

keyReleaseEvent(self, a0: QKeyEvent | None)
leaveEvent(self, a0: QEvent | None)
loadStyle(self, style: QgsConditionalStyle)

Deprecated since version no: longer used, use QgsEditConditionalFormatRuleWidget.loadStyle instead.

Parameters:

style (QgsConditionalStyle)

metric(self, a0: QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, a0: QMouseEvent | None)
mouseMoveEvent(self, a0: QMouseEvent | None)
mousePressEvent(self, a0: QMouseEvent | None)
mouseReleaseEvent(self, a0: QMouseEvent | None)
moveEvent(self, a0: QMoveEvent | None)
nativeEvent(self, eventType: QByteArray | bytes | bytearray, message: PyQt5.sip.voidptr | None)
paintEvent(self, a0: QPaintEvent | None)
receivers(self, signal: PYQT_SIGNAL) int
reset(self)

Resets the formatting options to their default state.

Deprecated since version no: longer used, will be removed in QGIS 4.0

resizeEvent(self, a0: QResizeEvent | None)
rulesUpdated

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

sender(self) QObject | None
senderSignalIndex(self) int
setLayer(self, layer: QgsVectorLayer | None)

Sets the vector layer associated with the widget.

Parameters:

layer (Optional[QgsVectorLayer])

setPresets(self, styles: Iterable[QgsConditionalStyle])

Sets the preset styles that can be used for quick pick.

Parameters:

styles (Iterable[QgsConditionalStyle])

sharedPainter(self) QPainter | None
showEvent(self, a0: QShowEvent | None)
tabletEvent(self, a0: QTabletEvent | None)
timerEvent(self, a0: QTimerEvent | None)
updateMicroFocus(self)
viewRules(self)

Switches the widget to the rules page.

Deprecated since version no: longer used, will be removed in QGIS 4.0

wheelEvent(self, a0: QWheelEvent | None)