QwtPlot(3)

NAME
QwtPlot -

SYNOPSIS

Detailed Description

A 2-D plotting widget. QwtPlot is a widget for plotting two-dimensional graphs. An unlimited number of data pairs can be displayed as curves in different styles and colors. A plot can have up to four axes, with each curve attached to an x- and a y axis. The scales at the axes are dimensioned automatically using an algorithm which can be configured separately for each axis. Linear and logarithmic scaling is supported. Markers of different styles can be added to the plot.

Curves and markers are identified by unique keys which are generated automatically when a curve or a marker is inserted. These keys are used to access the properties of the corresponding curves and markers.

A QwtPlot widget can have up to four axes which are indexed by the constants QwtPlot::yLeft, QwtPlot::yRight, QwtPlot::xTop, and QwtPlot::xBottom. Curves, markers, and the grid must be attached to an x axis and a y axis (Default: yLeft and xBottom).

Example.RS 4 The following example shows (schematically) the most simple way to use QwtPlot. By default, only the left and bottom axes are visible and their scales are computed automatically.

#include "../include/qwt_plot.h>
QwtPlot *myPlot;
long curve1, curve2;                    // keys
double x[100], y1[100], y2[100];        // x and y values
myPlot = new QwtPlot("Two Graphs", parent, name);
// add curves
curve1 = myPlot->insertCurve("Graph 1");
curve2 = myPlot->insertCurve("Graph 2");
getSomeValues(x, y1, y2);
// copy the data into the curves
myPlot->setCurveData(curve1, x, y1, 100);
myPlot->setCurveData(curve2, x, y2, 100);
// finally, refresh the plot
myPlot->replot();

Definition at line 85 of file qwt_plot.h.

  Public Types
enum Axis { yLeft, yRight, xBottom, xTop, axisCnt }
enum Position { Left = Qwt::Left, Right = Qwt::Right, Bottom = Qwt::Bottom, Top = Qwt::Top }

  Public Slots
void clear ()
bool removeCurve (long key)
void removeCurves ()
bool removeMarker (long key)
void removeMarkers ()
virtual void replot ()

  Signals
void plotMousePressed (const QMouseEvent &e)
void plotMouseReleased (const QMouseEvent &e)
void plotMouseMoved (const QMouseEvent &e)
void legendClicked (long key)

  Public Member Functions
QwtPlot (QWidget *p=0, const char *name=0)
QwtPlot (const QString &title, QWidget *p=0, const char *name=0)
virtual ~QwtPlot ()
void enableXBottomAxis (bool b)
bool xBottomAxisEnabled () const
void enableXTopAxis (bool b)
bool xTopAxisEnabled () const
void enableYRightAxis (bool b)
bool yRightAxisEnabled () const
void enableYLeftAxis (bool b)
bool yLeftAxisEnabled () const
void setAutoReplot (bool tf=TRUE)
bool autoReplot () const
void print (QPaintDevice &p, const QwtPlotPrintFilter &=QwtPlotPrintFilter()) const
virtual void print (QPainter *, const QRect &rect, const QwtPlotPrintFilter &=QwtPlotPrintFilter()) const
void enableOutline (bool tf)
bool outlineEnabled () const
void setOutlineStyle (Qwt::Shape os)
Qwt::Shape outlineStyle () const
void setOutlinePen (const QPen &pn)
const QPen & outlinePen () const
QwtPlotLayout * plotLayout ()
const QwtPlotLayout * plotLayout () const
void setMargin (int margin)
int margin () const
void setTitle (const QString &t)
QString title () const
void setTitleFont (const QFont &f)
QFont titleFont () const
QLabel * titleLabel ()
const QLabel * titleLabel () const
QwtPlotCanvas * canvas ()
const QwtPlotCanvas * canvas () const
void setCanvasBackground (const QColor &c)
const QColor & canvasBackground () const
void setCanvasLineWidth (int w)
int canvasLineWidth () const
QwtPlotCurveIterator curveIterator () const
QwtPlotMarkerIterator markerIterator () const
QwtDiMap canvasMap (int axis) const
double invTransform (int axis, int pos) const
int transform (int axis, double value) const
long insertCurve (QwtPlotCurve *)
long insertCurve (const QString &title, int xAxis=xBottom, int yAxis=yLeft)
QwtPlotCurve * curve (long key)
const QwtPlotCurve * curve (long key) const
QwtArray< long > curveKeys () const
long closestCurve (int xpos, int ypos, int &dist) const
long closestCurve (int xpos, int ypos, int &dist, double &xval, double &yval, int &index) const
bool setCurveBaseline (long key, double ref)
double curveBaseline (long key) const
bool setCurveRawData (long key, const double *x, const double *y, int size)
bool setCurveData (long key, const double *x, const double *y, int size)
bool setCurveData (long key, const QwtArray< double > &x, const QwtArray< double > &y)
bool setCurveData (long key, const QwtArray< QwtDoublePoint > &data)
bool setCurveData (long key, const QwtData &data)
bool setCurveOptions (long key, int t)
int curveOptions (long key) const
bool setCurvePen (long key, const QPen &pen)
QPen curvePen (long key) const
bool setCurveBrush (long key, const QBrush &brush)
QBrush curveBrush (long key) const
bool setCurveSplineSize (long key, int s)
int curveSplineSize (long key) const
bool setCurveStyle (long key, int s, int options=0)
int curveStyle (long key) const
bool setCurveSymbol (long key, const QwtSymbol &s)
QwtSymbol curveSymbol (long key) const
bool setCurveTitle (long key, const QString &s)
QString curveTitle (long key) const
bool setCurveXAxis (long key, int axis)
int curveXAxis (long key) const
bool setCurveYAxis (long key, int axis)
int curveYAxis (long key) const
void drawCurve (long key, int from=0, int to=-1)
void enableGridX (bool tf=TRUE)
void enableGridXMin (bool tf=TRUE)
void enableGridY (bool tf=TRUE)
void enableGridYMin (bool tf=TRUE)
bool gridXEnabled () const
bool gridXMinEnabled () const
bool gridYEnabled () const
bool gridYMinEnabled () const
void setGridXAxis (int axis)
int gridXAxis () const
void setGridYAxis (int axis)
int gridYAxis () const
void setGridPen (const QPen &p)
void setGridMajPen (const QPen &p)
const QPen & gridMajPen () const
void setGridMinPen (const QPen &p)
const QPen & gridMinPen () const
QwtPlotGrid & grid ()
const QwtPlotGrid & grid () const
void setAxisAutoScale (int axis)
bool axisAutoScale (int axis) const
void enableAxis (int axis, bool tf=TRUE)
bool axisEnabled (int axis) const
void changeAxisOptions (int axis, int opt, bool value)
void setAxisOptions (int axis, int opt)
int axisOptions (int axis) const
void setAxisFont (int axis, const QFont &f)
QFont axisFont (int axis) const
void setAxisMargins (int axis, double mlo, double mhi)
bool axisMargins (int axis, double &mlo, double &mhi) const
void setAxisScale (int axis, double min, double max, double step=0)
void setAxisScaleDraw (int axis, QwtScaleDraw *)
const QwtScaleDiv * axisScale (int axis) const
const QwtScaleDraw * axisScaleDraw (int axis) const
const QwtScale * axis (int axis) const
void setAxisLabelFormat (int axis, char f, int prec, int fieldwidth=0)
void axisLabelFormat (int axis, char &f, int &prec, int &fieldwidth) const
void setAxisLabelAlignment (int axis, int alignment)
void setAxisLabelRotation (int axis, double rotation)
void setAxisTitle (int axis, const QString &t)
QString axisTitle (int axis) const
void setAxisTitleFont (int axis, const QFont &f)
QFont axisTitleFont (int axis) const
void setAxisTitleAlignment (int axis, int align)
int axisTitleAlignment (int axis) const
void setAxisMaxMinor (int axis, int maxMinor)
int axisMaxMajor (int axis) const
void setAxisMaxMajor (int axis, int maxMajor)
int axisMaxMinor (int axis) const
void setAxisReference (int axis, double value)
double axisReference (int axis) const
long insertMarker (QwtPlotMarker *)
long insertMarker (const QString &label=QString::null, int xAxis=xBottom, int yAxis=yLeft)
long insertLineMarker (const QString &label, int axis)
QwtPlotMarker * marker (long key)
const QwtPlotMarker * marker (long key) const
long closestMarker (int xpos, int ypos, int &dist) const
QwtArray< long > markerKeys () const
bool setMarkerXAxis (long key, int axis)
int markerXAxis (long key) const
bool setMarkerYAxis (long key, int axis)
int markerYAxis (long key) const
bool setMarkerPos (long key, double xval, double yVal)
bool setMarkerXPos (long key, double val)
bool setMarkerYPos (long key, double val)
void markerPos (long key, double &mx, double &my) const
bool setMarkerFont (long key, const QFont &f)
QFont markerFont (long key) const
bool setMarkerPen (long key, const QPen &p)
bool setMarkerLabel (long key, const QString &text, const QFont &font=QFont(), const QColor &color=QColor(), const QPen &pen=QPen(Qt::NoPen), const QBrush &brush=QBrush(Qt::NoBrush))
bool setMarkerLabelText (long key, const QString &text)
const QString markerLabel (long key) const
bool setMarkerLabelAlign (long key, int align)
int markerLabelAlign (long key) const
bool setMarkerLabelPen (long key, const QPen &p)
QPen markerLabelPen (long key) const
bool setMarkerLinePen (long key, const QPen &p)
QPen markerLinePen (long key) const
bool setMarkerLineStyle (long key, QwtMarker::LineStyle st)
QwtMarker::LineStyle markerLineStyle (long key) const
bool setMarkerSymbol (long key, const QwtSymbol &s)
QwtSymbol markerSymbol (long key) const
void setAutoLegend (bool enabled)
bool autoLegend () const
void enableLegend (bool tf, long curveKey=-1)
bool legendEnabled (long curveKey) const
void setLegendPosition (Position pos, double ratio)
void setLegendPosition (Position pos)
Position legendPosition () const
void setLegendPos (int pos, double ratio=0.0)
int legendPos () const
void setLegendFont (const QFont &f)
const QFont legendFont () const
void setLegendFrameStyle (int st)
int legendFrameStyle () const
QwtLegend * legend ()
const QwtLegend * legend () const
void setLegendDisplayPolicy (QwtLegend::LegendDisplayPolicy, int mode=-1)
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual bool event (QEvent *)

  Protected Slots
