|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Canvas of a QwtPolarPlot 更多...
#include <qwt_polar_canvas.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | PaintAttribute { BackingStore = 0x01 } |
| Paint attributes 更多... | |
Public 成员函数 | |
| QwtPolarCanvas (QwtPolarPlot *) | |
| Constructor | |
| ~QwtPolarCanvas () override | |
| Destructor | |
| QwtPolarPlot * | plot () |
| Get the plot | |
| const QwtPolarPlot * | plot () const |
| Get the plot (const version) | |
| void | setPaintAttribute (PaintAttribute, bool on=true) |
| Set a paint attribute | |
| bool | testPaintAttribute (PaintAttribute) const |
| Test a paint attribute | |
| const QPixmap * | backingStore () const |
| Get the backing store | |
| void | invalidateBackingStore () |
| Invalidate the backing store | |
| QwtPointPolar | invTransform (const QPoint &) const |
| Inverse transform from widget coordinates to polar coordinates | |
| QPoint | transform (const QwtPointPolar &) const |
| Transform from polar coordinates to widget coordinates | |
Protected 成员函数 | |
| virtual void | paintEvent (QPaintEvent *) override |
| Handle paint events | |
| virtual void | resizeEvent (QResizeEvent *) override |
| Handle resize events | |
Canvas of a QwtPolarPlot
The canvas is the widget, where all polar items are painted to.
|
explicit |
Constructor
| plot | Parent polar plot widget |
Destructor
| const QPixmap * QwtPolarCanvas::backingStore | ( | ) | const |
Get the backing store
Get the backing store pixmap
| void QwtPolarCanvas::invalidateBackingStore | ( | ) |
Invalidate the backing store
Invalidate the internal backing store
Clears the backing store pixmap, forcing a full repaint on the next paint event.
| QwtPointPolar QwtPolarCanvas::invTransform | ( | const QPoint & | pos | ) | const |
Inverse transform from widget coordinates to polar coordinates
Translate a point from widget coordinates to polar coordinates
| pos | Point in widget coordinates of the plot canvas |
|
overrideprotectedvirtual |
Handle paint events
Paint event
| event | Paint event |
| QwtPolarPlot * QwtPolarCanvas::plot | ( | ) |
Get the plot
Get the parent plot widget
| const QwtPolarPlot * QwtPolarCanvas::plot | ( | ) | const |
Get the plot (const version)
Get the parent plot widget (const version)
|
overrideprotectedvirtual |
Handle resize events
Resize event
| event | Resize event |
| void QwtPolarCanvas::setPaintAttribute | ( | PaintAttribute | attribute, |
| bool | on = true |
||
| ) |
Set a paint attribute
Change the paint attributes
| attribute | Paint attribute to modify |
| on | True to enable, false to disable |
The default setting enables BackingStore.
| bool QwtPolarCanvas::testPaintAttribute | ( | PaintAttribute | attribute | ) | const |
Test a paint attribute
Test whether a paint attribute is enabled
| attribute | Paint attribute to test |
| QPoint QwtPolarCanvas::transform | ( | const QwtPointPolar & | polarPos | ) | const |
Transform from polar coordinates to widget coordinates
Translate a point from polar coordinates to widget coordinates
| polarPos | Point in polar coordinates |