Class: QgsPreviewEffect¶
-
class
qgis.gui.
QgsPreviewEffect
¶ Bases:
PyQt5.QtWidgets.QGraphicsEffect
A graphics effect which can be applied to a widget to simulate various printing and color blindness modes.
Methods
- param painter
Returns the mode used for the preview effect.
Sets the mode for the preview effect, which controls how the effect modifies a widgets appearance.
Attributes
-
PreviewDeuteranope
= 3¶
-
PreviewGrayscale
= 0¶
-
class
PreviewMode
¶ Bases:
int
-
PreviewMono
= 1¶
-
PreviewProtanope
= 2¶
-
childEvent
(self, QChildEvent)¶
-
connectNotify
(self, QMetaMethod)¶
-
customEvent
(self, QEvent)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
draw
(self, painter: QPainter)¶ - Parameters
painter (QPainter) –
-
drawSource
(self, QPainter)¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
mode
(self) → QgsPreviewEffect.PreviewMode¶ Returns the mode used for the preview effect.
- Return type
- Returns
PreviewMode currently used by the effect
See also
New in version 2.3.
-
receivers
(self, PYQT_SIGNAL) → int¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setMode
(self, mode: QgsPreviewEffect.PreviewMode)¶ 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
New in version 2.3.
-
sourceBoundingRect
(self, system: Qt.CoordinateSystem = Qt.LogicalCoordinates) → QRectF¶
-
sourceChanged
(self, Union[QGraphicsEffect.ChangeFlags, QGraphicsEffect.ChangeFlag])¶
-
sourceIsPixmap
(self) → bool¶
-
sourcePixmap
(self, system: Qt.CoordinateSystem = Qt.LogicalCoordinates, mode: QGraphicsEffect.PixmapPadMode = QGraphicsEffect.PadToEffectiveBoundingRect) → Tuple[QPixmap, QPoint]¶
-
timerEvent
(self, QTimerEvent)¶
-
updateBoundingRect
(self)¶