virtual void lgdClicked ()

  Protected Member Functions
void autoRefresh ()
virtual void drawCanvas (QPainter *)
virtual void drawCanvasItems (QPainter *, const QRect &, const QwtArray< QwtDiMap > &, const QwtPlotPrintFilter &) const
virtual void drawContents (QPainter *p)
virtual void updateTabOrder ()
void updateAxes ()
void updateLayout ()
virtual void resizeEvent (QResizeEvent *e)
virtual void insertLegendItem (long curveKey)
virtual void updateLegendItem (long curveKey)
virtual void printLegendItem (QPainter *, const QWidget *, const QRect &) const
void updateLegendItem (const QwtPlotCurve *, QwtLegendItem *)
virtual void printTitle (QPainter *, const QRect &) const
virtual void printScale (QPainter *, int axis, int startDist, int endDist, int baseDist, const QRect &) const
virtual void printCanvas (QPainter *, const QRect &, const QwtArray< QwtDiMap > &, const QwtPlotPrintFilter &) const
virtual void printLegend (QPainter *, const QRect &) const

  Static Protected Member Functions
bool axisValid (int axis)

Member Enumeration Documentation

  enum QwtPlot::Axis

Axis index.

Definition at line 129 of file qwt_plot.h.

  enum QwtPlot::Position

Position.

Definition at line 136 of file qwt_plot.h.

Referenced by legendPosition(), and setLegendPos().

Constructor & Destructor Documentation

  QwtPlot::QwtPlot (QWidget * parent = 0, const char * name = 0)

Constructor.

Parameters:
    parent Parent widget
    name Widget name

Definition at line 34 of file qwt_plot.cpp.

  QwtPlot::QwtPlot (const QString & title, QWidget * parent = 0, const char * name = 0)

Constructor.

Parameters:
    title Title text
    parent Parent widget
    name Widget name

Definition at line 47 of file qwt_plot.cpp.

  QwtPlot::~QwtPlot () [virtual]

Destructor.

Definition at line 54 of file qwt_plot.cpp.

Member Function Documentation

  bool QwtPlot::autoLegend () const

Returns:
    TRUE if the autoLegend option is set.

Definition at line 973 of file qwt_plot.cpp.

  void QwtPlot::autoRefresh () [protected]

Replots the plot if QwtPlot::autoReplot() is TRUE.

Definition at line 168 of file qwt_plot.cpp.

References replot().

Referenced by changeAxisOptions(), insertMarker(), QwtPlotItem::itemChanged(), removeCurve(), removeCurves(), removeMarker(), removeMarkers(), setAxisAutoScale(), setAxisMargins(), setAxisMaxMajor(), setAxisMaxMinor(), setAxisOptions(), setAxisReference(), setAxisScale(), and setAxisScaleDraw().

  bool QwtPlot::autoReplot () const

Returns:
    TRUE if the autoReplot option is set.

Definition at line 196 of file qwt_plot.cpp.

Referenced by replot().

  const QwtScale * QwtPlot::axis (int axis) const

Returns:
    specified axis, or NULL if the axis is not enabled.

Parameters:
    axis axis index

Definition at line 18 of file qwt_plot_axis.cpp.

References axisEnabled().

Referenced by closestCurve(), closestMarker(), QwtPlotLayout::minimumSizeHint(), and print().

  bool QwtPlot::axisAutoScale (int axis) const

Returns:
    TRUE if autoscaling is enabled

Parameters:
    axis axis index

Definition at line 27 of file qwt_plot_axis.cpp.

References QwtAutoScale::autoScale(), and axisValid().

  bool QwtPlot::axisEnabled (int axis) const

Returns:
    TRUE if a specified axis is enabled

Parameters:
    axis axis index

Definition at line 40 of file qwt_plot_axis.cpp.

References axisValid().

Referenced by axis(), canvasMap(), print(), and QwtPlotPicker::QwtPlotPicker().

  QFont QwtPlot::axisFont (int axis) const

Returns:
    the font of the scale labels for a specified axis

Parameters:
    axis axis index

Definition at line 52 of file qwt_plot_axis.cpp.

References axisValid().

  void QwtPlot::axisLabelFormat (int axis, char & f, int & prec, int & fieldwidth) const

Returns:
    the number format for the major scale labels of a specified axis

Parameters:
    axis axis index

Return values:
    f format character
    prec precision
    fieldwidth minimum fieldwidth

See also:
    QString::sprintf in the Qt manual

Definition at line 170 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::labelFormat().

Referenced by QwtPlotZoomer::minZoomSize().

  bool QwtPlot::axisMargins (int axis, double & mlo, double & mhi) const

Determine the scale margins for a specified axis.

Parameters:
    axis axis index

Return values:
    mlo Margin at the lower limit
    mhi Margin at the upper limit

See also:
    QwtAutoScale::margins()

Definition at line 68 of file qwt_plot_axis.cpp.

References axisValid(), and QwtAutoScale::loMargin().

  int QwtPlot::axisMaxMajor (int axis) const

Returns:
    the maximum number of major ticks for a specified axis

Parameters:
    axis axis index

Definition at line 86 of file qwt_plot_axis.cpp.

References axisValid(), and QwtAutoScale::maxMajor().

  int QwtPlot::axisMaxMinor (int axis) const

Returns:
    the maximum number of minor ticks for a specified axis

Parameters:
    axis axis index

Definition at line 98 of file qwt_plot_axis.cpp.

References axisValid(), and QwtAutoScale::maxMinor().

  int QwtPlot::axisOptions (int axis) const

Returns:
    the autoscaling options of a specified axis

Parameters:
    axis axis index

See also:
    QwtAutoScale::options

Definition at line 111 of file qwt_plot_axis.cpp.

References axisValid(), and QwtAutoScale::options().

  double QwtPlot::axisReference (int axis) const

The reference value is needed if the autoscaling options QwtAutoScale::Symmetric or QwtAutoScale::IncludeRef are set.

Returns:
    the reference value of an axis

Parameters:
    axis axis index

See also:
    QwtAutoScale, QwtPlot::setAxisOptions

Definition at line 127 of file qwt_plot_axis.cpp.

References axisValid(), and QwtAutoScale::reference().

  const QwtScaleDiv * QwtPlot::axisScale (int axis) const

Returns:
    the scale division of a specified axis

Parameters:
    axis axis index

See also:
    QwtScaleDiv

Definition at line 140 of file qwt_plot_axis.cpp.

References axisValid(), and QwtAutoScale::scaleDiv().

Referenced by QwtPlotPicker::scaleRect().

  const QwtScaleDraw * QwtPlot::axisScaleDraw (int axis) const

Returns:
    the scale draw of a specified axis

Parameters:
    axis axis index

Returns:
    specified scaleDraw for axis, or NULL if axis is invalid.

See also:
    QwtScaleDraw

Definition at line 154 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::scaleDraw().

  QString QwtPlot::axisTitle (int axis) const

Returns:
    the title of a specified axis

Parameters:
    axis axis index

Definition at line 189 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::title().

  int QwtPlot::axisTitleAlignment (int axis) const

Returns:
    the title alignment of a specified axis

Parameters:
    axis axis index

See also:
    QwtPlot::setAxisTitleAlignment

Definition at line 214 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::titleAlignment().

  QFont QwtPlot::axisTitleFont (int axis) const

Returns:
    the title font of a specified axis

Parameters:
    axis axis index

Definition at line 201 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::titleFont().

  bool QwtPlot::axisValid (int axis) [static, protected]

Returns:
    TRUE if the specified axis exists, otherwise FALSE

Parameters:
    axis axis index

Definition at line 911 of file qwt_plot.cpp.

Referenced by axisAutoScale(), axisEnabled(), axisFont(), axisLabelFormat(), axisMargins(), axisMaxMajor(), axisMaxMinor(), axisOptions(), axisReference(), axisScale(), axisScaleDraw(), axisTitle(), axisTitleAlignment(), axisTitleFont(), changeAxisOptions(), enableAxis(), invTransform(), setAxisAutoScale(), setAxisFont(), setAxisLabelAlignment(), setAxisLabelFormat(), setAxisLabelRotation(), setAxisMargins(), setAxisMaxMajor(), setAxisMaxMinor(), setAxisOptions(), setAxisReference(), setAxisScale(), setAxisScaleDraw(), setAxisTitle(), setAxisTitleAlignment(), setAxisTitleFont(), and transform().

  const QwtPlotCanvas * QwtPlot::canvas () const

Returns:
    the plot's canvas

Definition at line 299 of file qwt_plot.cpp.

  QwtPlotCanvas * QwtPlot::canvas ()

Returns:
    the plot's canvas

Definition at line 291 of file qwt_plot.cpp.

Referenced by canvasBackground(), canvasLineWidth(), drawCurve(), QwtPlotLayout::minimumSizeHint(), setCanvasBackground(), and setCanvasLineWidth().

  const QColor & QwtPlot::canvasBackground () const

Nothing else than: canvas()->palette().color( QPalette::Normal, QColorGroup::Background);

Returns:
    the background color of the plotting area.

Definition at line 771 of file qwt_plot.cpp.

References canvas().

Referenced by QwtPlotPrintFilter::apply(), and printCanvas().

  int QwtPlot::canvasLineWidth () const

Nothing else than: canvas()->lineWidth(), left for compatibility only.

Returns:
    the border width of the plotting area

Definition at line 793 of file qwt_plot.cpp.

References canvas().

  QwtDiMap QwtPlot::canvasMap (int axis) const

Parameters:
    axis Axis

Returns:
    Map for the axis on the canvas. With this map pixel coordinates can translated to plot coordinates and vice versa.

See also:
    QwtDiMap, QwtPlot::transform, QwtPlot::invTransform

Definition at line 675 of file qwt_plot.cpp.

References axisEnabled(), QwtPlotLayout::canvasMargin(), QwtScale::endBorderDist(), QwtScaleDiv::hBound(), QwtScaleDiv::lBound(), QwtScaleDiv::logScale(), margin(), plotLayout(), QwtAutoScale::scaleDiv(), QwtDiMap::setDblRange(), QwtDiMap::setIntRange(), and QwtScale::startBorderDist().

Referenced by closestCurve(), closestMarker(), drawCanvas(), drawCurve(), QwtPlotPicker::invTransform(), invTransform(), QwtPlotPicker::transform(), and transform().

  void QwtPlot::changeAxisOptions (int axis, int opt, bool value)

