QwtPlotCanvas(3)

NAME
QwtPlotCanvas - Canvas of a QwtPlot.

SYNOPSIS

#include <qwt_plot_canvas.h>

  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()

AUTHOR

Generated automatically by Doxygen for Qwt User's Guide from the source code.