92 w = w->parentWidget();
94 return qobject_cast<
QwtPlot *>( w );
102 w = w->parentWidget();
104 return qobject_cast<
const QwtPlot *>( w );
117 factor = qAbs( factor );
118 if ( factor == 1.0 || factor == 0.0 )
121 bool doReplot =
false;
132 double v1 = scaleMap.
s1();
133 double v2 = scaleMap.
s2();
143 const double center = 0.5 * ( v1 + v2 );
144 const double width_2 = 0.5 * ( v2 - v1 ) * factor;
146 v1 = center - width_2;
147 v2 = center + width_2;
void setAxisEnabled(int axis, bool on)
En/Disable an axis.
void setAutoReplot(bool=true)
Set or reset the autoReplot option.
virtual void replot()
Redraw the plot.
virtual ~QwtPlotMagnifier()
Destructor.
QwtPlot * plot()
Return plot widget, containing the observed plot canvas.
QwtMagnifier provides zooming, by magnifying in steps.
bool isAxisEnabled(int axis) const
virtual QwtScaleMap canvasMap(int axisId) const
const QwtTransform * transformation() const
Get the transformation.
double invTransform(double p) const
TFSIMD_FORCE_INLINE const tfScalar & w() const
QWidget * canvas()
Return observed plot canvas.
QwtPlotMagnifier(QWidget *)
double transform(double s) const
bool isAxisEnabled[QwtPlot::axisCnt]
void setAxisScale(int axisId, double min, double max, double step=0)
Disable autoscaling and specify a fixed scale for a selected axis.
virtual void rescale(double factor)