Eneboo - Documentación para desarrolladores
|
A collection of QPainter workarounds. Más...
#include <qwt_painter.h>
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 QwtMetricsMap & | metricsMap () |
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 () |
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).
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.
void QwtPainter::drawColorBar | ( | QPainter * | painter, |
const QwtColorMap & | colorMap, | ||
const QwtDoubleInterval & | interval, | ||
const QwtScaleMap & | scaleMap, | ||
Qt::Orientation | orientation, | ||
const QRect & | rect | ||
) | [static] |
Wrapper for QPainter::drawEllipse()
void QwtPainter::drawFocusRect | ( | QPainter * | painter, |
QWidget * | widget, | ||
const QRect & | rect | ||
) | [static] |
Wrapper for QPainter::drawLine()
void QwtPainter::drawLine | ( | QPainter * | painter, |
const QPoint & | p1, | ||
const QPoint & | p2 | ||
) | [inline, static] |
Wrapper for QPainter::drawLine()
Wrapper for QPainter::drawPie()
Wrapper for QPainter::drawPoint()
void QwtPainter::drawPolygon | ( | QPainter * | painter, |
const QwtPolygon & | pa | ||
) | [static] |
Wrapper for QPainter::drawPolygon()
void QwtPainter::drawPolyline | ( | QPainter * | painter, |
const QwtPolygon & | pa | ||
) | [static] |
Wrapper for QPainter::drawPolyline()
Wrapper for QPainter::drawRect()
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] |
Wrapper for QSimpleRichText::draw()
Wrapper for QPainter::drawText()
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()
Wrapper for QPainter::fillRect()
bool QwtPainter::isSVGMode | ( | ) | [static] |
const QwtMetricsMap & QwtPainter::metricsMap | ( | ) | [static] |
void QwtPainter::resetMetricsMap | ( | ) | [static] |
Reset the metrics map to the ratio 1:1
Wrapper for QPainter::setClipRect()
void QwtPainter::setDeviceClipping | ( | bool | enable | ) | [static] |
En/Disable device clipping.
On X11 the default for device clipping is enabled, otherwise it is disabled.
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()
void QwtPainter::setMetricsMap | ( | const QwtMetricsMap & | map | ) | [static] |
Change the metrics map
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.