Qt 4.8
Public Functions | Properties | List of all members
QSvgViewportFillStyle Class Reference

#include <qsvgstyle_p.h>

Inheritance diagram for QSvgViewportFillStyle:
QSvgStyleProperty QSvgRefCounted

Public Functions

virtual void apply (QPainter *p, const QSvgNode *node, QSvgExtraStates &states)
 
const QBrushqbrush () const
 
 QSvgViewportFillStyle (const QBrush &brush)
 
virtual void revert (QPainter *p, QSvgExtraStates &states)
 
virtual Type type () const
 
- Public Functions inherited from QSvgStyleProperty
virtual ~QSvgStyleProperty ()
 
- Public Functions inherited from QSvgRefCounted
void deref ()
 
 QSvgRefCounted ()
 
void ref ()
 
virtual ~QSvgRefCounted ()
 

Properties

QBrush m_oldFill
 
QBrush m_viewportFill
 

Additional Inherited Members

- Public Types inherited from QSvgStyleProperty
enum  Type {
  QUALITY, FILL, VIEWPORT_FILL, FONT,
  STROKE, SOLID_COLOR, GRADIENT, TRANSFORM,
  ANIMATE_TRANSFORM, ANIMATE_COLOR, OPACITY, COMP_OP
}
 

Detailed Description

Definition at line 305 of file qsvgstyle_p.h.

Constructors and Destructors

◆ QSvgViewportFillStyle()

QSvgViewportFillStyle::QSvgViewportFillStyle ( const QBrush brush)

Definition at line 167 of file qsvgstyle.cpp.

168  : m_viewportFill(brush)
169 {
170 }

Functions

◆ apply()

void QSvgViewportFillStyle::apply ( QPainter p,
const QSvgNode node,
QSvgExtraStates states 
)
virtual

Implements QSvgStyleProperty.

Definition at line 172 of file qsvgstyle.cpp.

173 {
174  m_oldFill = p->brush();
176 }
const QBrush & brush() const
Returns the painter&#39;s current brush.
Definition: qpainter.cpp:4232
void setBrush(const QBrush &brush)
Sets the painter&#39;s brush to the given brush.
Definition: qpainter.cpp:4171

◆ qbrush()

const QBrush& QSvgViewportFillStyle::qbrush ( ) const
inline

Definition at line 313 of file qsvgstyle_p.h.

314  {
315  return m_viewportFill;
316  }

◆ revert()

void QSvgViewportFillStyle::revert ( QPainter p,
QSvgExtraStates states 
)
virtual

Implements QSvgStyleProperty.

Definition at line 178 of file qsvgstyle.cpp.

179 {
180  p->setBrush(m_oldFill);
181 }
void setBrush(const QBrush &brush)
Sets the painter&#39;s brush to the given brush.
Definition: qpainter.cpp:4171

◆ type()

QSvgStyleProperty::Type QSvgViewportFillStyle::type ( ) const
virtual

Implements QSvgStyleProperty.

Definition at line 467 of file qsvgstyle.cpp.

468 {
469  return VIEWPORT_FILL;
470 }

Properties

◆ m_oldFill

QBrush QSvgViewportFillStyle::m_oldFill
private

Definition at line 322 of file qsvgstyle_p.h.

Referenced by apply(), and revert().

◆ m_viewportFill

QBrush QSvgViewportFillStyle::m_viewportFill
private

Definition at line 320 of file qsvgstyle_p.h.

Referenced by apply().


The documentation for this class was generated from the following files: