#include <scrollzoomer.h>
|
virtual QwtText | trackerText (const QwtDoublePoint &pos) const |
|
Definition at line 39 of file scrollzoomer.h.
LogPlotZoomer::LogPlotZoomer |
( |
QwtPlotCanvas * |
canvas | ) |
|
void LogPlotZoomer::move |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
virtualslot |
Definition at line 67 of file scrollzoomer.cpp.
Referenced by ScrollZoomer::scrollBarMoved().
71 x = qwtMax(x, zoomBase().left());
72 x = qwtMin(x, zoomBase().right() - zoomRect().width());
74 y = qwtMax(y, zoomBase().top());
75 y = qwtMin(y, zoomBase().bottom() - zoomRect().height());
77 if (x != zoomRect().left() || y != zoomRect().top())
80 QwtDoubleRect & rect =
const_cast<QwtDoubleRect &
>(zoomStack()[zoomRectIndex()]);
83 const int xAxis = QwtPlotZoomer::xAxis();
84 const QwtScaleEngine *sex = plot()->axisScaleEngine(xAxis);
86 if (dynamic_cast<const QwtLog10ScaleEngine*>(sex))
89 double factor = rect.right() / rect.left();
90 rect.setRight(x * factor);
98 const int yAxis = QwtPlotZoomer::yAxis();
100 const QwtScaleEngine *sey = plot()->axisScaleEngine(yAxis);
102 if (dynamic_cast<const QwtLog10ScaleEngine*>(sey))
105 double factor = rect.bottom() / rect.top();
106 rect.setBottom(y * factor);
QwtText LogPlotZoomer::trackerText |
( |
const QwtDoublePoint & |
pos | ) |
const |
|
protectedvirtual |
Definition at line 37 of file scrollzoomer.cpp.
42 return QString().sprintf(
"%.4g", pos.y());
44 return QString().sprintf(
"%.4g", pos.x());
46 return QString().sprintf(
"%.4g, %.4g", pos.x(), pos.y());
The documentation for this class was generated from the following files: