Go to the documentation of this file.
10 #include <QApplication>
21 _lower_bounds[axisId] = std::numeric_limits<double>::lowest();
41 factor = qAbs(1.0 / factor);
44 if (plt ==
nullptr || factor == 1.0)
49 bool doReplot =
false;
57 for (
int i = 0; i < 2; i++)
59 double temp_factor = factor;
60 if (i == 1 && axis ==
X_AXIS)
64 if (i == 0 && axis ==
Y_AXIS)
69 int axisId = axis_list[i];
75 double v1 = scaleMap.
s1();
76 double v2 = scaleMap.
s2();
91 const double width = (v2 - v1);
92 const double ratio = (v2 - center) / (width);
94 v1 = center - width * temp_factor * (1 - ratio);
95 v2 = center + width * temp_factor * (ratio);
97 bool reversed_axis =
false;
100 reversed_axis =
true;
124 new_rect.setLeft(v1);
125 new_rect.setRight(v2);
129 new_rect.setBottom(v1);
double invTransform(double p) const
void setAxisLimits(int axis, double lower, double upper)
void setAxisScale(QwtAxisId, double min, double max, double stepSize=0)
Disable autoscaling and specify a fixed scale for a selected axis.
PlotMagnifier(QWidget *canvas)
void setAutoReplot(bool=true)
Set or reset the autoReplot option.
QwtPlot * plot()
Return plot widget, containing the observed plot canvas.
NLOHMANN_BASIC_JSON_TPL_DECLARATION void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL &j1, nlohmann::NLOHMANN_BASIC_JSON_TPL &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name) is_nothrow_move_constructible< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value &&//NOLINT(misc-redundant-expression) is_nothrow_move_assignable< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value)
exchanges the values of two JSON objects
double _upper_bounds[QwtPlot::axisCnt]
virtual void rescale(double factor) override
double transform(double s) const
virtual void widgetMousePressEvent(QMouseEvent *event) override
bool isAxisEnabled(QwtAxisId) const
virtual void widgetWheelEvent(QWheelEvent *)
void rescaled(QRectF new_size)
virtual void widgetMousePressEvent(QMouseEvent *)
QPointF invTransform(QPoint pos)
const QwtTransform * transformation() const
Get the transformation.
double _lower_bounds[QwtPlot::axisCnt]
virtual QwtScaleMap canvasMap(QwtAxisId) const
virtual void widgetWheelEvent(QWheelEvent *event) override
virtual ~PlotMagnifier() override
QwtPlotMagnifier provides zooming, by magnifying in steps.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45