Eneboo - Documentación para desarrolladores
Métodos públicos estáticos
Referencia de la Clase QwtPainter

A collection of QPainter workarounds. Más...

#include <qwt_painter.h>

Lista de todos los miembros.

Métodos públicos estáticos

static void setMetricsMap (const QPaintDevice *layout, const QPaintDevice *device)
static void setMetricsMap (const QwtMetricsMap &)
static void resetMetricsMap ()
static const QwtMetricsMapmetricsMap ()
static void setDeviceClipping (bool)
 En/Disable device clipping.
static bool deviceClipping ()
static void setClipRect (QPainter *, const QRect &)
static void drawText (QPainter *, int x, int y, const QString &)
static void drawText (QPainter *, const QPoint &, const QString &)
static void drawText (QPainter *, int x, int y, int w, int h, int flags, const QString &)
static void drawText (QPainter *, const QRect &, int flags, const QString &)
static void drawSimpleRichText (QPainter *, const QRect &, int flags, QSimpleRichText &)
static void drawRect (QPainter *, int x, int y, int w, int h)
static void drawRect (QPainter *, const QRect &rect)
static void fillRect (QPainter *, const QRect &, const QBrush &)
static void drawEllipse (QPainter *, const QRect &)
static void drawPie (QPainter *, const QRect &r, int a, int alen)
static void drawLine (QPainter *, int x1, int y1, int x2, int y2)
static void drawLine (QPainter *, const QPoint &p1, const QPoint &p2)
 Wrapper for QPainter::drawLine()
static void drawPolygon (QPainter *, const QwtPolygon &pa)
static void drawPolyline (QPainter *, const QwtPolygon &pa)
static void drawPoint (QPainter *, int x, int y)
static void drawRoundFrame (QPainter *, const QRect &, int width, const QColorGroup &cg, bool sunken)
 Draw a round frame.
static void drawFocusRect (QPainter *, QWidget *)
static void drawFocusRect (QPainter *, QWidget *, const QRect &)
static QwtPolygon clip (const QwtPolygon &)
 Clip a point array.
static void drawColorBar (QPainter *painter, const QwtColorMap &, const QwtDoubleInterval &, const QwtScaleMap &, Qt::Orientation, const QRect &)
static void setSVGMode (bool on)
 En/Disable SVG mode.
static bool isSVGMode ()

Descripción detallada

A collection of QPainter workarounds.

1) Clipping to coordinate system limits (Qt3 only)

On X11 pixel coordinates are stored in shorts. Qt produces overruns when mapping QCOORDS to shorts.

2) Scaling to device metrics

QPainter scales fonts, line and fill patterns to the metrics of the paint device. Other values like the geometries of rects, points remain device independend. To enable a device independent widget implementation, QwtPainter adds scaling of these geometries. (Unfortunately QPainter::scale scales both types of paintings, so the objects of the first type would be scaled twice).


Documentación de las funciones miembro

QwtPolygon QwtPainter::clip ( const QwtPolygon pa) [static]

Clip a point array.

bool QwtPainter::deviceClipping ( ) [static]

Returns whether device clipping is enabled. On X11 the default is enabled, otherwise it is disabled.

Ver también:
QwtPainter::setDeviceClipping()
void QwtPainter::drawColorBar ( QPainter painter,
const QwtColorMap colorMap,
const QwtDoubleInterval interval,
const QwtScaleMap scaleMap,
Qt::Orientation  orientation,
const QRect rect 
) [static]
void QwtPainter::drawEllipse ( QPainter painter,
const QRect rect 
) [static]
void QwtPainter::drawFocusRect ( QPainter painter,
QWidget widget 
) [static]
void QwtPainter::drawFocusRect ( QPainter painter,
QWidget widget,
const QRect rect 
) [static]
void QwtPainter::drawLine ( QPainter painter,
int  x1,
int  y1,
int  x2,
int  y2 
) [static]

Wrapper for QPainter::drawLine()

void QwtPainter::drawLine ( QPainter painter,
const QPoint p1,
const QPoint p2 
) [inline, static]

Wrapper for QPainter::drawLine()

void QwtPainter::drawPie ( QPainter painter,
const QRect rect,
int  a,
int  alen 
) [static]

Wrapper for QPainter::drawPie()

void QwtPainter::drawPoint ( QPainter painter,
int  x,
int  y 
) [static]

Wrapper for QPainter::drawPoint()

void QwtPainter::drawPolygon ( QPainter painter,
const QwtPolygon pa 
) [static]
void QwtPainter::drawPolyline ( QPainter painter,
const QwtPolygon pa 
) [static]
void QwtPainter::drawRect ( QPainter painter,
int  x,
int  y,
int  w,
int  h 
) [static]

Wrapper for QPainter::drawRect()

void QwtPainter::drawRect ( QPainter painter,
const QRect rect 
) [static]

Wrapper for QPainter::drawRect()

void QwtPainter::drawRoundFrame ( QPainter painter,
const QRect rect,
int  width,
const QColorGroup cg,
bool  sunken 
) [static]

Draw a round frame.

void QwtPainter::drawSimpleRichText ( QPainter painter,
const QRect rect,
int  flags,
QSimpleRichText text 
) [static]
void QwtPainter::drawText ( QPainter painter,
int  x,
int  y,
const QString text 
) [static]

Wrapper for QPainter::drawText()

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

Wrapper for QPainter::drawText()

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

Wrapper for QPainter::drawText()

void QwtPainter::drawText ( QPainter painter,
const QRect rect,
int  flags,
const QString text 
) [static]

Wrapper for QPainter::drawText()

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

Wrapper for QPainter::fillRect()

bool QwtPainter::isSVGMode ( ) [static]
const QwtMetricsMap & QwtPainter::metricsMap ( ) [static]
Devuelve:
Metrics map
void QwtPainter::resetMetricsMap ( ) [static]

Reset the metrics map to the ratio 1:1

Ver también:
QwtPainter::setMetricsMap, QwtPainter::resetMetricsMap
void QwtPainter::setClipRect ( QPainter painter,
const QRect rect 
) [static]
void QwtPainter::setDeviceClipping ( bool  enable) [static]

En/Disable device clipping.

On X11 the default for device clipping is enabled, otherwise it is disabled.

Ver también:
QwtPainter::deviceClipping()
void QwtPainter::setMetricsMap ( const QPaintDevice layout,
const QPaintDevice device 
) [static]

Scale all QwtPainter drawing operations using the ratio QwtPaintMetrics(from).logicalDpiX() / QwtPaintMetrics(to).logicalDpiX() and QwtPaintMetrics(from).logicalDpiY() / QwtPaintMetrics(to).logicalDpiY()

Ver también:
QwtPainter::resetScaleMetrics(), QwtPainter::scaleMetricsX, QwtPainter::scaleMetricsY()
void QwtPainter::setMetricsMap ( const QwtMetricsMap map) [static]

Change the metrics map

Ver también:
QwtPainter::resetMetricsMap, QwtPainter::metricsMap
void QwtPainter::setSVGMode ( bool  on) [static]

En/Disable SVG mode.

When saving a QPicture to a SVG some texts are misaligned. In SVGMode QwtPainter tries to fix them.

Ver también:
QwtPainter::isSVGMode()
Nota:
A QPicture that is created in SVG mode and saved to the native format, will be misaligned. Also it is not possible to reload and play a SVG document, that was created in SVG mode.

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'