.TH "QwtPlot" 3 "Wed Jan 2 2019" "Version 6.1.4" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPlot \- A 2-D plotting widget\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits QFrame, and \fBQwtPlotDict\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBAxis\fP { \fByLeft\fP, \fByRight\fP, \fBxBottom\fP, \fBxTop\fP, \fBaxisCnt\fP }" .br .RI "Axis index\&. " .ti -1c .RI "enum \fBLegendPosition\fP { \fBLeftLegend\fP, \fBRightLegend\fP, \fBBottomLegend\fP, \fBTopLegend\fP }" .br .in -1c .SS "Public Slots" .in +1c .ti -1c .RI "virtual void \fBreplot\fP ()" .br .RI "Redraw the plot\&. " .ti -1c .RI "void \fBautoRefresh\fP ()" .br .RI "Replots the plot if \fBautoReplot()\fP is \fCtrue\fP\&. " .in -1c .SS "Signals" .in +1c .ti -1c .RI "void \fBitemAttached\fP (\fBQwtPlotItem\fP *plotItem, bool on)" .br .ti -1c .RI "void \fBlegendDataChanged\fP (const QVariant &itemInfo, const QList< \fBQwtLegendData\fP > &data)" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtPlot\fP (QWidget *=NULL)" .br .RI "Constructor\&. " .ti -1c .RI "\fBQwtPlot\fP (const \fBQwtText\fP &\fBtitle\fP, QWidget *=NULL)" .br .RI "Constructor\&. " .ti -1c .RI "virtual \fB~QwtPlot\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "void \fBapplyProperties\fP (const QString &)" .br .ti -1c .RI "QString \fBgrabProperties\fP () const" .br .ti -1c .RI "void \fBsetAutoReplot\fP (bool=true)" .br .RI "Set or reset the autoReplot option\&. " .ti -1c .RI "bool \fBautoReplot\fP () const" .br .ti -1c .RI "void \fBsetPlotLayout\fP (\fBQwtPlotLayout\fP *)" .br .RI "Assign a new plot layout\&. " .ti -1c .RI "\fBQwtPlotLayout\fP * \fBplotLayout\fP ()" .br .ti -1c .RI "const \fBQwtPlotLayout\fP * \fBplotLayout\fP () const" .br .ti -1c .RI "void \fBsetTitle\fP (const QString &)" .br .ti -1c .RI "void \fBsetTitle\fP (const \fBQwtText\fP &)" .br .ti -1c .RI "\fBQwtText\fP \fBtitle\fP () const" .br .ti -1c .RI "\fBQwtTextLabel\fP * \fBtitleLabel\fP ()" .br .ti -1c .RI "const \fBQwtTextLabel\fP * \fBtitleLabel\fP () const" .br .ti -1c .RI "void \fBsetFooter\fP (const QString &)" .br .ti -1c .RI "void \fBsetFooter\fP (const \fBQwtText\fP &)" .br .ti -1c .RI "\fBQwtText\fP \fBfooter\fP () const" .br .ti -1c .RI "\fBQwtTextLabel\fP * \fBfooterLabel\fP ()" .br .ti -1c .RI "const \fBQwtTextLabel\fP * \fBfooterLabel\fP () const" .br .ti -1c .RI "void \fBsetCanvas\fP (QWidget *)" .br .RI "Set the drawing canvas of the plot widget\&. " .ti -1c .RI "QWidget * \fBcanvas\fP ()" .br .ti -1c .RI "const QWidget * \fBcanvas\fP () const" .br .ti -1c .RI "void \fBsetCanvasBackground\fP (const QBrush &)" .br .RI "Change the background of the plotting area\&. " .ti -1c .RI "QBrush \fBcanvasBackground\fP () const" .br .ti -1c .RI "virtual \fBQwtScaleMap\fP \fBcanvasMap\fP (int axisId) const" .br .ti -1c .RI "double \fBinvTransform\fP (int axisId, int pos) const" .br .ti -1c .RI "double \fBtransform\fP (int axisId, double value) const" .br .RI "Transform a value into a coordinate in the plotting region\&. " .ti -1c .RI "\fBQwtScaleEngine\fP * \fBaxisScaleEngine\fP (int axisId)" .br .ti -1c .RI "const \fBQwtScaleEngine\fP * \fBaxisScaleEngine\fP (int axisId) const" .br .ti -1c .RI "void \fBsetAxisScaleEngine\fP (int axisId, \fBQwtScaleEngine\fP *)" .br .ti -1c .RI "void \fBsetAxisAutoScale\fP (int axisId, bool on=true)" .br .RI "Enable autoscaling for a specified axis\&. " .ti -1c .RI "bool \fBaxisAutoScale\fP (int axisId) const" .br .ti -1c .RI "void \fBenableAxis\fP (int axisId, bool tf=true)" .br .RI "Enable or disable a specified axis\&. " .ti -1c .RI "bool \fBaxisEnabled\fP (int axisId) const" .br .ti -1c .RI "void \fBsetAxisFont\fP (int axisId, const QFont &)" .br .RI "Change the font of an axis\&. " .ti -1c .RI "QFont \fBaxisFont\fP (int axisId) const" .br .ti -1c .RI "void \fBsetAxisScale\fP (int axisId, double min, double max, double stepSize=0)" .br .RI "Disable autoscaling and specify a fixed scale for a selected axis\&. " .ti -1c .RI "void \fBsetAxisScaleDiv\fP (int axisId, const \fBQwtScaleDiv\fP &)" .br .RI "Disable autoscaling and specify a fixed scale for a selected axis\&. " .ti -1c .RI "void \fBsetAxisScaleDraw\fP (int axisId, \fBQwtScaleDraw\fP *)" .br .RI "Set a scale draw\&. " .ti -1c .RI "double \fBaxisStepSize\fP (int axisId) const" .br .RI "Return the step size parameter that has been set in setAxisScale\&. " .ti -1c .RI "\fBQwtInterval\fP \fBaxisInterval\fP (int axisId) const" .br .RI "Return the current interval of the specified axis\&. " .ti -1c .RI "const \fBQwtScaleDiv\fP & \fBaxisScaleDiv\fP (int axisId) const" .br .RI "Return the scale division of a specified axis\&. " .ti -1c .RI "const \fBQwtScaleDraw\fP * \fBaxisScaleDraw\fP (int axisId) const" .br .RI "Return the scale draw of a specified axis\&. " .ti -1c .RI "\fBQwtScaleDraw\fP * \fBaxisScaleDraw\fP (int axisId)" .br .RI "Return the scale draw of a specified axis\&. " .ti -1c .RI "const \fBQwtScaleWidget\fP * \fBaxisWidget\fP (int axisId) const" .br .ti -1c .RI "\fBQwtScaleWidget\fP * \fBaxisWidget\fP (int axisId)" .br .ti -1c .RI "void \fBsetAxisLabelAlignment\fP (int axisId, Qt::Alignment)" .br .ti -1c .RI "void \fBsetAxisLabelRotation\fP (int axisId, double rotation)" .br .ti -1c .RI "void \fBsetAxisTitle\fP (int axisId, const QString &)" .br .RI "Change the title of a specified axis\&. " .ti -1c .RI "void \fBsetAxisTitle\fP (int axisId, const \fBQwtText\fP &)" .br .RI "Change the title of a specified axis\&. " .ti -1c .RI "\fBQwtText\fP \fBaxisTitle\fP (int axisId) const" .br .ti -1c .RI "void \fBsetAxisMaxMinor\fP (int axisId, int maxMinor)" .br .ti -1c .RI "int \fBaxisMaxMinor\fP (int axisId) const" .br .ti -1c .RI "void \fBsetAxisMaxMajor\fP (int axisId, int maxMajor)" .br .ti -1c .RI "int \fBaxisMaxMajor\fP (int axisId) const" .br .ti -1c .RI "void \fBinsertLegend\fP (\fBQwtAbstractLegend\fP *, \fBLegendPosition\fP=\fBQwtPlot::RightLegend\fP, double ratio=\-1\&.0)" .br .RI "Insert a legend\&. " .ti -1c .RI "\fBQwtAbstractLegend\fP * \fBlegend\fP ()" .br .ti -1c .RI "const \fBQwtAbstractLegend\fP * \fBlegend\fP () const" .br .ti -1c .RI "void \fBupdateLegend\fP ()" .br .ti -1c .RI "void \fBupdateLegend\fP (const \fBQwtPlotItem\fP *)" .br .ti -1c .RI "virtual QSize \fBsizeHint\fP () const" .br .ti -1c .RI "virtual QSize \fBminimumSizeHint\fP () const" .br .RI "Return a minimum size hint\&. " .ti -1c .RI "virtual void \fBupdateLayout\fP ()" .br .RI "Adjust plot content to its current size\&. " .ti -1c .RI "virtual void \fBdrawCanvas\fP (QPainter *)" .br .ti -1c .RI "void \fBupdateAxes\fP ()" .br .RI "Rebuild the axes scales\&. " .ti -1c .RI "void \fBupdateCanvasMargins\fP ()" .br .RI "Update the canvas margins\&. " .ti -1c .RI "virtual void \fBgetCanvasMarginsHint\fP (const \fBQwtScaleMap\fP maps[], const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const" .br .RI "Calculate the canvas margins\&. " .ti -1c .RI "virtual bool \fBevent\fP (QEvent *)" .br .RI "Adds handling of layout requests\&. " .ti -1c .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)" .br .RI "Event filter\&. " .ti -1c .RI "virtual void \fBdrawItems\fP (QPainter *, const QRectF &, const \fBQwtScaleMap\fP maps[\fBaxisCnt\fP]) const" .br .ti -1c .RI "virtual QVariant \fBitemToInfo\fP (\fBQwtPlotItem\fP *) const" .br .RI "Build an information, that can be used to identify a plot item on the legend\&. " .ti -1c .RI "virtual \fBQwtPlotItem\fP * \fBinfoToItem\fP (const QVariant &) const" .br .RI "Identify the plot item according to an item info object, that has bee generated from \fBitemToInfo()\fP\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBresizeEvent\fP (QResizeEvent *e)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static bool \fBaxisValid\fP (int axisId)" .br .in -1c .SH "Detailed Description" .PP A 2-D plotting widget\&. \fBQwtPlot\fP is a widget for plotting two-dimensional graphs\&. An unlimited number of plot items can be displayed on its canvas\&. Plot items might be curves (\fBQwtPlotCurve\fP), markers (\fBQwtPlotMarker\fP), the grid (\fBQwtPlotGrid\fP), or anything else derived from \fBQwtPlotItem\fP\&. A plot can have up to four axes, with each plot item attached to an x- and a y axis\&. The scales at the axes can be explicitly set (\fBQwtScaleDiv\fP), or are calculated from the plot items, using algorithms (\fBQwtScaleEngine\fP) which can be configured separately for each axis\&. .PP The simpleplot example is a good starting point to see how to set up a plot widget\&. .PP .PP \fBExample\fP .RS 4 The following example shows (schematically) the most simple way to use \fBQwtPlot\fP\&. By default, only the left and bottom axes are visible and their scales are computed automatically\&. .PP .nf #include #include QwtPlot *myPlot = new QwtPlot( "Two Curves", parent ); // add curves QwtPlotCurve *curve1 = new QwtPlotCurve( "Curve 1" ); QwtPlotCurve *curve2 = new QwtPlotCurve( "Curve 2" ); // connect or copy the data to the curves curve1->setData( \&.\&.\&. ); curve2->setData( \&.\&.\&. ); curve1->attach( myPlot ); curve2->attach( myPlot ); // finally, refresh the plot myPlot->replot(); .fi .PP .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtPlot::Axis\fP" .PP Axis index\&. .PP \fBEnumerator\fP .in +1c .TP \fB\fIyLeft \fP\fP Y axis left of the canvas\&. .TP \fB\fIyRight \fP\fP Y axis right of the canvas\&. .TP \fB\fIxBottom \fP\fP X axis below the canvas\&. .TP \fB\fIxTop \fP\fP X axis above the canvas\&. .TP \fB\fIaxisCnt \fP\fP Number of axes\&. .SS "enum \fBQwtPlot::LegendPosition\fP" Position of the legend, relative to the canvas\&. .PP \fBSee also:\fP .RS 4 \fBinsertLegend()\fP .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fILeftLegend \fP\fP The legend will be left from the \fBQwtPlot::yLeft\fP axis\&. .TP \fB\fIRightLegend \fP\fP The legend will be right from the \fBQwtPlot::yRight\fP axis\&. .TP \fB\fIBottomLegend \fP\fP The legend will be below the footer\&. .TP \fB\fITopLegend \fP\fP The legend will be above the title\&. .SH "Constructor & Destructor Documentation" .PP .SS "QwtPlot::QwtPlot (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP" .PP Constructor\&. .PP \fBParameters:\fP .RS 4 \fIparent\fP Parent widget .RE .PP .SS "QwtPlot::QwtPlot (const \fBQwtText\fP & title, QWidget * parent = \fCNULL\fP)\fC [explicit]\fP" .PP Constructor\&. .PP \fBParameters:\fP .RS 4 \fItitle\fP Title text .br \fIparent\fP Parent widget .RE .PP .SH "Member Function Documentation" .PP .SS "void QwtPlot::applyProperties (const QString &)" This method is intended for manipulating the plot widget from a specific editor in the Qwt designer plugin\&. .PP \fBWarning:\fP .RS 4 The plot editor has never been implemented\&. .RE .PP .SS "bool QwtPlot::autoReplot () const" .PP \fBReturns:\fP .RS 4 true if the autoReplot option is set\&. .RE .PP \fBSee also:\fP .RS 4 \fBsetAutoReplot()\fP .RE .PP .SS "bool QwtPlot::axisAutoScale (int axisId) const" .PP \fBReturns:\fP .RS 4 \fCTrue\fP, if autoscaling is enabled .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP .SS "bool QwtPlot::axisEnabled (int axisId) const" .PP \fBReturns:\fP .RS 4 \fCTrue\fP, if a specified axis is enabled .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP .SS "QFont QwtPlot::axisFont (int axisId) const" .PP \fBReturns:\fP .RS 4 The font of the scale labels for a specified axis .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP .SS "\fBQwtInterval\fP QwtPlot::axisInterval (int axisId) const" .PP Return the current interval of the specified axis\&. This is only a convenience function for axisScaleDiv( axisId )->interval(); .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 Scale interval .RE .PP \fBSee also:\fP .RS 4 \fBQwtScaleDiv\fP, \fBaxisScaleDiv()\fP .RE .PP .SS "int QwtPlot::axisMaxMajor (int axisId) const" .PP \fBReturns:\fP .RS 4 The maximum number of major ticks for a specified axis .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBSee also:\fP .RS 4 \fBsetAxisMaxMajor()\fP, \fBQwtScaleEngine::divideScale()\fP .RE .PP .SS "int QwtPlot::axisMaxMinor (int axisId) const" .PP \fBReturns:\fP .RS 4 the maximum number of minor ticks for a specified axis .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBSee also:\fP .RS 4 \fBsetAxisMaxMinor()\fP, \fBQwtScaleEngine::divideScale()\fP .RE .PP .SS "const \fBQwtScaleDiv\fP & QwtPlot::axisScaleDiv (int axisId) const" .PP Return the scale division of a specified axis\&. axisScaleDiv(axisId)\&.lowerBound(), axisScaleDiv(axisId)\&.upperBound() are the current limits of the axis scale\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 Scale division .RE .PP \fBSee also:\fP .RS 4 \fBQwtScaleDiv\fP, \fBsetAxisScaleDiv()\fP, \fBQwtScaleEngine::divideScale()\fP .RE .PP .SS "const \fBQwtScaleDraw\fP * QwtPlot::axisScaleDraw (int axisId) const" .PP Return the scale draw of a specified axis\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 Specified scaleDraw for axis, or NULL if axis is invalid\&. .RE .PP .SS "\fBQwtScaleDraw\fP * QwtPlot::axisScaleDraw (int axisId)" .PP Return the scale draw of a specified axis\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 Specified scaleDraw for axis, or NULL if axis is invalid\&. .RE .PP .SS "\fBQwtScaleEngine\fP * QwtPlot::axisScaleEngine (int axisId)" .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 Scale engine for a specific axis .RE .PP .SS "const \fBQwtScaleEngine\fP * QwtPlot::axisScaleEngine (int axisId) const" .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 Scale engine for a specific axis .RE .PP .SS "double QwtPlot::axisStepSize (int axisId) const" .PP Return the step size parameter that has been set in setAxisScale\&. This doesn't need to be the step size of the current scale\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP \fBReturns:\fP .RS 4 step size parameter value .RE .PP \fBSee also:\fP .RS 4 \fBsetAxisScale()\fP, \fBQwtScaleEngine::divideScale()\fP .RE .PP .SS "\fBQwtText\fP QwtPlot::axisTitle (int axisId) const" .PP \fBReturns:\fP .RS 4 Title of a specified axis .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP .SS "bool QwtPlot::axisValid (int axisId)\fC [static]\fP, \fC [protected]\fP" .PP \fBReturns:\fP .RS 4 \fCtrue\fP if the specified axis exists, otherwise \fCfalse\fP .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP axis index .RE .PP .SS "const \fBQwtScaleWidget\fP * QwtPlot::axisWidget (int axisId) const" .PP \fBReturns:\fP .RS 4 Scale widget of the specified axis, or NULL if axisId is invalid\&. .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP .SS "\fBQwtScaleWidget\fP * QwtPlot::axisWidget (int axisId)" .PP \fBReturns:\fP .RS 4 Scale widget of the specified axis, or NULL if axisId is invalid\&. .RE .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .RE .PP .SS "QWidget * QwtPlot::canvas ()" .PP \fBReturns:\fP .RS 4 the plot's canvas .RE .PP .SS "const QWidget * QwtPlot::canvas () const" .PP \fBReturns:\fP .RS 4 the plot's canvas .RE .PP .SS "QBrush QwtPlot::canvasBackground () const" Nothing else than: \fBcanvas()\fP->palette()\&.brush( QPalette::Normal, QPalette::Window); .PP \fBReturns:\fP .RS 4 Background brush of the plotting area\&. .RE .PP \fBSee also:\fP .RS 4 \fBsetCanvasBackground()\fP .RE .PP .SS "\fBQwtScaleMap\fP QwtPlot::canvasMap (int axisId) const\fC [virtual]\fP" .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis .RE .PP \fBReturns:\fP .RS 4 Map for the axis on the canvas\&. With this map pixel coordinates can translated to plot coordinates and vice versa\&. .RE .PP \fBSee also:\fP .RS 4 \fBQwtScaleMap\fP, \fBtransform()\fP, \fBinvTransform()\fP .RE .PP .SS "void QwtPlot::drawCanvas (QPainter * painter)\fC [virtual]\fP" Redraw the canvas\&. .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter used for drawing .RE .PP \fBWarning:\fP .RS 4 drawCanvas calls drawItems what is also used for printing\&. Applications that like to add individual plot items better overload \fBdrawItems()\fP .RE .PP \fBSee also:\fP .RS 4 \fBdrawItems()\fP .RE .PP .SS "void QwtPlot::drawItems (QPainter * painter, const QRectF & canvasRect, const \fBQwtScaleMap\fP maps[axisCnt]) const\fC [virtual]\fP" Redraw the canvas items\&. .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter used for drawing .br \fIcanvasRect\fP Bounding rectangle where to paint .br \fImaps\fP \fBQwtPlot::axisCnt\fP maps, mapping between plot and paint device coordinates .RE .PP \fBNote:\fP .RS 4 Usually canvasRect is contentsRect() of the plot canvas\&. Due to a bug in Qt this rectangle might be wrong for certain frame styles ( f\&.e QFrame::Box ) and it might be necessary to fix the margins manually using QWidget::setContentsMargins() .RE .PP .SS "void QwtPlot::enableAxis (int axisId, bool tf = \fCtrue\fP)" .PP 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\&. .PP Only xBottom and yLeft are enabled by default\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fItf\fP \fCtrue\fP (enabled) or \fCfalse\fP (disabled) .RE .PP .SS "bool QwtPlot::event (QEvent * event)\fC [virtual]\fP" .PP Adds handling of layout requests\&. .PP \fBParameters:\fP .RS 4 \fIevent\fP Event .RE .PP \fBReturns:\fP .RS 4 See QFrame::event() .RE .PP .SS "bool QwtPlot::eventFilter (QObject * object, QEvent * event)\fC [virtual]\fP" .PP Event filter\&. The plot handles the following events for the canvas: .PP .IP "\(bu" 2 QEvent::Resize The canvas margins might depend on its size .IP "\(bu" 2 QEvent::ContentsRectChange The layout needs to be recalculated .PP .PP \fBParameters:\fP .RS 4 \fIobject\fP Object to be filtered .br \fIevent\fP Event .RE .PP \fBReturns:\fP .RS 4 See QFrame::eventFilter() .RE .PP \fBSee also:\fP .RS 4 \fBupdateCanvasMargins()\fP, \fBupdateLayout()\fP .RE .PP .SS "\fBQwtText\fP QwtPlot::footer () const" .PP \fBReturns:\fP .RS 4 Text of the footer .RE .PP .SS "\fBQwtTextLabel\fP * QwtPlot::footerLabel ()" .PP \fBReturns:\fP .RS 4 Footer label widget\&. .RE .PP .SS "const \fBQwtTextLabel\fP * QwtPlot::footerLabel () const" .PP \fBReturns:\fP .RS 4 Footer label widget\&. .RE .PP .SS "void QwtPlot::getCanvasMarginsHint (const \fBQwtScaleMap\fP maps[], const QRectF & canvasRect, double & left, double & top, double & right, double & bottom) const\fC [virtual]\fP" .PP Calculate the canvas margins\&. .PP \fBParameters:\fP .RS 4 \fImaps\fP \fBQwtPlot::axisCnt\fP maps, mapping between plot and paint device coordinates .br \fIcanvasRect\fP Bounding rectangle where to paint .br \fIleft\fP Return parameter for the left margin .br \fItop\fP Return parameter for the top margin .br \fIright\fP Return parameter for the right margin .br \fIbottom\fP Return parameter for the bottom margin .RE .PP Plot items might indicate, that they need some extra space at the borders of the canvas by the \fBQwtPlotItem::Margins\fP flag\&. .PP \fBupdateCanvasMargins()\fP, \fBQwtPlotItem::getCanvasMarginHint()\fP .SS "QString QwtPlot::grabProperties () const" This method is intended for manipulating the plot widget from a specific editor in the Qwt designer plugin\&. .PP \fBReturns:\fP .RS 4 QString() .RE .PP \fBWarning:\fP .RS 4 The plot editor has never been implemented\&. .RE .PP .SS "\fBQwtPlotItem\fP * QwtPlot::infoToItem (const QVariant & itemInfo) const\fC [virtual]\fP" .PP Identify the plot item according to an item info object, that has bee generated from \fBitemToInfo()\fP\&. The default implementation simply tries to unwrap a \fBQwtPlotItem\fP pointer: .PP .PP .nf if ( itemInfo\&.canConvert() ) return qvariant_cast( itemInfo ); .fi .PP .PP \fBParameters:\fP .RS 4 \fIitemInfo\fP Plot item .RE .PP \fBReturns:\fP .RS 4 A plot item, when successful, otherwise a NULL pointer\&. .RE .PP \fBSee also:\fP .RS 4 \fBitemToInfo()\fP .RE .PP .SS "void QwtPlot::insertLegend (\fBQwtAbstractLegend\fP * legend, \fBQwtPlot::LegendPosition\fP pos = \fC\fBQwtPlot::RightLegend\fP\fP, double ratio = \fC\-1\&.0\fP)" .PP Insert a legend\&. If the position legend is \fC\fBQwtPlot::LeftLegend\fP\fP or \fC\fBQwtPlot::RightLegend\fP\fP the legend will be organized in one column from top to down\&. Otherwise the legend items will be placed in a table with a best fit number of columns from left to right\&. .PP \fBinsertLegend()\fP will set the plot widget as parent for the legend\&. The legend will be deleted in the destructor of the plot or when another legend is inserted\&. .PP Legends, that are not inserted into the layout of the plot widget need to connect to the \fBlegendDataChanged()\fP signal\&. Calling \fBupdateLegend()\fP initiates this signal for an initial update\&. When the application code wants to implement its own layout this also needs to be done for rendering plots to a document ( see \fBQwtPlotRenderer\fP )\&. .PP \fBParameters:\fP .RS 4 \fIlegend\fP Legend .br \fIpos\fP The legend's position\&. For top/left position the number of columns will be limited to 1, otherwise it will be set to unlimited\&. .br \fIratio\fP Ratio between legend and the bounding rectangle of title, canvas and axes\&. The legend will be shrunk 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\&. .RE .PP \fBSee also:\fP .RS 4 \fBlegend()\fP, \fBQwtPlotLayout::legendPosition()\fP, \fBQwtPlotLayout::setLegendPosition()\fP .RE .PP .SS "double QwtPlot::invTransform (int axisId, int pos) const" Transform the x or y coordinate of a position in the drawing region into a value\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIpos\fP position .RE .PP \fBReturns:\fP .RS 4 Position as axis coordinate .RE .PP \fBWarning:\fP .RS 4 The position can be an x or a y coordinate, depending on the specified axis\&. .RE .PP .SS "void QwtPlot::itemAttached (\fBQwtPlotItem\fP * plotItem, bool on)\fC [signal]\fP" A signal indicating, that an item has been attached/detached .PP \fBParameters:\fP .RS 4 \fIplotItem\fP Plot item .br \fIon\fP Attached/Detached .RE .PP .SS "QVariant QwtPlot::itemToInfo (\fBQwtPlotItem\fP * plotItem) const\fC [virtual]\fP" .PP Build an information, that can be used to identify a plot item on the legend\&. The default implementation simply wraps the plot item into a QVariant object\&. When overloading \fBitemToInfo()\fP usually \fBinfoToItem()\fP needs to reimplemeted too\&. .PP .PP .nf QVariant itemInfo; qVariantSetValue( itemInfo, plotItem ); .fi .PP .PP \fBParameters:\fP .RS 4 \fIplotItem\fP Plot item .RE .PP \fBReturns:\fP .RS 4 Plot item embedded in a QVariant .RE .PP \fBSee also:\fP .RS 4 \fBinfoToItem()\fP .RE .PP .SS "\fBQwtAbstractLegend\fP * QwtPlot::legend ()" .PP \fBReturns:\fP .RS 4 the plot's legend .RE .PP \fBSee also:\fP .RS 4 \fBinsertLegend()\fP .RE .PP .SS "const \fBQwtAbstractLegend\fP * QwtPlot::legend () const" .PP \fBReturns:\fP .RS 4 the plot's legend .RE .PP \fBSee also:\fP .RS 4 \fBinsertLegend()\fP .RE .PP .SS "void QwtPlot::legendDataChanged (const QVariant & itemInfo, const QList< \fBQwtLegendData\fP > & data)\fC [signal]\fP" A signal with the attributes how to update the legend entries for a plot item\&. .PP \fBParameters:\fP .RS 4 \fIitemInfo\fP Info about a plot item, build from \fBitemToInfo()\fP .br \fIdata\fP Attributes of the entries ( usually <= 1 ) for the plot item\&. .RE .PP \fBSee also:\fP .RS 4 \fBitemToInfo()\fP, \fBinfoToItem()\fP, \fBQwtAbstractLegend::updateLegend()\fP .RE .PP .SS "\fBQwtPlotLayout\fP * QwtPlot::plotLayout ()" .PP \fBReturns:\fP .RS 4 the plot's layout .RE .PP .SS "const \fBQwtPlotLayout\fP * QwtPlot::plotLayout () const" .PP \fBReturns:\fP .RS 4 the plot's layout .RE .PP .SS "void QwtPlot::replot ()\fC [virtual]\fP, \fC [slot]\fP" .PP 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\&. .PP \fBSee also:\fP .RS 4 \fBupdateAxes()\fP, \fBsetAutoReplot()\fP .RE .PP .SS "void QwtPlot::resizeEvent (QResizeEvent * e)\fC [protected]\fP, \fC [virtual]\fP" Resize and update internal layout .PP \fBParameters:\fP .RS 4 \fIe\fP Resize event .RE .PP .SS "void QwtPlot::setAutoReplot (bool tf = \fCtrue\fP)" .PP 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 \fBreplot()\fP explicitly if necessary\&. .PP The autoReplot option is set to false by default, which means that the user has to call \fBreplot()\fP in order to make changes visible\&. .PP \fBParameters:\fP .RS 4 \fItf\fP \fCtrue\fP or \fCfalse\fP\&. Defaults to \fCtrue\fP\&. .RE .PP \fBSee also:\fP .RS 4 \fBreplot()\fP .RE .PP .SS "void QwtPlot::setAxisAutoScale (int axisId, bool on = \fCtrue\fP)" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIon\fP On/Off .RE .PP \fBSee also:\fP .RS 4 \fBsetAxisScale()\fP, \fBsetAxisScaleDiv()\fP, \fBupdateAxes()\fP .RE .PP \fBNote:\fP .RS 4 The autoscaling flag has no effect until \fBupdateAxes()\fP is executed ( called by \fBreplot()\fP )\&. .RE .PP .SS "void QwtPlot::setAxisFont (int axisId, const QFont & font)" .PP Change the font of an axis\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIfont\fP Font .RE .PP \fBWarning:\fP .RS 4 This function changes the font of the tick labels, not of the axis title\&. .RE .PP .SS "void QwtPlot::setAxisLabelAlignment (int axisId, Qt::Alignment alignment)" Change the alignment of the tick labels .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIalignment\fP Or'd Qt::AlignmentFlags see .RE .PP \fBSee also:\fP .RS 4 \fBQwtScaleDraw::setLabelAlignment()\fP .RE .PP .SS "void QwtPlot::setAxisLabelRotation (int axisId, double rotation)" Rotate all tick labels .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIrotation\fP Angle in degrees\&. When changing the label rotation, the label alignment might be adjusted too\&. .RE .PP \fBSee also:\fP .RS 4 \fBQwtScaleDraw::setLabelRotation()\fP, \fBsetAxisLabelAlignment()\fP .RE .PP .SS "void QwtPlot::setAxisMaxMajor (int axisId, int maxMajor)" Set the maximum number of major scale intervals for a specified axis .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fImaxMajor\fP Maximum number of major steps .RE .PP \fBSee also:\fP .RS 4 \fBaxisMaxMajor()\fP .RE .PP .SS "void QwtPlot::setAxisMaxMinor (int axisId, int maxMinor)" Set the maximum number of minor scale intervals for a specified axis .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fImaxMinor\fP Maximum number of minor steps .RE .PP \fBSee also:\fP .RS 4 \fBaxisMaxMinor()\fP .RE .PP .SS "void QwtPlot::setAxisScale (int axisId, double min, double max, double stepSize = \fC0\fP)" .PP Disable autoscaling and specify a fixed scale for a selected axis\&. In \fBupdateAxes()\fP the scale engine calculates a scale division from the specified parameters, that will be assigned to the scale widget\&. So updates of the scale widget usually happen delayed with the next replot\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fImin\fP Minimum of the scale .br \fImax\fP Maximum of the scale .br \fIstepSize\fP Major step size\&. If \fCstep == 0\fP, the step size is calculated automatically using the maxMajor setting\&. .RE .PP \fBSee also:\fP .RS 4 \fBsetAxisMaxMajor()\fP, \fBsetAxisAutoScale()\fP, \fBaxisStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP .RE .PP .SS "void QwtPlot::setAxisScaleDiv (int axisId, const \fBQwtScaleDiv\fP & scaleDiv)" .PP Disable autoscaling and specify a fixed scale for a selected axis\&. The scale division will be stored locally only until the next call of \fBupdateAxes()\fP\&. So updates of the scale widget usually happen delayed with the next replot\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIscaleDiv\fP Scale division .RE .PP \fBSee also:\fP .RS 4 \fBsetAxisScale()\fP, \fBsetAxisAutoScale()\fP .RE .PP .SS "void QwtPlot::setAxisScaleDraw (int axisId, \fBQwtScaleDraw\fP * scaleDraw)" .PP Set a scale draw\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIscaleDraw\fP Object responsible for drawing scales\&. .RE .PP By passing scaleDraw it is possible to extend \fBQwtScaleDraw\fP functionality and let it take place in \fBQwtPlot\fP\&. Please note that scaleDraw has to be created with new and will be deleted by the corresponding QwtScale member ( like a child object )\&. .PP \fBSee also:\fP .RS 4 \fBQwtScaleDraw\fP, \fBQwtScaleWidget\fP .RE .PP \fBWarning:\fP .RS 4 The attributes of scaleDraw will be overwritten by those of the previous \fBQwtScaleDraw\fP\&. .RE .PP .SS "void QwtPlot::setAxisScaleEngine (int axisId, \fBQwtScaleEngine\fP * scaleEngine)" Change the scale engine for an axis .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIscaleEngine\fP Scale engine .RE .PP \fBSee also:\fP .RS 4 \fBaxisScaleEngine()\fP .RE .PP .SS "void QwtPlot::setAxisTitle (int axisId, const QString & title)" .PP Change the title of a specified axis\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fItitle\fP axis title .RE .PP .SS "void QwtPlot::setAxisTitle (int axisId, const \fBQwtText\fP & title)" .PP Change the title of a specified axis\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fItitle\fP Axis title .RE .PP .SS "void QwtPlot::setCanvas (QWidget * canvas)" .PP Set the drawing canvas of the plot widget\&. \fBQwtPlot\fP invokes methods of the canvas as meta methods ( see QMetaObject )\&. In opposite to using conventional C++ techniques like virtual methods they allow to use canvas implementations that are derived from QWidget or QGLWidget\&. .PP The following meta methods could be implemented: .PP .IP "\(bu" 2 \fBreplot()\fP When the canvas doesn't offer a replot method, \fBQwtPlot\fP calls update() instead\&. .IP "\(bu" 2 borderPath() The border path is necessary to clip the content of the canvas When the canvas doesn't have any special border ( f\&.e rounded corners ) it is o\&.k\&. not to implement this method\&. .PP .PP The default canvas is a \fBQwtPlotCanvas\fP .PP \fBParameters:\fP .RS 4 \fIcanvas\fP Canvas Widget .RE .PP \fBSee also:\fP .RS 4 \fBcanvas()\fP .RE .PP .SS "void QwtPlot::setCanvasBackground (const QBrush & brush)" .PP Change the background of the plotting area\&. Sets brush to QPalette::Window of all color groups of the palette of the canvas\&. Using \fBcanvas()\fP->setPalette() is a more powerful way to set these colors\&. .PP \fBParameters:\fP .RS 4 \fIbrush\fP New background brush .RE .PP \fBSee also:\fP .RS 4 \fBcanvasBackground()\fP .RE .PP .SS "void QwtPlot::setFooter (const QString & text)" Change the text the footer .PP \fBParameters:\fP .RS 4 \fItext\fP New text of the footer .RE .PP .SS "void QwtPlot::setFooter (const \fBQwtText\fP & text)" Change the text the footer .PP \fBParameters:\fP .RS 4 \fItext\fP New text of the footer .RE .PP .SS "void QwtPlot::setPlotLayout (\fBQwtPlotLayout\fP * layout)" .PP Assign a new plot layout\&. .PP \fBParameters:\fP .RS 4 \fIlayout\fP Layout() .RE .PP \fBSee also:\fP .RS 4 \fBplotLayout()\fP .RE .PP .SS "void QwtPlot::setTitle (const QString & title)" Change the plot's title .PP \fBParameters:\fP .RS 4 \fItitle\fP New title .RE .PP .SS "void QwtPlot::setTitle (const \fBQwtText\fP & title)" Change the plot's title .PP \fBParameters:\fP .RS 4 \fItitle\fP New title .RE .PP .SS "QSize QwtPlot::sizeHint () const\fC [virtual]\fP" .PP \fBReturns:\fP .RS 4 Size hint for the plot widget .RE .PP \fBSee also:\fP .RS 4 \fBminimumSizeHint()\fP .RE .PP .SS "\fBQwtText\fP QwtPlot::title () const" .PP \fBReturns:\fP .RS 4 Title of the plot .RE .PP .SS "\fBQwtTextLabel\fP * QwtPlot::titleLabel ()" .PP \fBReturns:\fP .RS 4 Title label widget\&. .RE .PP .SS "const \fBQwtTextLabel\fP * QwtPlot::titleLabel () const" .PP \fBReturns:\fP .RS 4 Title label widget\&. .RE .PP .SS "double QwtPlot::transform (int axisId, double value) const" .PP Transform a value into a coordinate in the plotting region\&. .PP \fBParameters:\fP .RS 4 \fIaxisId\fP Axis index .br \fIvalue\fP value .RE .PP \fBReturns:\fP .RS 4 X or Y coordinate in the plotting region corresponding to the value\&. .RE .PP .SS "void QwtPlot::updateAxes ()" .PP Rebuild the axes scales\&. In case of autoscaling the boundaries of a scale are calculated from the bounding rectangles of all plot items, having the \fBQwtPlotItem::AutoScale\fP flag enabled ( \fBQwtScaleEngine::autoScale()\fP )\&. Then a scale division is calculated ( QwtScaleEngine::didvideScale() ) and assigned to scale widget\&. .PP When the scale boundaries have been assigned with \fBsetAxisScale()\fP a scale division is calculated ( QwtScaleEngine::didvideScale() ) for this interval and assigned to the scale widget\&. .PP When the scale has been set explicitly by \fBsetAxisScaleDiv()\fP the locally stored scale division gets assigned to the scale widget\&. .PP The scale widget indicates modifications by emitting a \fBQwtScaleWidget::scaleDivChanged()\fP signal\&. .PP \fBupdateAxes()\fP is usually called by \fBreplot()\fP\&. .PP \fBSee also:\fP .RS 4 \fBsetAxisAutoScale()\fP, \fBsetAxisScale()\fP, \fBsetAxisScaleDiv()\fP, \fBreplot()\fP \fBQwtPlotItem::boundingRect()\fP .RE .PP .SS "void QwtPlot::updateCanvasMargins ()" .PP Update the canvas margins\&. Plot items might indicate, that they need some extra space at the borders of the canvas by the \fBQwtPlotItem::Margins\fP flag\&. .PP \fBgetCanvasMarginsHint()\fP, \fBQwtPlotItem::getCanvasMarginHint()\fP .SS "void QwtPlot::updateLayout ()\fC [virtual]\fP" .PP Adjust plot content to its current size\&. .PP \fBSee also:\fP .RS 4 \fBresizeEvent()\fP .RE .PP .SS "void QwtPlot::updateLegend ()" Emit \fBlegendDataChanged()\fP for all plot item .PP \fBSee also:\fP .RS 4 \fBQwtPlotItem::legendData()\fP, \fBlegendDataChanged()\fP .RE .PP .SS "void QwtPlot::updateLegend (const \fBQwtPlotItem\fP * plotItem)" Emit \fBlegendDataChanged()\fP for a plot item .PP \fBParameters:\fP .RS 4 \fIplotItem\fP Plot item .RE .PP \fBSee also:\fP .RS 4 \fBQwtPlotItem::legendData()\fP, \fBlegendDataChanged()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.