9 #include "ocurvesconfig.h"
11 #include <qwt_plot_zoomer.h>
44 static const unsigned int AxisY = 0;
46 static const unsigned int AxisX = 2;
53 explicit PlotZoomer(QwtPlotCanvas *plot,
bool doReplot =
true);
114 void zoom(
const QRectF &rect)
override;
118 void zoom(
int up)
override;
175 bool end(
bool ok =
true)
override;
195 void contextMenuTimeout();
199 unsigned _contextMenuTimeMs;
200 quint16 _contextMenuSequenceNumber;
203 quint16 _contextMenuExpectedSeq;
206 QAction *_zoomActions[ZoomModeCount];
212 #endif // PLOTZOOMER_H_
void zoomModeX(bool isset)
Signal for changes to/from ZoomX.
Zoom only X axis.
Definition: plotzoomer.h:36
ZoomMode
Zooming mode.
Definition: plotzoomer.h:31
QwtPlotZoomer Super
Parent class.
Definition: plotzoomer.h:28
QAction * zoomBothAction() const
Fetch the action used to select the ZoomBoth mode.
Definition: plotzoomer.h:64
void zoomModeChanged(int mode)
Notifies changes in zoomMode().
ZoomMode zoomMode() const
Access the current ZoomMode.
Definition: plotzoomer.h:60
PlotZoomer(QwtPlotCanvas *plot, bool doReplot=true)
Constructor, operating on the given plot.
void zoomModeY(bool isset)
Signal for changes to/from ZoomY.
Zoom only Y axis.
Definition: plotzoomer.h:38
QAction * zoomYAction() const
Fetch the action used to select the ZoomY mode.
Definition: plotzoomer.h:72
static const unsigned int AxisY
YAxis reference within QwtPlot.
Definition: plotzoomer.h:44
void widgetWheelEvent(QWheelEvent *event) override
Cycle zoom levels on wheel.
static const unsigned int AxisX
XAxis reference within QwtPlot.
Definition: plotzoomer.h:46
void setZoomMode(ZoomMode mode)
Set the active ZoomMode.
void zoomToFit(bool replot=true)
Zoom to fit even if auto-scaling is off.
void zoomActionToggled(bool checked)
Bound to zoom actions simply to ensure one is kept active.
void zoomModeBoth(bool isset)
Signal for changes to/from ZoomBoth.
void setZoomModeBoth()
Set the zoom mode to ZoomBoth.
Definition: plotzoomer.h:128
Custom zoom handler for Plot objects.
Definition: plotzoomer.h:22
bool end(bool ok=true) override
Overload to handle ZoomMode.
void fitIfAutoScaling()
Set current zoom to fit if auto scaling is enabled.
void setZoomModeY()
Set the zoom mode to ZoomY.
Definition: plotzoomer.h:134
void zoom(const QRectF &rect) override
Override to prevent catastrophic event propagation on synchronised zoom response. ...
void setZoomModeX()
Set the zoom mode to ZoomX.
Definition: plotzoomer.h:131
Zoom both axes.
Definition: plotzoomer.h:34
QAction * zoomXAction() const
Fetch the action used to select the ZoomX mode.
Definition: plotzoomer.h:68
void zoomSync(const QRectF &rect)
Event for zoom synchronisation.
void widgetMouseReleaseEvent(QMouseEvent *event) override
Ignore middle click - handled by panner - resolve right click zoom restore or context menu...
void widgetMousePressEvent(QMouseEvent *event) override
End panning or reset the zoom level on right mouse button.
void loadSettings(QSettings &settings)
Load zoom settings stored by saveSettings().
void saveSettings(QSettings &settings)
Save zoom settings to settings.