QwtPainter Class Reference

A collection of QPainter workarounds. More...

#include <qwt_painter.h>

List of all members.

Static Public Member Functions

static void setPolylineSplitting (bool)
static bool polylineSplitting ()
static void setRoundingAlignment (bool)
static bool roundingAlignment ()
static bool roundingAlignment (QPainter *)
static void drawText (QPainter *, double x, double y, const QString &)
static void drawText (QPainter *, const QPointF &, const QString &)
static void drawText (QPainter *, double x, double y, double w, double h, int flags, const QString &)
static void drawText (QPainter *, const QRectF &, int flags, const QString &)
static void drawSimpleRichText (QPainter *, const QRectF &, int flags, const QTextDocument &)
static void drawRect (QPainter *, double x, double y, double w, double h)
static void drawRect (QPainter *, const QRectF &rect)
static void fillRect (QPainter *, const QRectF &, const QBrush &)
static void drawEllipse (QPainter *, const QRectF &)
static void drawPie (QPainter *, const QRectF &r, int a, int alen)
static void drawLine (QPainter *, double x1, double y1, double x2, double y2)
static void drawLine (QPainter *, const QPointF &p1, const QPointF &p2)
static void drawLine (QPainter *, const QLineF &)
static void drawPolygon (QPainter *, const QPolygonF &pa)
static void drawPolyline (QPainter *, const QPolygonF &pa)
static void drawPolyline (QPainter *, const QPointF *, int pointCount)
static void drawPoint (QPainter *, double x, double y)
static void drawPoint (QPainter *, const QPointF &)
static void drawImage (QPainter *, const QRectF &, const QImage &)
static void drawPixmap (QPainter *, const QRectF &, const QPixmap &)
static void drawRoundFrame (QPainter *, const QRect &, int width, const QPalette &, bool sunken)
static void drawFocusRect (QPainter *, QWidget *)
static void drawFocusRect (QPainter *, QWidget *, const QRect &)
static void drawColorBar (QPainter *painter, const QwtColorMap &, const QwtInterval &, const QwtScaleMap &, Qt::Orientation, const QRectF &)
static bool isAligning (QPainter *painter)

Detailed Description

A collection of QPainter workarounds.


Member Function Documentation

void QwtPainter::drawColorBar ( QPainter *  painter,
const QwtColorMap colorMap,
const QwtInterval interval,
const QwtScaleMap scaleMap,
Qt::Orientation  orientation,
const QRectF &  rect 
) [static]

Draw a color bar into a rectangle

Parameters:
painter Painter
colorMap Color map
interval Value range
scaleMap Scale map
orientation Orientation
rect Traget rectangle
void QwtPainter::drawEllipse ( QPainter *  painter,
const QRectF &  rect 
) [static]

Wrapper for QPainter::drawEllipse().

void QwtPainter::drawFocusRect ( QPainter *  painter,
QWidget *  widget,
const QRect &  rect 
) [static]

Draw a focus rectangle on a widget using its style.

void QwtPainter::drawFocusRect ( QPainter *  painter,
QWidget *  widget 
) [static]

Draw a focus rectangle on a widget using its style.

void QwtPainter::drawImage ( QPainter *  painter,
const QRectF &  rect,
const QImage &  image 
) [static]

Wrapper for QPainter::drawImage().

void QwtPainter::drawLine ( QPainter *  painter,
const QLineF &  line 
) [inline, static]

Wrapper for QPainter::drawLine().

void QwtPainter::drawLine ( QPainter *  painter,
const QPointF &  p1,
const QPointF &  p2 
) [static]

Wrapper for QPainter::drawLine().

void QwtPainter::drawLine ( QPainter *  painter,
double  x1,
double  y1,
double  x2,
double  y2 
) [inline, static]

Wrapper for QPainter::drawLine().

void QwtPainter::drawPie ( QPainter *  painter,
const QRectF &  r,
int  a,
int  alen 
) [static]

Wrapper for QPainter::drawPie().

void QwtPainter::drawPixmap ( QPainter *  painter,
const QRectF &  rect,
const QPixmap &  pixmap 
) [static]

Wrapper for QPainter::drawPixmap().