Change specified autoscaling options of an axis.

Parameters:
    axis axis index
    opt Set of or'ed options
    value Value to be assigned to all the specified options (TRUE or FALSE)

See also:
    QwtAutoScale::changeOptions

Definition at line 229 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::changeOptions().

  void QwtPlot::clear () [slot]

Remove all curves and markers.

Definition at line 932 of file qwt_plot.cpp.

References QwtLegend::clear().

  long QwtPlot::closestCurve (int xpos, int ypos, int & dist, double & xval, double & yval, int & index) const

Find the curve which is closest to a point in the plotting area.

Determines the position and index of the closest data point.

Parameters:
    xpos
    ypos coordinates of a point in the plotting region

Return values:
    xval .br yval values of the closest point in the curve's data array
    dist -- distance in points between (xpos, ypos) and the closest data point
    index -- index of the closest point in the curve's data array

Returns:
    Key of the closest curve or 0 if no curve was found.

Definition at line 50 of file qwt_plot_curve.cpp.

References axis(), canvasMap(), curveIterator(), QwtCurve::dataSize(), qwtSqr(), QwtCurve::x(), QwtPlotMappedItem::xAxis(), QwtDiMap::xTransform(), QwtCurve::y(), and QwtPlotMappedItem::yAxis().

  long QwtPlot::closestCurve (int xpos, int ypos, int & dist) const

Find the curve which is closest to a specified point in the plotting area.

Parameters:
    xpos
    ypos position in the plotting region

Return values:
    dist distance in points between (xpos, ypos) and the closest data point

Returns:
    Key of the closest curve or 0 if no curve was found.

Definition at line 30 of file qwt_plot_curve.cpp.

  long QwtPlot::closestMarker (int xpos, int ypos, int & dist) const

Find the marker which is closest to a given point.

Parameters:
    xpos .br ypos coordinates of a point in the plotting region

Return values:
    dist Distance in points between the marker and the specified point.

Returns:
    Key of the closest marker or 0 if no marker was found

Definition at line 29 of file qwt_plot_marker.cpp.

References axis(), canvasMap(), QwtMarker::lineStyle(), markerIterator(), qwtSqr(), QwtSymbol::style(), QwtMarker::symbol(), QwtPlotMappedItem::xAxis(), QwtDiMap::xTransform(), QwtPlotMarker::xValue(), QwtPlotMappedItem::yAxis(), and QwtPlotMarker::yValue().

  const QwtPlotCurve * QwtPlot::curve (long key) const

Find and return an existing curve.

Parameters:
    key Key of the curve

Returns:
    The curve for the given key or 0 if key is not valid.

Definition at line 307 of file qwt_plot_curve.cpp.

  QwtPlotCurve * QwtPlot::curve (long key)

Find and return an existing curve.

Parameters:
    key Key of the curve

Returns:
    The curve for the given key or 0 if key is not valid.

Definition at line 297 of file qwt_plot_curve.cpp.

Referenced by drawCanvasItems(), drawCurve(), enableLegend(), insertCurve(), and updateLegendItem().

  double QwtPlot::curveBaseline (long key) const

Return the baseline offset for a specified curve.

Parameters:
    key curve key

Returns:
    Baseline offset of the specified curve, or 0 if the curve doesn't exist

See also:
    setCurveBaseline()

Definition at line 626 of file qwt_plot_curve.cpp.

References QwtCurve::baseline().

  QBrush QwtPlot::curveBrush (long key) const

Returns:
    the pen of the curve indexed by key

Parameters:
    key Key of the curve

See also:
    QwtPlot::setCurveBrush(), QwtCurve::setBrush()

Definition at line 124 of file qwt_plot_curve.cpp.

References QwtCurve::brush().

  QwtPlotCurveIterator QwtPlot::curveIterator () const

Return an iterator for the plot curves.

Definition at line 16 of file qwt_plot_curve.cpp.

Referenced by closestCurve(), curveKeys(), drawCanvasItems(), enableLegend(), setLegendDisplayPolicy(), and updateAxes().

  QwtArray< long > QwtPlot::curveKeys () const

Returns:
    an array containing the keys of all curves

Definition at line 162 of file qwt_plot_curve.cpp.

References curveIterator().

  int QwtPlot::curveOptions (long key) const

Returns:
    the drawing options of the curve indexed by key

Parameters:
    key Key of the curve

Definition at line 133 of file qwt_plot_curve.cpp.

References QwtCurve::options().

  QPen QwtPlot::curvePen (long key) const

Returns:
    the brush of the curve indexed by key

Parameters:
    key Key of the curve

Definition at line 113 of file qwt_plot_curve.cpp.

References QwtCurve::pen().

  int QwtPlot::curveSplineSize (long key) const

Returns:
    the spline size of the curve indexed by key

Parameters:
    key Key of the curve

Definition at line 143 of file qwt_plot_curve.cpp.

References QwtCurve::splineSize().

  int QwtPlot::curveStyle (long key) const

Returns:
    the style of the curve indexed by key

Parameters:
    key Key of the curve

See also:
    setCurveStyle()

Definition at line 91 of file qwt_plot_curve.cpp.

References QwtCurve::style().

  QwtSymbol QwtPlot::curveSymbol (long key) const

the symbol of the curve indexed by key

Parameters:
    key Key of the curve

Returns:
    The symbol of the specified curve. If the key is invalid, a symbol of type 'NoSymbol'.

Definition at line 103 of file qwt_plot_curve.cpp.

References QwtCurve::symbol().

  QString QwtPlot::curveTitle (long key) const

Returns:
    the title of the curve indexed by key

Parameters:
    key Key of the curve

Definition at line 153 of file qwt_plot_curve.cpp.

References QwtCurve::title().

  int QwtPlot::curveXAxis (long key) const

Return the index of the x axis to which a curve is mapped.

Parameters:
    key Key of the curve

Returns:
    x axis of the curve or -1 if the key is invalid.

Definition at line 180 of file qwt_plot_curve.cpp.

References QwtPlotMappedItem::xAxis().

  int QwtPlot::curveYAxis (long key) const

the index of the y axis to which a curve is mapped

Parameters:
    key Key of the curve

Returns:
    y axis of the curve or -1 if the key is invalid.

Definition at line 192 of file qwt_plot_curve.cpp.

References QwtPlotMappedItem::yAxis().

  void QwtPlot::drawCanvas (QPainter * painter) [protected, virtual]

Redraw the canvas.

Parameters:
    painter Painter used for drawing

Warning:
    drawCanvas calls drawCanvasItems what is also used for printing. Applications that like to add individual plot items better overload QwtPlot::drawCanvasItems

See also:
    QwtPlot::drawCanvasItems

Definition at line 567 of file qwt_plot.cpp.

References canvasMap(), and drawCanvasItems().

  void QwtPlot::drawCanvasItems (QPainter * painter, const QRect & rect, const QwtArray< QwtDiMap > & map, const QwtPlotPrintFilter & pfilter) const [protected, virtual]

Redraw the canvas items.

Parameters:
    painter Painter used for drawing
    rect Bounding rectangle where to paint
    map QwtPlot::axisCnt maps, mapping between plot and paint device coordinates
    pfilter Plot print filter

Definition at line 585 of file qwt_plot.cpp.

References curve(), curveIterator(), QwtMarker::draw(), QwtCurve::draw(), QwtGrid::draw(), QwtPlotItem::enabled(), marker(), markerIterator(), QwtPlotPrintFilter::options(), QwtPlotMappedItem::xAxis(), QwtPlotMarker::xValue(), QwtPlotMappedItem::yAxis(), and QwtPlotMarker::yValue().

Referenced by drawCanvas(), and printCanvas().

  void QwtPlot::drawContents (QPainter * p) [protected, virtual]

drawContents

Definition at line 548 of file qwt_plot.cpp.

  void QwtPlot::drawCurve (long key, int from = 0, int to = -1)

Draw a set of points of a curve. When observing an measurement while it is running, new points have to be added to an existing curve. drawCurve can be used to display them avoiding a complete redraw of the canvas.

Parameters:
    key curve key
    from index of the first point to be painted
    to index of the last point to be painted. If to < 0 the curve will be painted to its last point.

See also:
    QwtCurve::draw

Definition at line 641 of file qwt_plot.cpp.

References QwtPlotCanvas::cache(), QwtPlotCanvas::cacheMode(), canvas(), canvasMap(), curve(), QwtCurve::draw(), QwtPlotMappedItem::xAxis(), and QwtPlotMappedItem::yAxis().

  void QwtPlot::enableAxis (int axis, bool tf = TRUE)

Enable or disable a specified axis.

When an axis is disabled, this only means that it is not visible on the screen. Curves, markers and can be attached to disabled axes, and transformation of screen coordinates into values works as normal.

Only xBottom and yLeft are enabled by default.

Parameters:
    axis axis index
    tf TRUE (enabled) or FALSE (disabled)

Definition at line 251 of file qwt_plot_axis.cpp.

References axisValid(), and updateLayout().

  void QwtPlot::enableGridX (bool tf = TRUE)

Enable or disable vertical gridlines.

Parameters:
    tf Enable (TRUE) or disable (FALSE). Defaults to TRUE.

Definition at line 32 of file qwt_plot_grid.cpp.

References QwtGrid::enableX().

  void QwtPlot::enableGridXMin (bool tf = TRUE)

Enable or disable vertical gridlines for the minor scale marks.

Parameters:
    tf enable (TRUE) or disable (FALSE). Defaults to TRUE.

Definition at line 51 of file qwt_plot_grid.cpp.

References QwtGrid::enableXMin().

  void QwtPlot::enableGridY (bool tf = TRUE)

Enable or disable horizontal gridlines.

Parameters:
    tf Enable (TRUE) or disable (FALSE). Defaults to TRUE.

Definition at line 42 of file qwt_plot_grid.cpp.

References QwtGrid::enableY().

  void QwtPlot::enableGridYMin (bool tf = TRUE)

Enable or disable horizontal gridlines for the minor scale marks.

Parameters:
    tf enable (TRUE) or disable (FALSE). Defaults to TRUE.

Definition at line 60 of file qwt_plot_grid.cpp.

References QwtGrid::enableYMin().

  void QwtPlot::enableLegend (bool enable, long curveKey = -1)

Enable or disable the legend.

Parameters:
    enable TRUE (enabled) or FALSE (disabled)
    curveKey Key of a existing curve. If curveKey < 0 the legends for all curves will be updated.

See also:
    QwtPlot::setAutoLegend()

    QwtPlot::setLegendPosition()

Definition at line 988 of file qwt_plot.cpp.

References QwtLegend::clear(), curve(), curveIterator(), QwtLegend::findItem(), insertLegendItem(), QwtLegend::itemCount(), and updateLayout().

  void QwtPlot::enableOutline (bool tf)

Enables or disables outline drawing.

Warning:
    Outlining functionality is obsolete: use QwtPlotPicker or QwtPlotZoomer.

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

Definition at line 814 of file qwt_plot.cpp.

References QwtPlotCanvas::enableOutline().

  void QwtPlot::enableXBottomAxis (bool b)

Designer API for enableAxis.

Definition at line 148 of file qwt_plot.h.

  void QwtPlot::enableXTopAxis (bool b)

Designer API for enableAxis.

Definition at line 152 of file qwt_plot.h.

  void QwtPlot::enableYLeftAxis (bool b)

Designer API for enableAxis.

Definition at line 160 of file qwt_plot.h.

  void QwtPlot::enableYRightAxis (bool b)

Designer API for enableAxis.

Definition at line 156 of file qwt_plot.h.

  bool QwtPlot::event (QEvent * e) [virtual]

Adds handling of QEvent::LayoutHint.

Definition at line 147 of file qwt_plot.cpp.

References updateLayout().

  const QwtPlotGrid & QwtPlot::grid () const

Return the canvas grid.

Definition at line 22 of file qwt_plot_grid.cpp.

  QwtPlotGrid & QwtPlot::grid ()

Return the canvas grid.

Definition at line 16 of file qwt_plot_grid.cpp.

  const QPen & QwtPlot::gridMajPen () const

Returns:
    pen of the major grid

See also:
    QwtPlot::setGridMajPen, QwtPlot::gridMinPen

Definition at line 181 of file qwt_plot_grid.cpp.

References QwtGrid::majPen().

  const QPen & QwtPlot::gridMinPen () const

Returns:
    pen of the minor grid

See also:
    QwtPlot::setGridMinPen, QwtPlot::gridMajPen

Definition at line 163 of file qwt_plot_grid.cpp.

References QwtGrid::minPen().

  int QwtPlot::gridXAxis () const

Returns:
    x-axis where the grid is attached to.

See also:
    QwtPlot::setGridXAxis

Definition at line 114 of file qwt_plot_grid.cpp.

References QwtPlotMappedItem::xAxis().

  bool QwtPlot::gridXEnabled () const

Returns:
    TRUE if the X major grid is enabled (visible), FALSE otherwise.

Definition at line 68 of file qwt_plot_grid.cpp.

References QwtGrid::xEnabled().

  bool QwtPlot::gridXMinEnabled () const

Returns:
    TRUE if the X minor grid is enabled (visible), FALSE otherwise.

Definition at line 76 of file qwt_plot_grid.cpp.

References QwtGrid::xMinEnabled().

  int QwtPlot::gridYAxis () const

Returns:
    y-axis where the grid is attached to.

See also:
    QwtPlot::setGridYAxis

Definition at line 136 of file qwt_plot_grid.cpp.

References QwtPlotMappedItem::yAxis().

  bool QwtPlot::gridYEnabled () const

Returns:
    TRUE if the Y major grid is enabled (visible), FALSE otherwise.

Definition at line 84 of file qwt_plot_grid.cpp.

References QwtGrid::yEnabled().

  bool QwtPlot::gridYMinEnabled () const

Returns:
    TRUE if the X minor grid is enabled (visible), FALSE otherwise.

Definition at line 92 of file qwt_plot_grid.cpp.

References QwtGrid::yMinEnabled().

  long QwtPlot::insertCurve (const QString & title, int xAxis = xBottom, int yAxis = yLeft)

Insert a new curve and return a unique key.

Parameters:
    title title of the new curve
    xAxis x axis to be attached. Defaults to xBottom.
    yAxis y axis to be attached. Defaults to yLeft.

Returns:
    The key of the new curve or 0 if no new key could be found or if no new curve could be allocated.

Definition at line 276 of file qwt_plot_curve.cpp.

References curve(), insertCurve(), QwtPlotMappedItem::setAxis(), and QwtCurve::setTitle().

  long QwtPlot::insertCurve (QwtPlotCurve * curve)

Insert a curve.

Parameters:
    curve Curve

Returns:
    The key of the new curve or 0 if no new key could be found or if no new curve could be allocated.

Definition at line 247 of file qwt_plot_curve.cpp.

References insertLegendItem(), QwtPlotItem::reparent(), and updateLayout().

Referenced by insertCurve().

  void QwtPlot::insertLegendItem (long curveKey) [protected, virtual]

Insert a QwtLegendItem for a specified curve.

In case of legend()->isReadOnly the item will be a QwtLegendLabel, otherwise a QwtLegendButton.

Parameters:
    curveKey curve key

See also:
    QwtLegendButton, QwtLegendItem, QwtLegend, updateLegendItem(), printLegendItem()

Definition at line 644 of file qwt_plot_curve.cpp.

References QwtLegend::contentsWidget(), QwtLegend::insertItem(), QwtLegend::isReadOnly(), lgdClicked(), and updateLegendItem().

Referenced by enableLegend(), and insertCurve().

  long QwtPlot::insertLineMarker (const QString & label, int axis)

This function is a shortcut to insert a horizontal or vertical line marker, dependent on the specified axis.

Parameters:
    label Label
    axis Axis to be attached

Returns:
    New key if the marker could be inserted, 0 if not.

Definition at line 113 of file qwt_plot_marker.cpp.

References insertMarker(), marker(), QwtPlotMappedItem::setAxis(), QwtMarker::setLabel(), QwtMarker::setLabelAlignment(), and QwtMarker::setLineStyle().

  long QwtPlot::insertMarker (const QString & label = QString::null, int xAxis = xBottom, int yAxis = yLeft)

Insert a new marker.

Parameters:
    label Label
    xAxis X axis to be attached
    yAxis Y axis to be attached

Returns:
    New key if the marker could be inserted, 0 if not.

Definition at line 156 of file qwt_plot_marker.cpp.

References insertMarker(), marker(), QwtPlotMappedItem::setAxis(), and QwtMarker::setLabel().

  long QwtPlot::insertMarker (QwtPlotMarker * marker)

Insert a new marker.

Parameters:
    marker Marker

Returns:
    New key if the marker could be inserted, 0 if not.

Definition at line 177 of file qwt_plot_marker.cpp.

References autoRefresh(), and QwtPlotItem::reparent().

Referenced by insertLineMarker(), and insertMarker().

  double QwtPlot::invTransform (int axis, int pos) const

Transform the x or y coordinate of a position in the drawing region into a value.

Parameters:
    axis axis index
    pos position

Warning:
    The position can be an x or a y coordinate, depending on the specified axis.

Definition at line 268 of file qwt_plot_axis.cpp.

References axisValid(), canvasMap(), and QwtDiMap::invTransform().

  const QwtLegend * QwtPlot::legend () const

Returns:
    the plot's legend

See also:
    insertLegendItem(), updateLegendItem(), printLegendItem()

Definition at line 282 of file qwt_plot.cpp.

  QwtLegend * QwtPlot::legend ()

Returns:
    the plot's legend

See also:
    insertLegendItem(), updateLegendItem(), printLegendItem()

Definition at line 273 of file qwt_plot.cpp.

Referenced by QwtPlotLayout::activate(), and QwtPlotLayout::minimumSizeHint().

  void QwtPlot::legendClicked (long key) [signal]

A signal which is emitted when legend()->isReadOnly() == FALSE and the user has clicked on a legend item,

Parameters:
    key Key of the curve corresponding to the selected legend item

Note:
    To enable clicks legend()->setReadOnly(FALSE) has to be set before the items have been inserted.

See also:
    QwtLegend::setReadOnly, QwtLegend::isReadOnly

Referenced by lgdClicked().

  bool QwtPlot::legendEnabled (long curveKey) const

Parameters:
    curveKey Curve key.

Returns:
    TRUE if legend is enabled, otherwise FALSE

Definition at line 1037 of file qwt_plot.cpp.

References QwtLegend::findItem().

  const QFont QwtPlot::legendFont () const

Returns:
    the font of the legend items

Definition at line 1180 of file qwt_plot.cpp.

  int QwtPlot::legendFrameStyle () const

Returns:
    the frame style of the legend

Definition at line 1172 of file qwt_plot.cpp.

  int QwtPlot::legendPos () const

Returns:
    position of the legend

See also:
    QwtPlot::setLegendPosition(), QwtPlotLayout::legendPosition()

Warning:
    This function is deprecated. Use QwtPlot::legendPosition().

Definition at line 1141 of file qwt_plot.cpp.

References QwtPlotLayout::legendPosition().

  QwtPlot::Position QwtPlot::legendPosition () const

Returns:
    position of the legend

See also:
    QwtPlot::setLegendPosition(), QwtPlotLayout::legendPosition()

Definition at line 1105 of file qwt_plot.cpp.

References QwtPlotLayout::legendPosition(), and Position.

  void QwtPlot::lgdClicked () [protected, virtual, slot]

Called internally when the legend has been clicked on. Emits a legendClicked() signal. Definition at line 921 of file qwt_plot.cpp.

References QwtLegend::key(), and legendClicked().

Referenced by insertLegendItem().

  int QwtPlot::margin () const

Returns:
    margin

See also:
    QwtPlot::setMargin(), QwtPlotLayout::margin(), QwtPlot::plotLayout()

Definition at line 742 of file qwt_plot.cpp.

References QwtPlotLayout::margin().

Referenced by canvasMap(), and print().

  const QwtPlotMarker * QwtPlot::marker (long key) const

Find and return an existing marker.

Parameters:
    key Key of the marker

Returns:
    The marker for the given key or 0 if key is not valid.

Definition at line 211 of file qwt_plot_marker.cpp.

  QwtPlotMarker * QwtPlot::marker (long key)

Find and return an existing marker.

Parameters:
    key Key of the marker

Returns:
    The marker for the given key or 0 if key is not valid.

Definition at line 200 of file qwt_plot_marker.cpp.

Referenced by drawCanvasItems(), insertLineMarker(), and insertMarker().

  QFont QwtPlot::markerFont (long key) const

Returns:
    the font of a marker

Definition at line 235 of file qwt_plot_marker.cpp.

