qwt_plot_zoomer.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_PLOT_ZOOMER_H
#define QWT_PLOT_ZOOMER_H
#include "qwt_global.h"
#include "qwt_plot_picker.h"
class QSizeF;
template< typename T > class QStack;
class QWT_EXPORT QwtPlotZoomer : public QwtPlotPicker
{
Q_OBJECT
public:
explicit QwtPlotZoomer( QWidget*, bool doReplot = true );
explicit QwtPlotZoomer( QwtAxisId xAxis, QwtAxisId yAxis,
QWidget*, bool doReplot = true );
virtual ~QwtPlotZoomer();
virtual void setZoomBase( bool doReplot = true );
virtual void setZoomBase( const QRectF& );
QRectF zoomBase() const;
QRectF zoomRect() const;
virtual void setAxes( QwtAxisId xAxis, QwtAxisId yAxis ) QWT_OVERRIDE;
void setMaxStackDepth( int );
int maxStackDepth() const;
const QStack< QRectF >& zoomStack() const;
void setZoomStack( const QStack< QRectF >&,
int zoomRectIndex = -1 );
uint zoomRectIndex() const;
public Q_SLOTS:
void moveBy( double dx, double dy );
virtual void moveTo( const QPointF& );
virtual void zoom( const QRectF& );
virtual void zoom( int offset );
Q_SIGNALS:
void zoomed( const QRectF& rect );
protected:
virtual void rescale();
virtual QSizeF minZoomSize() const;
virtual void widgetMouseReleaseEvent( QMouseEvent* ) QWT_OVERRIDE;
virtual void widgetKeyPressEvent( QKeyEvent* ) QWT_OVERRIDE;
virtual void begin() QWT_OVERRIDE;
virtual bool end( bool ok = true ) QWT_OVERRIDE;
virtual bool accept( QPolygon& ) const QWT_OVERRIDE;
private:
void init( bool doReplot );
class PrivateData;
PrivateData* m_data;
};
#endif
QStack
Definition: qwt_plot_zoomer.h:17
QwtPicker::begin
virtual void begin()
Definition: qwt_picker.cpp:1239
QwtPicker::widgetMouseReleaseEvent
virtual void widgetMouseReleaseEvent(QMouseEvent *)
Definition: qwt_picker.cpp:1050
QwtPicker::widgetKeyPressEvent
virtual void widgetKeyPressEvent(QKeyEvent *)
Definition: qwt_picker.cpp:1112
QwtPlotPicker
QwtPlotPicker provides selections on a plot canvas.
Definition: qwt_plot_picker.h:34
QwtPlotPicker::setAxes
virtual void setAxes(QwtAxisId xAxisId, QwtAxisId yAxisId)
Definition: qwt_plot_picker.cpp:172
QwtPlotZoomer
QwtPlotZoomer provides stacked zooming for a plot widget.
Definition: qwt_plot_zoomer.h:80
QwtPlotZoomer::zoomed
void zoomed(const QRectF &rect)