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

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

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
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)
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], PyQt5.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

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
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)