References QwtMarker::font().

  QwtPlotMarkerIterator QwtPlot::markerIterator () const

Return an iterator for the plot curves.

Definition at line 17 of file qwt_plot_marker.cpp.

Referenced by closestMarker(), drawCanvasItems(), and markerKeys().

  QwtArray< long > QwtPlot::markerKeys () const

Returns:
    an array containing the keys of all markers

Definition at line 219 of file qwt_plot_marker.cpp.

References markerIterator().

  const QString QwtPlot::markerLabel (long key) const

Returns:
    a marker's label

Parameters:
    key Marker key

Definition at line 248 of file qwt_plot_marker.cpp.

References QwtMarker::label().

  int QwtPlot::markerLabelAlign (long key) const

Returns:
    a marker's label alignment

Parameters:
    key Marker key

Definition at line 261 of file qwt_plot_marker.cpp.

References QwtMarker::labelAlignment().

  QPen QwtPlot::markerLabelPen (long key) const

Returns:
    the pen of a marker's label

Parameters:
    key Marker key

Definition at line 274 of file qwt_plot_marker.cpp.

References QwtMarker::labelPen().

  QPen QwtPlot::markerLinePen (long key) const

Returns:
    a marker's line pen

Parameters:
    key Marker key

Definition at line 288 of file qwt_plot_marker.cpp.

References QwtMarker::linePen().

  QwtMarker::LineStyle QwtPlot::markerLineStyle (long key) const

Returns:
    a marker's line style

Parameters:
    key Marker key

Definition at line 302 of file qwt_plot_marker.cpp.

References QwtMarker::lineStyle().

  void QwtPlot::markerPos (long key, double & mx, double & my) const

Get the position of a marker.

Parameters:
    key Marker key

Return values:
    mx .br my Marker position

Definition at line 318 of file qwt_plot_marker.cpp.

References QwtPlotMarker::xValue(), and QwtPlotMarker::yValue().

  QwtSymbol QwtPlot::markerSymbol (long key) const

Returns:
    a marker's symbol

Parameters:
    key Marker key

Definition at line 337 of file qwt_plot_marker.cpp.

References QwtMarker::symbol().

  int QwtPlot::markerXAxis (long key) const

Returns:
    the x axis to which a marker is attached

Parameters:
    key Marker key

Definition at line 351 of file qwt_plot_marker.cpp.

References QwtPlotMappedItem::xAxis().

  int QwtPlot::markerYAxis (long key) const

Returns:
    the y axis to which a marker is attached

Parameters:
    key Marker key

Definition at line 366 of file qwt_plot_marker.cpp.

References QwtPlotMappedItem::yAxis().

  QSize QwtPlot::minimumSizeHint () const [virtual]

Return a minimum size hint.

Definition at line 343 of file qwt_plot.cpp.

References QwtPlotLayout::minimumSizeHint().

Referenced by sizeHint().

  bool QwtPlot::outlineEnabled () const

Returns:
    TRUE if the outline feature is enabled

Warning:
    Outlining functionality is obsolete: use QwtPlotPicker or QwtPlotZoomer.

Definition at line 876 of file qwt_plot.cpp.

References QwtPlotCanvas::outlineEnabled().

  const QPen & QwtPlot::outlinePen () const

Returns:
    the pen used to draw outlines

Warning:
    Outlining functionality is obsolete: use QwtPlotPicker or QwtPlotZoomer.

Definition at line 887 of file qwt_plot.cpp.

References QwtPlotCanvas::outlinePen().

  Qwt::Shape QwtPlot::outlineStyle () const

Returns:
    the outline style

Warning:
    Outlining functionality is obsolete: use QwtPlotPicker or QwtPlotZoomer.

See also:
    setOutlineStyle()

Definition at line 900 of file qwt_plot.cpp.

References QwtPlotCanvas::outlineStyle().

  const QwtPlotLayout * QwtPlot::plotLayout () const

Returns:
    the plot's layout

Definition at line 248 of file qwt_plot.cpp.

  QwtPlotLayout * QwtPlot::plotLayout ()

Returns:
    the plot's layout

Definition at line 240 of file qwt_plot.cpp.

Referenced by canvasMap(), and print().

  void QwtPlot::plotMouseMoved (const QMouseEvent & e) [signal]

A signal which is emitted when the mouse is moved in the plot canvas.

Warning:
    Canvas signals are obsolete: use QwtPlotPicker or QwtPlotZoomer.

The coordinates are pixel values referring to the plot canvas. They can be translated using the canvasMaps.

Parameters:
    e Mouse event object

See also:
    QwtPlot::canvasMap()

  void QwtPlot::plotMousePressed (const QMouseEvent & e) [signal]

A signal which is emitted when the mouse is pressed in the plot canvas.

Warning:
    Canvas signals are obsolete: use QwtPlotPicker or QwtPlotZoomer.

The coordinates are pixel values referring to the plot canvas. They can be translated using the canvasMaps.

Parameters:
    e Mouse event object

See also:
    QwtPlot::canvasMap()

  void QwtPlot::plotMouseReleased (const QMouseEvent & e) [signal]

A signal which is emitted when a mouse button has been released in the plot canvas.

Warning:
    Canvas signals are obsolete: use QwtPlotPicker or QwtPlotZoomer.

The coordinates are pixel values referring to the plot canvas. They can be translated using the canvasMaps.

Parameters:
    e Mouse event object, event coordinates referring to the plot canvas

See also:
    QwtPlot::canvasMap()

  void QwtPlot::print (QPainter * painter, const QRect & plotRect, const QwtPlotPrintFilter & pfilter = QwtPlotPrintFilter()) const [virtual]

Paint the plot into a given rectangle. Paint the contents of a QwtPlot instance into a given rectangle.

Parameters:
    painter Painter
    plotRect Bounding rectangle
    pfilter Print filter

See also:
    QwtPlotPrintFilter

Definition at line 95 of file qwt_plot_print.cpp.

References QwtPlotLayout::activate(), QwtPlotPrintFilter::apply(), axis(), axisEnabled(), QwtScale::baseLineDist(), QwtPlotLayout::canvasMargin(), QwtPlotLayout::canvasRect(), QwtScaleDiv::hBound(), QwtPlotLayout::invalidate(), QwtLegend::isEmpty(), QwtScaleDiv::lBound(), QwtPlotLayout::legendRect(), QwtScaleDiv::logScale(), margin(), QwtPainter::metricsMap(), QwtPlotPrintFilter::options(), plotLayout(), printCanvas(), printLegend(), printScale(), printTitle(), QwtPlotPrintFilter::reset(), QwtPainter::resetMetricsMap(), QwtAutoScale::scaleDiv(), QwtPlotLayout::scaleRect(), QwtScale::setBaselineDist(), QwtPainter::setMetricsMap(), QwtScale::startBorderDist(), and QwtPlotLayout::titleRect().

  void QwtPlot::print (QPaintDevice & paintDev, const QwtPlotPrintFilter & pfilter = QwtPlotPrintFilter()) const

Print the plot to a QPaintDevice (QPrinter) This function prints the contents of a QwtPlot instance to QPaintDevice object. The size is derived from its device metrics.

Parameters:
    paintDev device to paint on, often a printer
    pfilter print filter

See also:
    QwtPlot::print

    QwtPlotPrintFilter

Attention:
    Using a QPrinter in QPrinter::HighResolution mode may expose a bug in the QFontDatabase class in Qt-X11 and Qt-Embedded.

    The problem concerns the font metrics: the height and width of a font should measure 8 times more pixels on a 600 dpi paint device than on a 75 dpi paint device. High resolution print tests on a Mandrake-8.2 system with a 75 dpi screen show (test program available on request):

    •   Qt finds more fonts with the X Font Server enabled than disabled (use qtconfig). Enabling or disabling the font server has no consequences for the print quality.

    •   Qt-3.0.7 finds significantly more fonts than its successors and prints well.

    •   Qt-3.1.2 finds less fonts than Qt-3.0.7 with the X Font Server enabled and prints well.

    •   Qt-3.2.0 finds less fonts than Qt-3.0.7 and printing only works for rich text. All plain text is printed at 75 dpi instead of 600 dpi. Some standard X Window fonts as 'Helvetica [Adobe]' do not print well as rich text.

    •   Qt-3.2.1 finds a few more fonts than Qt-3.2.0 and some standard non-scalable X Window fonts as 'Helvetica [Adobe]' do not print well as rich and plain text.

    •   Qt-3.2.2 still has problems with the same fonts as Qt-3.2.1, but there is improvement (text printed with non-scalable X Windows fonts is barely readable and looks ugly, because Qt gets the font metrics wrong).

    •   Qt-3.2.3 prints well (but finds less fonts than Qt-3.0.7).

    Recommendations:

    •   If you can, upgrade Qt-3.2.x to Qt-3.2.3.

    •   If you cannot, patches for Qt-3.2.1 and Qt-3.2.2 are available on request.

    •   Do not use Qt-3.2.0.

    •   Do not use non-scalable fonts for printing, especially if you print to postscript files that are to be included in other documents.

Definition at line 72 of file qwt_plot_print.cpp.

  void QwtPlot::printCanvas (QPainter * painter, const QRect & canvasRect, const QwtArray< QwtDiMap > & map, const QwtPlotPrintFilter & pfilter) const [protected, virtual]

Print the canvas into a given rectangle.

Parameters:
    painter Painter
    map Maps mapping between plot and paint device coordinates
    canvasRect Bounding rectangle
    pfilter Print filter

See also:
    QwtPlotPrintFilter

Definition at line 446 of file qwt_plot_print.cpp.

References canvasBackground(), drawCanvasItems(), QwtPainter::drawRect(), QwtPainter::fillRect(), QwtPlotPrintFilter::options(), and QwtPainter::setClipRect().

Referenced by print().

  void QwtPlot::printLegend (QPainter * painter, const QRect & rect) const [protected, virtual]

Print the legend into a given rectangle.

Parameters:
    painter Painter
    rect Bounding rectangle

Definition at line 293 of file qwt_plot_print.cpp.

References QwtDynGridLayout::columnsForWidth(), QwtLegend::contentsWidget(), QwtLegend::isEmpty(), QwtDynGridLayout::iterator(), QwtDynGridLayout::layoutItems(), printLegendItem(), and QwtPainter::setClipRect().

Referenced by print().

  void QwtPlot::printLegendItem (QPainter * painter, const QWidget * w, const QRect & rect) const [protected, virtual]

