Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

QwtPlotCanvas Class Reference

Canvas of a QwtPlot. More...

#include <qwt_plot_canvas.h>

List of all members.

Signals

void mousePressed (const QMouseEvent &e)
void mouseReleased (const QMouseEvent &e)
void mouseMoved (const QMouseEvent &e)

Public Methods

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 Methods

 QwtPlotCanvas (QwtPlot *)
virtual void frameChanged ()
virtual void drawContents (QPainter *)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)


Detailed Description

Canvas of a QwtPlot.

See also:
QwtPlot


Constructor & Destructor Documentation

QwtPlotCanvas::QwtPlotCanvas QwtPlot   plot [protected]
 

Sets a cross cursor, and an invisible red outline.


Member Function Documentation

void QwtPlotCanvas::drawContents QPainter *    painter [protected, virtual]
 

Redraw the canvas.

void QwtPlotCanvas::enableOutline bool    tf
 

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.

Parameters:
tf  TRUE (enabled) or FALSE (disabled)
Warning:
An outline style has to be specified.
See also:
QwtPlotCanvas::setOutlineStyle()

void QwtPlotCanvas::frameChanged   [protected, virtual]
 

Requires layout updates of the parent plot.

void QwtPlotCanvas::mouseMoved const QMouseEvent &    e [signal]
 

A signal which is emitted when the mouse is moved in the plotting area.

Parameters:
e  Mouse event object, event coordinates referring to the plotting area

void QwtPlotCanvas::mouseMoveEvent QMouseEvent *    e [protected, virtual]
 

mouseMoveEvent.

void QwtPlotCanvas::mousePressed const QMouseEvent &    e [signal]
 

A signal which is emitted when the mouse is pressed in the plotting area.

Parameters:
e  Mouse event object, event coordinates referring to the plotting area

void QwtPlotCanvas::mousePressEvent QMouseEvent *    e [protected, virtual]
 

mousePressEvent.

void QwtPlotCanvas::mouseReleased const QMouseEvent &    e [signal]
 

A signal which is emitted when a mouse button has been released in the plotting area.

Parameters:
e  Mouse event object, event coordinates referring to the plotting area

void QwtPlotCanvas::mouseReleaseEvent QMouseEvent *    e [protected, virtual]
 

mouseReleaseEvent.

bool QwtPlotCanvas::outlineEnabled   const
 

Returns:
TRUE if the outline feature is enabled
See also:
QwtPlotCanvas::enableOutline

const QPen & QwtPlotCanvas::outlinePen   const
 

Returns:
the pen used to draw outlines
See also:
QwtPlotCanvas::setOutlinePen

Qwt::Shape QwtPlotCanvas::outlineStyle   const
 

Returns:
the outline style
See also:
QwtPlotCanvas::setOutlineStyle()

void QwtPlotCanvas::setOutlinePen const QPen &    c
 

Specify a pen for the outline.

Parameters:
pn  new pen
See also:
QwtPlotCanvas::outlinePen

void QwtPlotCanvas::setOutlineStyle Qwt::Shape    os
 

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:

Parameters:
os  Outline Style. Valid values are: Qwt::HLine, Qwt::VLine, Qwt::Cross, Qwt::Rect, Qwt::Ellipse
Qwt::Cros
Cross hairs are drawn across the plotting area when the user presses a mouse button. The lines intersect at the point where the mouse was pressed and move with the mouse pointer.
Qwt::HLine, Qwt::VLine
A horizontal or vertical line appears when the user presses a mouse button. This is useful for moving line markers.
Qwt::Rect
A rectangle is displayed when the user drags the mouse. One corner is fixed at the point where the mouse was pressed, and the opposite corner moves with the mouse pointer. This can be used for selecting regions.
Qwt::Ellipse
Similar to Qwt::Rect, but with an ellipse inside a bounding rectangle.
See also:
QwtPlotCanvas::enableOutline(), QwtPlotCanvas::outlineStyle()


Generated on Tue May 28 15:31:00 2002 for Qwt User's Guide by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001