QBrush Class Reference

QBrush Class Reference

#include <qbrush.h>

Class Description

Definition at line 76 of file qbrush.h.

Public Types

typedef QScopedPointer< QBrushData, QBrushDataPointerDeleter > DataPtr
 

Public Member Functions

 QBrush ()
 
 QBrush (Qt::BrushStyle bs)
 
 QBrush (const QColor &color, Qt::BrushStyle bs=Qt::SolidPattern)
 
 QBrush (Qt::GlobalColor color, Qt::BrushStyle bs=Qt::SolidPattern)
 
 QBrush (const QColor &color, const QPixmap &pixmap)
 
 QBrush (Qt::GlobalColor color, const QPixmap &pixmap)
 
 QBrush (const QPixmap &pixmap)
 
 QBrush (const QImage &image)
 
 QBrush (const QBrush &brush)
 
 QBrush (const QGradient &gradient)
 
 ~QBrush ()
 
QBrushoperator= (const QBrush &brush)
 
void swap (QBrush &other)
 
 operator QVariant () const
 
Qt::BrushStyle style () const
 
void setStyle (Qt::BrushStyle)
 
const QMatrixmatrix () const
 
void setMatrix (const QMatrix &mat)
 
QTransform transform () const
 
void setTransform (const QTransform &)
 
QPixmap texture () const
 
void setTexture (const QPixmap &pixmap)
 
QImage textureImage () const
 
void setTextureImage (const QImage &image)
 
const QColorcolor () const
 
void setColor (const QColor &color)
 
void setColor (Qt::GlobalColor color)
 
const QGradientgradient () const
 
bool isOpaque () const
 
bool operator== (const QBrush &b) const
 
bool operator!= (const QBrush &b) const
 
bool isDetached () const
 
DataPtrdata_ptr ()
 

Friends

class QX11PaintEngine
 
class QRasterPaintEngine
 
class QRasterPaintEnginePrivate
 
struct QSpanData
 
class QPainter
 
bool Q_GUI_EXPORT qHasPixmapTexture (const QBrush &brush)
 

Member Typedef Documentation

typedef QScopedPointer<QBrushData, QBrushDataPointerDeleter> DataPtr

Definition at line 151 of file qbrush.h.

Constructor & Destructor Documentation

QBrush ( )
QBrush ( const QColor color,
Qt::BrushStyle  bs = Qt::SolidPattern 
)
QBrush ( const QColor color,
const QPixmap pixmap 
)
QBrush ( Qt::GlobalColor  color,
const QPixmap pixmap 
)
QBrush ( const QPixmap pixmap)
QBrush ( const QImage image)
QBrush ( const QBrush brush)
QBrush ( const QGradient gradient)
~QBrush ( )

Member Function Documentation

QBrush& operator= ( const QBrush brush)
void swap ( QBrush other)
inline

Definition at line 99 of file qbrush.h.

99 { qSwap(d, other.d); }
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
operator QVariant ( ) const
Qt::BrushStyle style ( ) const
inline

Definition at line 182 of file qbrush.h.

182 { return d->style; }
Qt::BrushStyle style
Definition: qbrush.h:177
void setStyle ( Qt::BrushStyle  )
const QMatrix & matrix ( ) const
inline

Definition at line 184 of file qbrush.h.

184 { return d->transform.toAffine(); }
const QMatrix & toAffine() const
QTransform transform
Definition: qbrush.h:179
void setMatrix ( const QMatrix mat)
QTransform transform ( ) const
inline

Definition at line 185 of file qbrush.h.

185 { return d->transform; }
QTransform transform
Definition: qbrush.h:179
void setTransform ( const QTransform )
QPixmap texture ( ) const
void setTexture ( const QPixmap pixmap)
QImage textureImage ( ) const
void setTextureImage ( const QImage image)
const QColor & color ( ) const
inline

Definition at line 183 of file qbrush.h.

183 { return d->color; }
QColor color
Definition: qbrush.h:178
void setColor ( const QColor color)
void setColor ( Qt::GlobalColor  color)
inline

Definition at line 155 of file qbrush.h.

156 { setColor(QColor(acolor)); }
void setColor(const QColor &color)
Definition: qcolor.h:67
AttributeInstance< Color > acolor
Definition: math.h:806
const QGradient* gradient ( ) const
bool isOpaque ( ) const
bool operator== ( const QBrush b) const
bool operator!= ( const QBrush b) const
inline

Definition at line 127 of file qbrush.h.

127 { return !(operator==(b)); }
bool operator==(const QBrush &b) const
bool isDetached ( ) const
inline

Definition at line 186 of file qbrush.h.

186 { return d->ref == 1; }
QAtomicInt ref
Definition: qbrush.h:176
DataPtr& data_ptr ( )
inline

Definition at line 152 of file qbrush.h.

152 { return d; }

Friends And Related Function Documentation

friend class QX11PaintEngine
friend

Definition at line 137 of file qbrush.h.

friend class QRasterPaintEngine
friend

Definition at line 139 of file qbrush.h.

friend class QRasterPaintEnginePrivate
friend

Definition at line 140 of file qbrush.h.

friend struct QSpanData
friend

Definition at line 141 of file qbrush.h.

friend class QPainter
friend

Definition at line 142 of file qbrush.h.

bool Q_GUI_EXPORT qHasPixmapTexture ( const QBrush brush)
friend

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