Print the legend item into a given rectangle.

Parameters:
    painter Painter
    w Widget representing a legend item
    rect Bounding rectangle

Definition at line 337 of file qwt_plot_print.cpp.

References QwtLegendItem::drawItem().

Referenced by printLegend().

  void QwtPlot::printScale (QPainter * painter, int axis, int startDist, int endDist, int baseDist, const QRect & rect) const [protected, virtual]

Paint a scale into a given rectangle. Paint the scale into a given rectangle.

Parameters:
    painter Painter
    axis Axis
    startDist Start border distance
    endDist End border distance
    baseDist Base distance
    rect Bounding rectangle

Definition at line 367 of file qwt_plot_print.cpp.

References QwtScaleDraw::draw(), QwtScale::drawTitle(), QwtScaleDraw::length(), QwtScale::scaleDraw(), QwtScaleDraw::setGeometry(), QwtScaleDraw::x(), and QwtScaleDraw::y().

Referenced by print().

  void QwtPlot::printTitle (QPainter * painter, const QRect & rect) const [protected, virtual]

Print the title into a given rectangle.

Parameters:
    painter Painter
    rect Bounding rectangle

Definition at line 274 of file qwt_plot_print.cpp.

References QwtText::draw(), and QwtText::makeText().

Referenced by print().

  bool QwtPlot::removeCurve (long key) [slot]

remove the curve indexed by key

Parameters:
    key Key of the curve

Definition at line 317 of file qwt_plot_curve.cpp.

References autoRefresh(), QwtLegend::findItem(), and updateLayout().

  void QwtPlot::removeCurves () [slot]

Remove all curves.

Definition at line 941 of file qwt_plot.cpp.

References autoRefresh(), and QwtLegend::clear().

  bool QwtPlot::removeMarker (long key) [slot]

Remove the marker indexed by key.

Parameters:
    key unique key

Definition at line 380 of file qwt_plot_marker.cpp.

References autoRefresh().

  void QwtPlot::removeMarkers () [slot]

Remove all markers.

Definition at line 949 of file qwt_plot.cpp.

References autoRefresh().

  void QwtPlot::replot () [virtual, slot]

Redraw the plot.

If the autoReplot option is not set (which is the default) or if any curves are attached to raw data, the plot has to be refreshed explicitly in order to make changes visible.

See also:
    setAutoReplot()

Warning:
    Calls canvas()->repaint, take care of infinite recursions

Definition at line 368 of file qwt_plot.cpp.

References autoReplot(), QwtPlotCanvas::invalidateCache(), setAutoReplot(), and updateAxes().

Referenced by autoRefresh(), and QwtPlotZoomer::rescale().

  void QwtPlot::resizeEvent (QResizeEvent * e) [protected, virtual]

Resize and update internal layout.

Definition at line 352 of file qwt_plot.cpp.

References updateLayout().

  void QwtPlot::setAutoLegend (bool tf)

Set or reset the autoLegend option If the autoLegend option is set, a item will be added to the legend whenever a curve is inserted.

The autoLegend option is set to FALSE by default, which means that the user has to call enableLegend.

Parameters:
    tf TRUE or FALSE. Defaults to FALSE.

See also:
    QwtPlot::enableLegend()

Definition at line 965 of file qwt_plot.cpp.

  void QwtPlot::setAutoReplot (bool tf = TRUE)

Set or reset the autoReplot option If the autoReplot option is set, the plot will be updated implicitly by manipulating member functions. Since this may be time-consuming, it is recommended to leave this option switched off and call replot() explicitly if necessary.

The autoReplot option is set to FALSE by default, which means that the user has to call replot() in order to make changes visible.

Parameters:
    tf TRUE or FALSE. Defaults to TRUE.

See also:
    replot()

Definition at line 188 of file qwt_plot.cpp.

Referenced by replot().

  void QwtPlot::setAxisAutoScale (int axis)

Enable autoscaling for a specified axis.

This member function is used to switch back to autoscaling mode after a fixed scale has been set. Autoscaling is enabled by default.

Parameters:
    axis axis index

See also:
    QwtPlot::setAxisScale()

Definition at line 349 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setAutoScale().

  void QwtPlot::setAxisFont (int axis, const QFont & f)

Change the font of an axis.

Parameters:
    axis axis index
    f font

Warning:
    This function changes the font of the tick labels, not of the axis title.

Definition at line 300 of file qwt_plot_axis.cpp.

References axisValid().

  void QwtPlot::setAxisLabelAlignment (int axis, int alignment)

Change the alignment of the tick labels

Parameters:
    axis axis index
    alignment Or'd Qt::AlignmentFlags <see qnamespace.h>

See also:
    QwtScaleDraw::setLabelAlignment()

Definition at line 421 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::setLabelAlignment().

  void QwtPlot::setAxisLabelFormat (int axis, char f, int prec, int fieldwidth = 0)

Change the number format for the major scale of a selected axis

Parameters:
    axis axis index
    f format
    prec precision
    fieldwidth minimum fieldwidth

See also:
    QString::sprintf in the Qt manual

Definition at line 409 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::setLabelFormat().

  void QwtPlot::setAxisLabelRotation (int axis, double rotation)

Rotate all tick labels

Parameters:
    axis axis index
    rotation Angle in degrees. When changing the label rotation, the label alignment might be adjusted too.

See also:
    QwtScaleDraw::setLabelRotation(), QwtPlot::setAxisLabelAlignment

Definition at line 434 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::setLabelRotation().

  void QwtPlot::setAxisMargins (int axis, double mlo, double mhi)

Assign margins to a specified axis.

Parameters:
    axis axis index
    mlo margin at the lower end of the scale
    mhi margin at the upper end of the scale

Warning:
    If the scale is logarithmic, the margins are measured in decades

See also:
    QwtAutoScale::setMargins

Definition at line 315 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setMargins().

  void QwtPlot::setAxisMaxMajor (int axis, int maxMajor)

Set the maximum number of major scale intervals for a specified axis.

Parameters:
    axis axis index
    maxMajor maximum number of major steps

See also:
    QwtAutoScale::setMaxMajor

Definition at line 485 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setMaxMajor().

  void QwtPlot::setAxisMaxMinor (int axis, int maxMinor)

Set the maximum number of minor scale intervals for a specified axis.

Parameters:
    axis axis index
    maxMinor maximum number of minor steps

See also:
    QwtAutoScale::setMaxMinor

Definition at line 470 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setMaxMinor().

  void QwtPlot::setAxisOptions (int axis, int opt)

Reset scale options and set specified options for a specified axis.

Parameters:
    axis axis index
    opt set of options

See also:
    QwtAutoScale::setOptions

Definition at line 330 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setOptions().

  void QwtPlot::setAxisReference (int axis, double value)

Set a reference value for a specified axis.

The reference value is used by some autoscaling modes.

Parameters:
    axis axis index
    value reference value

See also:
    QwtAutoScale::setReference, QwtPlot::setAxisOptions()

Definition at line 502 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setReference().

  void QwtPlot::setAxisScale (int axis, double min, double max, double step = 0)

Disable autoscaling and specify a fixed scale for a selected axis.

Parameters:
    axis axis index
    min
    max minimum and maximum of the scale
    step Major step size. If step == 0, the step size is calculated automatically using the maxMajor setting.

See also:
    QwtPlot::setAxisMaxMajor()

Definition at line 367 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtAutoScale::setScale().

Referenced by QwtPlotZoomer::rescale().

  void QwtPlot::setAxisScaleDraw (int axis, QwtScaleDraw * scaleDraw)

Set a scale draw.

Parameters:
    axis axis index
    scaleDraw object responsible for drawing scales.

By passing scaleDraw it is possible to extend QwtScaleDraw functionality and let it take place in QwtPlot. Please note that scaleDraw has to be created with new and will be deleted by the corresponding QwtScale member ( like a child object ).

See also:
    QwtScaleDraw, QwtScale

Warning:
    The attributes of scaleDraw will be overwritten by those of the previous QwtScaleDraw.

Definition at line 392 of file qwt_plot_axis.cpp.

References autoRefresh(), axisValid(), and QwtScale::setScaleDraw().

  void QwtPlot::setAxisTitle (int axis, const QString & t)

Change the title of a specified axis.

Parameters:
    axis axis index
    t axis title

Definition at line 516 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::setTitle().

  void QwtPlot::setAxisTitleAlignment (int axis, int align)

Change the title alignment of a selected axis.

Parameters:
    axis axis index
    align or'd Qt::Alignment flags.

See also:
    QwtScale::setTitleAlignment

Definition at line 457 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::setTitleAlignment().

  void QwtPlot::setAxisTitleFont (int axis, const QFont & f)

Change the title font of a selected axis.

Parameters:
    axis axis index
    f font

Definition at line 445 of file qwt_plot_axis.cpp.

References axisValid(), and QwtScale::setTitleFont().

  void QwtPlot::setCanvasBackground (const QColor & c)

Change the background of the plotting area.

Sets c to QColorGroup::Background of all colorgroups of the palette of the canvas. Using canvas()->setPalette() is a more powerful way to set these colors.

Parameters:
    c new background color

Definition at line 755 of file qwt_plot.cpp.

References canvas().

Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset().

  void QwtPlot::setCanvasLineWidth (int w)

Change the border width of the plotting area Nothing else than canvas()->setLineWidth(w), left for compatibility only.

Parameters:
    w new border width

Definition at line 783 of file qwt_plot.cpp.

References canvas().

  bool QwtPlot::setCurveBaseline (long key, double ref)

Set the baseline for a specified curve.

The baseline is needed for the curve style QwtCurve::Sticks,

Parameters:
    key curve key
    ref baseline offset from zero

See also:
    QwtCurve::setBaseline

Returns:
    TRUE if the curve exists

Definition at line 609 of file qwt_plot_curve.cpp.

References QwtCurve::setBaseline().

  bool QwtPlot::setCurveBrush (long key, const QBrush & brush)

Assign a brush to a curve indexed by key The brush will be used to fill the area between the curve and the baseline.

Parameters:
    key Key of the curve
    brush new brush

Returns:
    TRUE if the curve exists

See also:
    QwtCurve::setBrush for further details.

    QwtPlot::brush(), QwtPlot::setCurveBaseline

Definition at line 362 of file qwt_plot_curve.cpp.

References QwtCurve::setBrush(), and updateLegendItem().

  bool QwtPlot::setCurveData (long key, const QwtData & data)

