#include <qpaintengine.h>
Inheritance diagram for QPaintEngineState:

Which properties that have changed can at any time be retrieved using the state() function. This function returns an instance of the QPaintEngine::DirtyFlags type which stores an OR combination of QPaintEngine::DirtyFlag values. The QPaintEngine::DirtyFlag enum defines whether a property has changed since the last update or not.
If a property is marked with a dirty flag, its current value can be retrieved using the corresponding get function:
GetFunction
Property Flag Current Property Value QPaintEngine::DirtyBackground backgroundBrush() QPaintEngine::DirtyBackgroundMode backgroundMode() QPaintEngine::DirtyBrush brush() QPaintEngine::DirtyBrushOrigin brushOrigin() QPaintEngine::DirtyClipRegion or QPaintEngine::DirtyClipPath clipOperation() QPaintEngine::DirtyClipPath clipPath() QPaintEngine::DirtyClipRegion clipRegion() QPaintEngine::DirtyCompositionMode compositionMode() QPaintEngine::DirtyFont font() QPaintEngine::DirtyTransform matrix() QPaintEngine::DirtyClipEnabled isClipEnabled() QPaintEngine::DirtyPen pen() QPaintEngine::DirtyHints renderHints()
The QPaintEngineState class also provide the painter() function which returns a pointer to the painter that is currently updating the paint engine.
An instance of this class, representing the current state of the active paint engine, is passed as argument to the QPaintEngine::updateState() function. The only situation in which you will have to use this class directly is when implementing your own paint engine.
Definition at line 245 of file qpaintengine.h.
Public Member Functions | |
| QPaintEngine::DirtyFlags | state () const |
| QPen | pen () const |
| QBrush | brush () const |
| QPointF | brushOrigin () const |
| QBrush | backgroundBrush () const |
| Qt::BGMode | backgroundMode () const |
| QFont | font () const |
| QMatrix | matrix () const |
| Qt::ClipOperation | clipOperation () const |
| QRegion | clipRegion () const |
| QPainterPath | clipPath () const |
| bool | isClipEnabled () const |
| QPainter::RenderHints | renderHints () const |
| QPainter::CompositionMode | compositionMode () const |
| qreal | opacity () const |
| QPainter * | painter () const |
Protected Attributes | |
| QPaintEngine::DirtyFlags | dirtyFlags |
Friends | |
| class | QPaintEngine |
| class | QPainter |
| class | QPainterPrivate |
| QPaintEngine::DirtyFlags QPaintEngineState::state | ( | ) | const [inline] |
Returns a combination of flags identifying the set of properties that need to be updated when updating the paint engine's state (i.e. during a call to the QPaintEngine::updateState() function).
Definition at line 248 of file qpaintengine.h.
Referenced by QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), QPicturePaintEngine::updateState(), and QPainterPrivate::updateState().
00248 { return dirtyFlags; }
| QPen QPaintEngineState::pen | ( | ) | const |
Returns the pen in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyPen flag.
Definition at line 6515 of file qpainter.cpp.
Referenced by QPaintEngine::drawTextItem(), QPainterState::init(), QPainterState::QPainterState(), QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06516 { 06517 return static_cast<const QPainterState *>(this)->pen; 06518 }
| QBrush QPaintEngineState::brush | ( | ) | const |
Returns the brush in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrush flag.
Definition at line 6529 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06530 { 06531 return static_cast<const QPainterState *>(this)->brush; 06532 }
| QPointF QPaintEngineState::brushOrigin | ( | ) | const |
Returns the brush origin in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrushOrigin flag.
Definition at line 6543 of file qpainter.cpp.
Referenced by QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
| QBrush QPaintEngineState::backgroundBrush | ( | ) | const |
Returns the background brush in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackground flag.
Definition at line 6557 of file qpainter.cpp.
Referenced by Q3SVGPaintEngine::updateState(), and QPicturePaintEngine::updateState().
| Qt::BGMode QPaintEngineState::backgroundMode | ( | ) | const |
Returns the background mode in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackgroundMode flag.
Definition at line 6572 of file qpainter.cpp.
Referenced by Q3SVGPaintEngine::updateState(), and QPicturePaintEngine::updateState().
| QFont QPaintEngineState::font | ( | ) | const |
Returns the font in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyFont flag.
Definition at line 6587 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06588 { 06589 return static_cast<const QPainterState *>(this)->font; 06590 }
| QMatrix QPaintEngineState::matrix | ( | ) | const |
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag.
Definition at line 6604 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06605 { 06606 return static_cast<const QPainterState *>(this)->matrix; 06607 }
| Qt::ClipOperation QPaintEngineState::clipOperation | ( | ) | const |
Returns the clip operation in the current paint engine state.
This variable should only be used when the state() returns a combination which includes either the QPaintEngine::DirtyClipPath or the QPaintEngine::DirtyClipRegion flag.
Definition at line 6620 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06621 { 06622 return static_cast<const QPainterState *>(this)->clipOperation; 06623 }
| QRegion QPaintEngineState::clipRegion | ( | ) | const |
Returns the clip region in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipRegion flag.
Definition at line 6634 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06635 { 06636 return static_cast<const QPainterState *>(this)->clipRegion; 06637 }
| QPainterPath QPaintEngineState::clipPath | ( | ) | const |
Returns the clip path in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipPath flag.
Definition at line 6648 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), Q3SVGPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06649 { 06650 return static_cast<const QPainterState *>(this)->clipPath; 06651 }
| bool QPaintEngineState::isClipEnabled | ( | ) | const |
Returns wether clipping is enabled or not in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipEnabled flag.
Definition at line 6664 of file qpainter.cpp.
Referenced by QPdfBaseEngine::updateState(), QRasterPaintEngine::updateState(), and QX11PaintEngine::updateState().
| QPainter::RenderHints QPaintEngineState::renderHints | ( | ) | const |
Returns the render hints in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyHints flag.
Definition at line 6679 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QRasterPaintEngine::updateState(), QX11PaintEngine::updateState(), and QPicturePaintEngine::updateState().
06680 { 06681 return static_cast<const QPainterState *>(this)->renderHints; 06682 }
| QPainter::CompositionMode QPaintEngineState::compositionMode | ( | ) | const |
Returns the composition mode in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyCompositionMode flag.
Definition at line 6694 of file qpainter.cpp.
Referenced by QRasterPaintEngine::updateState(), and QX11PaintEngine::updateState().
| qreal QPaintEngineState::opacity | ( | ) | const |
Definition at line 6717 of file qpainter.cpp.
Referenced by QPainterState::init(), QPainterState::QPainterState(), QRasterPaintEngine::updateState(), and QX11PaintEngine::updateState().
06718 { 06719 return static_cast<const QPainterState *>(this)->opacity; 06720 }
| QPainter * QPaintEngineState::painter | ( | ) | const |
Returns a pointer to the painter currently updating the paint engine.
Definition at line 6705 of file qpainter.cpp.
Referenced by QPainterState::init(), QPaintEngine::painter(), QPainterState::QPainterState(), and QPainterPrivate::updateState().
06706 { 06707 return static_cast<const QPainterState *>(this)->painter; 06708 }
friend class QPaintEngine [friend] |
Definition at line 270 of file qpaintengine.h.
friend class QPainter [friend] |
Definition at line 271 of file qpaintengine.h.
friend class QPainterPrivate [friend] |
Definition at line 272 of file qpaintengine.h.
QPaintEngine::DirtyFlags QPaintEngineState::dirtyFlags [protected] |
Definition at line 274 of file qpaintengine.h.
Referenced by QPaintEngine::clearDirty(), QPainterState::init(), QPainterState::QPainterState(), QPainter::restore(), QPaintEngine::setDirty(), QPaintEngine::testDirty(), QPainterPrivate::updateMatrix(), and QPainterPrivate::updateState().
1.5.1