Class: QgsPreviewEffect

A graphics effect which can be applied to a widget to simulate various printing and color blindness modes.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsPreviewEffect

Base classes

QGraphicsEffect

QObject

Methods

mode

Returns the mode used for the preview effect.

setMode

Sets the mode for the preview effect, which controls how the effect modifies a widgets appearance.

Attributes

PreviewDeuteranope

PreviewGrayscale

PreviewMono

PreviewProtanope

PreviewTritanope

class qgis.gui.QgsPreviewEffect[source]

Bases: QGraphicsEffect

PreviewDeuteranope = 3
PreviewGrayscale = 0
class PreviewMode

Bases: int

PreviewMono = 1
PreviewProtanope = 2
PreviewTritanope = 4
mode(self) QgsPreviewEffect.PreviewMode[source]

Returns the mode used for the preview effect.

Return type:

QgsPreviewEffect.PreviewMode

Returns:

PreviewMode currently used by the effect

See also

setMode()

setMode(self, mode: QgsPreviewEffect.PreviewMode)[source]

Sets the mode for the preview effect, which controls how the effect modifies a widgets appearance.

Parameters:

mode (QgsPreviewEffect.PreviewMode) – PreviewMode to use to draw the widget

See also

mode()