void QwtPainter::drawPoint ( QPainter *  painter,
const QPointF &  pos 
) [static]

Wrapper for QPainter::drawPoint().

void QwtPainter::drawPoint ( QPainter *  painter,
double  x,
double  y 
) [inline, static]

Wrapper for QPainter::drawPoint().

void QwtPainter::drawPolygon ( QPainter *  painter,
const QPolygonF &  pa 
) [static]

Wrapper for QPainter::drawPolygon().

void QwtPainter::drawPolyline ( QPainter *  painter,
const QPointF *  points,
int  pointCount 
) [static]

Wrapper for QPainter::drawPolyline().

void QwtPainter::drawPolyline ( QPainter *  painter,
const QPolygonF &  pa 
) [static]

Wrapper for QPainter::drawPolyline().

void QwtPainter::drawRect ( QPainter *  painter,
const QRectF &  rect 
) [static]

Wrapper for QPainter::drawRect().

void QwtPainter::drawRect ( QPainter *  painter,
double  x,
double  y,
double  w,
double  h 
) [static]

Wrapper for QPainter::drawRect().

void QwtPainter::drawRoundFrame ( QPainter *  painter,
const QRect &  rect,
int  width,
const QPalette &  palette,
bool  sunken 
) [static]

Draw a round frame.

void QwtPainter::drawSimpleRichText ( QPainter *  painter,
const QRectF &  rect,
int  flags,
const QTextDocument &  text 
) [static]

Draw a text document into a rectangle

Parameters:
painter Painter
rect Traget rectangle
flags Alignments/Text flags, see QPainter::drawText()
text Text document
void QwtPainter::drawText ( QPainter *  painter,
const QRectF &  rect,
int  flags,
const QString &  text 
) [static]

Wrapper for QPainter::drawText().

void QwtPainter::drawText ( QPainter *  painter,
double  x,
double  y,
double  w,
double  h,
int  flags,
const QString &  text 
) [static]

Wrapper for QPainter::drawText().

void QwtPainter::drawText ( QPainter *  painter,
const QPointF &  pos,
const QString &  text 
) [static]

Wrapper for QPainter::drawText().

void QwtPainter::drawText ( QPainter *  painter,
double  x,
double  y,
const QString &  text 
) [static]

Wrapper for QPainter::drawText().

void QwtPainter::fillRect ( QPainter *  painter,
const QRectF &  rect,
const QBrush &  brush 
) [static]

Wrapper for QPainter::fillRect().

bool QwtPainter::isAligning ( QPainter *  painter  )  [static]

Check if the painter is using a paint engine, that aligns coordinates to integers. Today these are all paint engines beside QPaintEngine::Pdf and QPaintEngine::SVG.

Parameters:
painter Painter
Returns:
true, when the paint engine is aligning
See also:
setRoundingAlignment()
bool QwtPainter::polylineSplitting (  )  [inline, static]

Returns whether line splitting for the raster paint engine is enabled.

See also:
setPolylineSplitting()
bool QwtPainter::roundingAlignment ( QPainter *  painter  )  [inline, static]
Returns:
roundingAlignment() && isAligning(painter);
Parameters:
painter Painter
bool QwtPainter::roundingAlignment (  )  [inline, static]

Returns whether coordinates should be rounded, before they are painted to a paint engine that floors to integer values. For other paint engines this ( Pdf, SVG ), this flag has no effect.

See also:
setRoundingAlignment(), isAligning()
void QwtPainter::setPolylineSplitting ( bool  enable  )  [static]

En/Disable line splitting for the raster paint engine.

The raster paint engine paints polylines of many points much faster when they are splitted in smaller chunks.

See also:
polylineSplitting()
void QwtPainter::setRoundingAlignment ( bool  enable  )  [static]

Enable whether coordinates should be rounded, before they are painted to a paint engine that floors to integer values. For other paint engines this ( Pdf, SVG ), this flag has no effect. QwtPainter stores this flag only, the rounding itsself is done in the painting code ( f.e the plot items ).

The default setting is true.

See also:
roundingAlignment(), isAligning()
Generated on Sun Nov 21 12:01:38 2010 for Qwt User's Guide by  doxygen 1.6.3