Initialize curve data with any QwtData object.

Parameters:
    key curve key
    data Data

Returns:
    TRUE if the curve exists

Definition at line 503 of file qwt_plot_curve.cpp.

References QwtCurve::setData().

  bool QwtPlot::setCurveData (long key, const QwtArray< QwtDoublePoint > & data)

Initialize curve data with a array of points (explicitly shared).

Parameters:
    key curve key
    data Data

Returns:
    TRUE if the curve exists

Definition at line 486 of file qwt_plot_curve.cpp.

References QwtCurve::setData().

  bool QwtPlot::setCurveData (long key, const QwtArray< double > & xData, const QwtArray< double > & yData)

Initialize curve data with x- and y-arrays (data is explicitly shared).

Parameters:
    key curve key
    xData array with x-values
    yData array with y-values

Returns:
    TRUE if the curve exists

Definition at line 468 of file qwt_plot_curve.cpp.

References QwtCurve::setData().

  bool QwtPlot::setCurveData (long key, const double * xData, const double * yData, int size)

Set curve data by copying x- and y-values from specified blocks. Contrary to QwtPlot::setCurveRawData, this function makes a 'deep copy' of the data.

Parameters:
    key curve key
    xData pointer to x values
    yData pointer to y values
    size size of xData and yData

Returns:
    TRUE if the curve exists

See also:
    setCurveRawData(), QwtCurve::setData

Definition at line 449 of file qwt_plot_curve.cpp.

References QwtCurve::setData().

  bool QwtPlot::setCurveOptions (long key, int opt)

Set the style options of a curve indexed by key.

Parameters:
    key The curve's key
    opt curve options

Returns:
    TRUE if the specified curve exists.

See also:
    QwtCurve::setOptions for a detailed description of valid options.

Definition at line 540 of file qwt_plot_curve.cpp.

References QwtCurve::setOptions().

  bool QwtPlot::setCurvePen (long key, const QPen & pen)

Assign a pen to a curve indexed by key.

Parameters:
    key Key of the curve
    pen new pen

Returns:
    TRUE if the curve exists

Definition at line 340 of file qwt_plot_curve.cpp.

References QwtCurve::setPen(), and updateLegendItem().

  bool QwtPlot::setCurveRawData (long key, const double * xData, const double * yData, int size)

Initialize the curve data by pointing to memory blocks which are not managed by QwtPlot.

Parameters:
    key Key of the curve
    xData pointer to x data
    yData pointer to y data
    size size of x and y

Returns:
    TRUE if the curve exists

Warning:
    setRawData is provided for efficiency. The programmer should not delete the data during the lifetime of the underlying QwtCPointerData class.

See also:
    QwtPlot::setCurveData(), QwtCurve::setRawData()

Definition at line 407 of file qwt_plot_curve.cpp.

References QwtCurve::setRawData().

  bool QwtPlot::setCurveSplineSize (long key, int s)

Set the number of interpolated points of a curve indexed by key.

Parameters:
    key key of the curve
    s size of the spline

Returns:
    TRUE if the curve exists

Definition at line 556 of file qwt_plot_curve.cpp.

References QwtCurve::setSplineSize().

  bool QwtPlot::setCurveStyle (long key, int s, int options = 0)

Change a curve's style.

Parameters:
    key Key of the curve
    s display style of the curve
    options style options

Returns:
    TRUE if the curve exists

See also:
    QwtCurve::setStyle() for a detailed description of valid styles.

Definition at line 521 of file qwt_plot_curve.cpp.

References QwtCurve::setStyle(), and updateLegendItem().

  bool QwtPlot::setCurveSymbol (long key, const QwtSymbol & symbol)

Assign a symbol to the curve indexed by key.

Parameters:
    key key of the curve
    symbol new symbol

Returns:
    TRUE if the curve exists

Definition at line 380 of file qwt_plot_curve.cpp.

References QwtCurve::setSymbol(), and updateLegendItem().

  bool QwtPlot::setCurveTitle (long key, const QString & title)

Assign a title to the curve indexed by key.

Parameters:
    key key of the curve
    title new title

Returns:
    TRUE if the curve exists

Definition at line 424 of file qwt_plot_curve.cpp.

References QwtCurve::setTitle(), and updateLegendItem().

  bool QwtPlot::setCurveXAxis (long key, int axis)

Attach a curve to an x axis.

Parameters:
    key key of the curve
    axis x axis to be attached

Returns:
    TRUE if the curve exists

Definition at line 573 of file qwt_plot_curve.cpp.

References QwtPlotMappedItem::setXAxis().

  bool QwtPlot::setCurveYAxis (long key, int axis)

Attach a curve to an y axis.

Parameters:
    key key of the curve
    axis y axis to be attached

Returns:
    TRUE if the curve exists

Definition at line 589 of file qwt_plot_curve.cpp.

References QwtPlotMappedItem::setYAxis().

  void QwtPlot::setGridMajPen (const QPen & p)

Change the pen for the major gridlines.

Parameters:
    p new pen

Definition at line 172 of file qwt_plot_grid.cpp.

References QwtGrid::setMajPen().

  void QwtPlot::setGridMinPen (const QPen & p)

Change the pen for the minor gridlines.

Parameters:
    p new pen

Definition at line 154 of file qwt_plot_grid.cpp.

References QwtGrid::setMinPen().

  void QwtPlot::setGridPen (const QPen & p)

Change the grid's pens for major and minor gridlines.

Parameters:
    p new pen

Definition at line 145 of file qwt_plot_grid.cpp.

References QwtGrid::setPen().

  void QwtPlot::setGridXAxis (int axis)

Attach the grid to an x axis.

Parameters:
    axis x axis to be attached

Definition at line 101 of file qwt_plot_grid.cpp.

References QwtPlotMappedItem::setXAxis(), and QwtGrid::setXDiv().

  void QwtPlot::setGridYAxis (int axis)

Attach the grid to an y axis.

Parameters:
    axis y axis to be attached

Definition at line 123 of file qwt_plot_grid.cpp.

References QwtPlotMappedItem::setYAxis(), and QwtGrid::setYDiv().

  void QwtPlot::setLegendDisplayPolicy (QwtLegend::LegendDisplayPolicy policy, int mode = -1)

Set the identifier display policy of the legend.

Parameters:
    policy new policy.
    mode new mode.

See also:
    QwtLegend::setDisplayPolicy, QwtLegend::LegendDisplayPolicy

Definition at line 1191 of file qwt_plot.cpp.

References curveIterator(), QwtLegend::setDisplayPolicy(), and updateLegendItem().

  void QwtPlot::setLegendFont (const QFont & f)

Change the font of the legend items.

Parameters:
    f new font

Definition at line 1152 of file qwt_plot.cpp.

References updateLayout().

  void QwtPlot::setLegendFrameStyle (int st)

Change the legend's frame style.

Parameters:
    st Frame Style. See Qt manual on QFrame.

Definition at line 1163 of file qwt_plot.cpp.

References updateLayout().

  void QwtPlot::setLegendPos (int pos, double ratio = 0.0)

Specify the position of the legend within the widget. If the position legend is QwtPlot::Left or QwtPlot::Right the legend will be organized in one column from top to down. Otherwise the legend items will be placed be placed in a table with a best fit number of columns from left to right.

Parameters:
    pos The legend's position. Valid values are QwtPlot::Left, QwtPlot::Right, QwtPlot::Top, QwtPlot::Bottom.
    ratio Ratio between legend and the bounding rect of title, canvas and axes. The legend will be shrinked if it would need more space than the given ratio. The ratio is limited to ]0.0 .. 1.0]. In case of <= 0.0 it will be reset to the default ratio. The default vertical/horizontal ratio is 0.33/0.5.

See also:
    QwtPlot::legendPosition(), QwtPlotLayout::setLegendPosition()

Warning:
    This function is deprecated. Use QwtPlot::setLegendPosition().

Definition at line 1131 of file qwt_plot.cpp.

References Position, and setLegendPosition().

  void QwtPlot::setLegendPosition (QwtPlot::Position pos)

Specify the position of the legend within the widget. If the position legend is QwtPlot::Left or QwtPlot::Right the legend will be organized in one column from top to down. Otherwise the legend items will be placed be placed in a table with a best fit number of columns from left to right.

Parameters:
    pos The legend's position. Valid values are QwtPlot::Left, QwtPlot::Right, QwtPlot::Top, QwtPlot::Bottom.

See also:
    QwtPlot::legendPosition(), QwtPlotLayout::setLegendPosition()

Definition at line 1096 of file qwt_plot.cpp.

References setLegendPosition().

  void QwtPlot::setLegendPosition (QwtPlot::Position pos, double ratio)

Specify the position of the legend within the widget. If the position legend is QwtPlot::Left or QwtPlot::Right the legend will be organized in one column from top to down. Otherwise the legend items will be placed be placed in a table with a best fit number of columns from left to right.

Parameters:
    pos The legend's position. Valid values are QwtPlot::Left, QwtPlot::Right, QwtPlot::Top, QwtPlot::Bottom.
    ratio Ratio between legend and the bounding rect of title, canvas and axes. The legend will be shrinked if it would need more space than the given ratio. The ratio is limited to ]0.0 .. 1.0]. In case of <= 0.0 it will be reset to the default ratio. The default vertical/horizontal ratio is 0.33/0.5.

See also:
    QwtPlot::legendPosition(), QwtPlotLayout::setLegendPosition()

Definition at line 1060 of file qwt_plot.cpp.

References QwtLegend::contentsWidget(), QwtPlotLayout::legendPosition(), QwtPlotLayout::setLegendPosition(), QwtDynGridLayout::setMaxCols(), updateLayout(), and updateTabOrder().

Referenced by setLegendPos(), and setLegendPosition().

  void QwtPlot::setMargin (int margin)

Change the margin of the plot. The margin is the space around all components.

Parameters:
    margin new margin

See also:
    QwtPlotLayout::setMargin(), QwtPlot::margin(), QwtPlot::plotLayout()

Definition at line 726 of file qwt_plot.cpp.

References QwtPlotLayout::margin(), QwtPlotLayout::setMargin(), and updateLayout().

  bool QwtPlot::setMarkerFont (long key, const QFont & f)

Specify a font for a marker's label.

Parameters:
    key Marker key
    f New font

Returns:
    TRUE if the specified marker exists

Definition at line 432 of file qwt_plot_marker.cpp.

