45 #include <QtCore/qpair.h> 46 #include <QtCore/qpoint.h> 47 #include <QtCore/qvector.h> 48 #include <QtCore/qscopedpointer.h> 49 #include <QtGui/qcolor.h> 50 #include <QtGui/qmatrix.h> 51 #include <QtGui/qtransform.h> 52 #include <QtGui/qimage.h> 53 #include <QtGui/qpixmap.h> 55 #if defined(Q_OS_VXWORKS) 95 #ifdef Q_COMPILER_RVALUE_REFS 97 {
qSwap(
d, other.d);
return *
this; }
106 inline const QMatrix &matrix()
const;
107 void setMatrix(
const QMatrix &mat);
113 void setTexture(
const QPixmap &pixmap);
115 QImage textureImage()
const;
116 void setTextureImage(
const QImage &image);
118 inline const QColor &color()
const;
119 void setColor(
const QColor &color);
124 bool isOpaque()
const;
130 inline QT3_SUPPORT
operator const QColor&()
const;
131 QT3_SUPPORT
QPixmap *pixmap()
const;
132 inline QT3_SUPPORT
void setPixmap(
const QPixmap &pixmap) { setTexture(pixmap); }
136 #if defined(Q_WS_X11) 150 inline bool isDetached()
const;
156 { setColor(
QColor(acolor)); }
165 #ifndef QT_NO_DATASTREAM 170 #ifndef QT_NO_DEBUG_STREAM 189 inline QBrush::operator
const QColor&()
const {
return d->color; }
196 class QGradientPrivate;
219 enum CoordinateMode {
227 ComponentInterpolation
234 inline void setSpread(
Spread spread);
243 void setCoordinateMode(CoordinateMode mode);
278 { m_spread = aspread; }
288 void setStart(
const QPointF &start);
292 void setFinalStop(
const QPointF &stop);
311 void setCenter(
const QPointF ¢er);
315 void setFocalPoint(
const QPointF &focalPoint);
318 qreal radius()
const;
319 void setRadius(
qreal radius);
321 qreal centerRadius()
const;
322 void setCenterRadius(
qreal radius);
324 qreal focalRadius()
const;
325 void setFocalRadius(
qreal radius);
337 void setCenter(
const QPointF ¢er);
341 void setAngle(
qreal angle);
The QVariant class acts like a union for the most common Qt data types.
QScopedPointer< QBrushData, QBrushDataPointerDeleter > DataPtr
The QPainter class performs low-level painting on widgets and other paint devices.
The QDebug class provides an output stream for debugging information.
The QColor class provides colors based on RGB, HSV or CMYK values.
#define QT_END_NAMESPACE
This macro expands to.
const QColor & color() const
Returns the brush color.
void setFocalPoint(qreal x, qreal y)
Sets the focal point of this radial gradient in logical coordinates to (x, y).
void setCenter(qreal x, qreal y)
Sets the center of this radial gradient in logical coordinates to (x, y).
The QMatrix class specifies 2D transformations of a coordinate system.
The QAtomicInt class provides platform-independent atomic operations on integers. ...
static QGradient::CoordinateMode coordinateMode(const QBrush &brush)
QScopedPointer< QBrushData, QBrushDataPointerDeleter > d
The QConicalGradient class is used in combination with QBrush to specify a conical gradient brush...
void setCenter(qreal x, qreal y)
Sets the center of this conical gradient in logical coordinates to (x, y).
The QPointF class defines a point in the plane using floating point precision.
CoordinateMode
This enum specifies how gradient coordinates map to the paint device on which the gradient is used...
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QBrush &)
The QRadialGradient class is used in combination with QBrush to specify a radial gradient brush...
QTransform transform() const
Returns the current transformation matrix for the brush.
#define Q_DECLARE_SHARED(TYPE)
void setSpread(Spread spread)
Specifies the spread method that should be used for this gradient.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool Q_GUI_EXPORT qHasPixmapTexture(const QBrush &brush)
void setFinalStop(qreal x, qreal y)
Sets the final stop point of this linear gradient in logical coordinates to x, y. ...
Q_DECLARE_TYPEINFO(QBrush, Q_MOVABLE_TYPE)
The QImage class provides a hardware-independent image representation that allows direct access to th...
bool operator!=(const QGradient &other) const
Returns true if the gradient is the same as the other gradient specified; otherwise returns false...
Type
Specifies the type of gradient.
Qt::BrushStyle style() const
Returns the brush style.
void swap(QBrush &other)
Swaps brush other with this brush.
const QMatrix & matrix() const
Returns the current transformation matrix for the brush.
QVector< QGradientStop > QGradientStops
void qSwap(T &value1, T &value2)
Spread
Specifies how the area outside the gradient area should be filled.
Q_CORE_EXPORT QTextStream & center(QTextStream &s)
void setColor(const QColor &color)
Sets the brush color to the given color.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
qreal angle(const QPointF &p1, const QPointF &p2)
void setStart(qreal x, qreal y)
Sets the start point of this linear gradient in logical coordinates to x, y.
Type type() const
Returns the type of gradient.
The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush...
The QGradient class is used in combination with QBrush to specify gradient fills. ...
QPair< qreal, QColor > QGradientStop
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QBrush &)
Spread spread() const
Returns the spread method use by this gradient.
The QPixmap class is an off-screen image representation that can be used as a paint device...
The QDataStream class provides serialization of binary data to a QIODevice.
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
bool operator!=(const QBrush &b) const
Returns true if the brush is different from the given brush; otherwise returns false.
bool operator==(QBool b1, bool b2)