44 #if !defined(QT_NO_STYLE_CDE) || defined(QT_PLUGIN) 191 bool showUp = !(down ^ on);
207 for (i = 0; i < 3; i++) {
213 for (i = 3; i < 7; i++) {
230 #define INTARRLEN(x) sizeof(x)/(sizeof(int)*2) 231 static const int pts1[] = {
232 1,9, 1,8, 0,7, 0,4, 1,3, 1,2, 2,1, 3,1, 4,0, 7,0, 8,1, 9,1 };
233 static const int pts4[] = {
234 2,10, 3,10, 4,11, 7,11, 8,10, 9,10, 10,9, 10,8, 11,7,
236 static const int pts5[] = {
237 4,2, 7,2, 9,4, 9,7, 7,9, 4,9, 2,7, 2,4 };
247 if (r.
width() > indicatorWidth)
248 xOffset += (r.
width() - indicatorWidth)/2;
249 if (r.
height() > indicatorHeight)
250 yOffset += (r.
height() - indicatorHeight)/2;
285 QColor background(0xb6, 0xb6, 0xcf);
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
#define QT_END_NAMESPACE
This macro expands to.
const QColor & color() const
Returns the brush color.
QPointer< QWidget > widget
int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const
Returns the value of the given pixel metric.
const QBrush & dark() const
Returns the dark brush of the current color group.
const QBrush & background() const
Returns the current background brush.
QStyle::State state
the style flags that are used when drawing the control
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const
Reimplemented Function
const QBrush & background() const
Use window() instead.
void restore()
Restores the current painter state (pops a saved state off the stack).
PixelMetric
This enum describes the various available pixel metrics.
int width() const
Returns the width of the rectangle.
const QBrush & foreground() const
Use windowText() instead.
long ASN1_INTEGER_get ASN1_INTEGER * a
The QPolygon class provides a vector of points using integer precision.
int height() const
Returns the height of the rectangle.
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void save()
Saves the current painter state (pushes the state onto a stack).
StandardPixmap
This enum describes the available standard pixmaps.
virtual ~QCDEStyle()
Destroys the style.
QColor darker(int f=200) const
Returns a darker (or lighter) color, but does not change this object.
void translate(int dx, int dy)
Translates all points in the polygon by ({dx}, {dy}).
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const
Returns an icon for the given standardIcon.
const QPen & pen() const
Returns the painter's current pen.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void setBrush(ColorRole cr, const QBrush &brush)
Sets the brush for the given color role to the specified brush for all groups in the palette...
const QBrush & light() const
Returns the light brush of the current color group.
void fillPath(const QPainterPath &path, const QBrush &brush)
Fills the given path using the given brush.
QCDEStyle(bool useHighlightCols=false)
Constructs a QCDEStyle.
The QStyleOption class stores the parameters used by QStyle functions.
QPalette standardPalette() const
Returns the style's standard palette.
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws the polygon defined by the first pointCount points in the array points using the current pen an...
void qDrawShadePanel(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken, int lineWidth, const QBrush *fill)
The QMotifStyle class provides Motif look and feel.
const QBrush & brush(ColorGroup cg, ColorRole cr) const
Returns the brush in the specified color group, used for the given color role.
const QBrush & brush() const
Returns the painter's current brush.
QPalette palette
the palette that should be used when painting the control
The QBrush class defines the fill pattern of shapes drawn by QPainter.
PrimitiveElement
This enum describes the various primitive elements.
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const
Reimplemented Function
void setClipping(bool enable)
Enables clipping if enable is true, or disables clipping if enable is false.
int y() const
Returns the y-coordinate of the rectangle's top edge.
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const
Reimplemented Function
int x() const
Returns the x-coordinate of the rectangle's left edge.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
The QRect class defines a rectangle in the plane using integer precision.
void setPoint(int index, int x, int y)
Sets the point at the given index to the point specified by ({x}, {y}).
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const
Reimplemented Function
ControlElement
This enum represents a control element.
void setPoints(int nPoints, const int *points)
Resizes the polygon to nPoints and populates it with the given points.
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const
Reimplemented Function
QColor lighter(int f=150) const
Returns a lighter (or darker) color, but does not change this object.
int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const
Reimplemented Function
void drawPolyline(const QPointF *points, int pointCount)
Draws the polyline defined by the first pointCount points in points using the current pen...
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt=0, const QWidget *widget=0) const
int styleHint(StyleHint hint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const
Reimplemented Function
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt=0, const QWidget *widget=0) const
QRect rect
the area that should be used for various calculations and painting
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.
The QPalette class contains color groups for each widget state.
The QIcon class provides scalable icons in different modes and states.