References QwtMarker::setFont().

  bool QwtPlot::setMarkerLabel (long key, const QString & text, const QFont & font = QFont(), const QColor & color = QColor(), const QPen & pen = QPen(Qt::NoPen), const QBrush & brush = QBrush(Qt::NoBrush))

Set the marker label.

Parameters:
    key Marker key
    text the label text
    font the font of the label text
    color the color of the label text
    pen the pen of the bounding box of the label text
    brush the brush of the bounding box of the label text

Returns:
    TRUE if the specified marker exists

Definition at line 610 of file qwt_plot_marker.cpp.

References QwtMarker::setLabel().

  bool QwtPlot::setMarkerLabelAlign (long key, int align)

Specify the alignment of a marker's label.

The alignment determines the position of the label relative to the marker's position. The default setting is AlignCenter.

Parameters:
    key Marker key
    align Alignment: AlignLeft, AlignRight, AlignTop, AlignBottom, AlignHCenter, AlignVCenter, AlignCenter or a combination of them.

Returns:
    TRUE if the specified marker exists

Definition at line 633 of file qwt_plot_marker.cpp.

References QwtMarker::setLabelAlignment().

  bool QwtPlot::setMarkerLabelPen (long key, const QPen & p)

Specify a pen for a marker's label.

Parameters:
    key Marker key
    p Label pen

Returns:
    TRUE if the specified marker exists

Definition at line 651 of file qwt_plot_marker.cpp.

References QwtMarker::setLabelPen().

  bool QwtPlot::setMarkerLabelText (long key, const QString & text)

Assign a text to the label of a marker.

Parameters:
    key Marker key
    text Label text

Returns:
    TRUE if the specified marker exists

Definition at line 589 of file qwt_plot_marker.cpp.

References QwtMarker::setLabelText().

  bool QwtPlot::setMarkerLinePen (long key, const QPen & p)

Specify a pen for a marker's line.

Parameters:
    key Marker key
    p New pen

Returns:
    TRUE if the specified marker exists

Definition at line 451 of file qwt_plot_marker.cpp.

References QwtMarker::setLinePen().

  bool QwtPlot::setMarkerLineStyle (long key, QwtMarker::LineStyle st)

Specify the line style for a marker.

Parameters:
    key Marker key
    st Line style: QwtMarker::HLine, QwtMarker::VLine, QwtMarker::NoLine or a combination of them.

Returns:
    TRUE if the specified marker exists

Definition at line 473 of file qwt_plot_marker.cpp.

References QwtMarker::setLineStyle().

  bool QwtPlot::setMarkerPen (long key, const QPen & p)

Specify a pen for a marker's label.

Parameters:
    key Marker key
    p New pen

Returns:
    TRUE if the specified marker exists

Definition at line 491 of file qwt_plot_marker.cpp.

References QwtMarker::setLabelPen(), and QwtMarker::setLinePen().

  bool QwtPlot::setMarkerPos (long key, double xval, double yval)

Change the position of a marker.

Parameters:
    key Marker key
    xval
    yval Position of the marker in axis coordinates.

Returns:
    TRUE if the specified marker exists

Definition at line 513 of file qwt_plot_marker.cpp.

References QwtPlotMarker::setXValue(), and QwtPlotMarker::setYValue().

  bool QwtPlot::setMarkerSymbol (long key, const QwtSymbol & s)

Assign a symbol to a specified marker.

Parameters:
    key Marker key
    s new symbol

Returns:
    TRUE if the specified marker exists

Definition at line 571 of file qwt_plot_marker.cpp.

References QwtMarker::setSymbol().

  bool QwtPlot::setMarkerXAxis (long key, int axis)

Attach the marker to an x axis.

Returns:
    TRUE if the specified marker exists.

Definition at line 396 of file qwt_plot_marker.cpp.

References QwtPlotMappedItem::setXAxis().

  bool QwtPlot::setMarkerXPos (long key, double val)

Specify the X position of a marker.

Parameters:
    key Marker key
    val X position of the marker

Returns:
    TRUE if the specified marker exists

Definition at line 533 of file qwt_plot_marker.cpp.

References QwtPlotMarker::setXValue().

  bool QwtPlot::setMarkerYAxis (long key, int axis)

Attach the marker to a Y axis.

Parameters:
    key Marker key
    axis Axis to be attached

Returns:
    TRUE if the specified marker exists

Definition at line 414 of file qwt_plot_marker.cpp.

References QwtPlotMappedItem::setYAxis().

  bool QwtPlot::setMarkerYPos (long key, double val)

Specify the Y position of the marker.

Parameters:
    key Marker key
    val Y position of the marker

Returns:
    TRUE if the specified marker exists

Definition at line 552 of file qwt_plot_marker.cpp.

References QwtPlotMarker::setYValue().

  void QwtPlot::setOutlinePen (const QPen & pn)

Specify a pen for the outline.

Warning:
    Outlining functionality is obsolete: use QwtPlotPicker or QwtPlotZoomer.

Parameters:
    pn new pen

Definition at line 865 of file qwt_plot.cpp.

References QwtPlotCanvas::setOutlinePen().

  void QwtPlot::setOutlineStyle (Qwt::Shape os)

Specify the style of the outline.

Warning:
    Outlining functionality is obsolete: use QwtPlotPicker or QwtPlotZoomer.

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::Cross
        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:
    enableOutline()

Definition at line 852 of file qwt_plot.cpp.

References QwtPlotCanvas::setOutlineStyle().

  void QwtPlot::setTitle (const QString & t)

Change the plot's title.

Parameters:
    t new title

Definition at line 205 of file qwt_plot.cpp.

  void QwtPlot::setTitleFont (const QFont & f)

Change the title font.

Parameters:
    f new title font

Definition at line 224 of file qwt_plot.cpp.

  QSize QwtPlot::sizeHint () const [virtual]

Return sizeHint

See also:
    QwtPlot::minimumSizeHint()

Definition at line 309 of file qwt_plot.cpp.

References QwtScaleDiv::majCnt(), minimumSizeHint(), QwtScale::minimumSizeHint(), QwtScaleDraw::scaleDiv(), and QwtScale::scaleDraw().

  QString QwtPlot::title () const

Returns:
    the plot's title

Definition at line 214 of file qwt_plot.cpp.

  QFont QwtPlot::titleFont () const

Returns:
    the plot's title font

Definition at line 232 of file qwt_plot.cpp.

  const QLabel * QwtPlot::titleLabel () const

Returns:
    the plot's titel label.

Definition at line 264 of file qwt_plot.cpp.

  QLabel * QwtPlot::titleLabel ()

Returns:
    the plot's titel label.

Definition at line 256 of file qwt_plot.cpp.

Referenced by QwtPlotLayout::minimumSizeHint().

  int QwtPlot::transform (int axis, double value) const

Transform a value into a coordinate in the plotting region.

Parameters:
    axis axis index
    value value

Returns:
    X or y coordinate in the plotting region corresponding to the value.

Definition at line 284 of file qwt_plot_axis.cpp.

References axisValid(), canvasMap(), and QwtDiMap::transform().

  void QwtPlot::updateAxes () [protected]

Rebuild the scales and maps.

Definition at line 438 of file qwt_plot.cpp.

References QwtAutoScale::adjust(), QwtAutoScale::autoScale(), QwtCurve::boundingRect(), curveIterator(), QwtDoubleRect::isValid(), QwtScale::minBorderDist(), QwtAutoScale::reset(), QwtScale::setBorderDist(), QwtScale::setScaleDiv(), QwtGrid::setXDiv(), QwtGrid::setYDiv(), QwtDoubleRect::x1(), QwtDoubleRect::x2(), QwtPlotMappedItem::xAxis(), QwtDoubleRect::y1(), QwtDoubleRect::y2(), and QwtPlotMappedItem::yAxis().

Referenced by replot().

  void QwtPlot::updateLayout () [protected]

Adjust plot content to its current size.

See also:
    QwtPlot::resizeEvent

Definition at line 385 of file qwt_plot.cpp.

References QwtPlotLayout::activate(), QwtPlotLayout::canvasRect(), QwtLegend::itemCount(), QwtPlotLayout::legendRect(), QwtPlotLayout::scaleRect(), and QwtPlotLayout::titleRect().

Referenced by enableAxis(), enableLegend(), event(), insertCurve(), removeCurve(), resizeEvent(), setLegendFont(), setLegendFrameStyle(), setLegendPosition(), and setMargin().

  void QwtPlot::updateLegendItem (const QwtPlotCurve * curve, QwtLegendItem * item) [protected]

Update a liegen item for a specified curve

Parameters:
    curve Curve
    item Legend item

See also:
    QwtLegendButton, QwtLegend, insertLegendItem(), printLegendItem()

Definition at line 708 of file qwt_plot_curve.cpp.

References QwtLegend::displayPolicy(), QwtLegend::identifierMode(), QwtCurve::pen(), QwtLegendItem::setCurvePen(), QwtLegendItem::setIdentifierMode(), QwtLegendItem::setSymbol(), QwtLegendItem::setTitle(), QwtSymbol::style(), QwtCurve::style(), QwtCurve::symbol(), and QwtCurve::title().

  void QwtPlot::updateLegendItem (long curveKey) [protected, virtual]

Update the legend item of a specified curve

Parameters:
    curveKey curve key

See also:
    QwtLegendButton, QwtLegend, insertLegendItem(), printLegendItem()

Definition at line 669 of file qwt_plot_curve.cpp.

References curve(), and QwtLegend::findItem().

Referenced by insertLegendItem(), setCurveBrush(), setCurvePen(), setCurveStyle(), setCurveSymbol(), setCurveTitle(), and setLegendDisplayPolicy().

  void QwtPlot::updateTabOrder () [protected, virtual]

Update the focus tab order.

Definition at line 501 of file qwt_plot.cpp.

References QwtLegend::contentsWidget(), and QwtPlotLayout::legendPosition().

Referenced by setLegendPosition().

  bool QwtPlot::xBottomAxisEnabled () const

Designer API for axisEnabled.

Definition at line 150 of file qwt_plot.h.

  bool QwtPlot::xTopAxisEnabled () const

Designer API for axisEnabled.

Definition at line 154 of file qwt_plot.h.

  bool QwtPlot::yLeftAxisEnabled () const

Designer API for axisEnabled.

Definition at line 162 of file qwt_plot.h.

  bool QwtPlot::yRightAxisEnabled () const

Designer API for axisEnabled.

Definition at line 158 of file qwt_plot.h.

Author

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