Class: QgsFieldConditionalFormatWidget

class qgis.gui.QgsFieldConditionalFormatWidget

Bases: QgsPanelWidget

A widget for customizing conditional formatting options.

New in version 2.12.

QgsFieldConditionalFormatWidget(parent: 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

Emitted when the conditional styling rules are updated.

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
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, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
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, 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)
leaveEvent(self, QEvent)
loadStyle(self, style: QgsConditionalStyle)

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

Parameters

style (QgsConditionalStyle) –

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
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, QResizeEvent)
rulesUpdated

Emitted when the conditional styling rules are updated.

The fieldName argument indicates the name of the field whose rules have been modified, or an empty fieldName indicates that a row-based rule was updated. [signal]

Parameters

fieldName (str) –

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

Sets the vector layer associated with the widget.

Parameters

layer (QgsVectorLayer) –

setPresets(self, styles: Iterable[QgsConditionalStyle])

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

Parameters

styles (Iterable[QgsConditionalStyle]) –

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
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, QWheelEvent)