Public Types | |
enum | FocusIndicator { NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator } |
Public Member Functions | |
void | setFocusIndicator (FocusIndicator) |
FocusIndicator | focusIndicator () const |
void | setCacheMode (bool on) |
bool | cacheMode () const |
const QPixmap * | cache () const |
void | enableOutline (bool tf) |
bool | outlineEnabled () const |
void | setOutlinePen (const QPen &p) |
const QPen & | outlinePen () const |
void | setOutlineStyle (Qwt::Shape os) |
Qwt::Shape | outlineStyle () const |
Protected Member Functions | |
QwtPlotCanvas (QwtPlot *) | |
QPixmap * | cache () |
virtual void | frameChanged () |
virtual void | drawContents (QPainter *) |
virtual void | drawFocusIndicator (QPainter *, const QRect &) |
void | drawCanvas (QPainter *painter=NULL) |
void | mousePressed (const QMouseEvent &e) |
void | mouseReleased (const QMouseEvent &e) |
void | mouseMoved (const QMouseEvent &e) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
Friends | |
class | QwtPlot |
|
Focus indicator.
|
|
Sets a cross cursor, and an invisible red outline.
|
|
Return the paint cache, might be null.
|
|
Return the paint cache, might be null.
|
|
|
|
Draw the the canvas Paints all plot items to the contentsRect(), using QwtPlot::drawCanvas and updates the cache.
|
|
Redraw the canvas, and focus rect.
|
|
Enables or disables outline drawing. When the outline feature is enabled, a shape will be drawn in the plotting region when the user presses or drags the mouse. It can be used to implement crosshairs, mark a selected region, etc.
|
|
|
|
Requires layout updates of the parent plot.
|
|
A signal which is emitted when the mouse is moved in the canvas.
|
|
mouseMoveEvent
|
|
A signal which is emitted when the mouse is pressed in the canvas.
|
|
mousePressEvent
|
|
A signal which is emitted when a mouse button has been released in the canvas.
|
|
mouseReleaseEvent
|
|
|
|
|
|
|
|
En/Disable caching. When cache mode is enabled the canvas contents are copied to a pixmap that is used for trivial repaints. Such repaints happen when a plot gets unhidden, deiconified or changes the focus. The win of caching depends on the costs of QwtPlot::drawCanvas. In case of plots with huge data it might be significant. The price of caching is wasting memory for the cache, what is a pixmap in size of contentsRect(). In case of QwtPaintBuffer::isEnabled() updating the cache produces no performance overhead as it reuses the temporary paintbuffer of the double buffering. Otherwise canvas updates have to painted twice to widget and cache.
|
|
Set the focus indicator
|
|
Specify a pen for the outline.
|
|
Specify the style of the outline. The outline style determines which kind of shape is drawn in the plotting region when the user presses a mouse button or drags the mouse. Valid Styles are:
|