qwt_plot_zoomer.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* 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"
#include <qstack.h>
class QWT_EXPORT QwtPlotZoomer: public QwtPlotPicker
{
Q_OBJECT
public:
explicit QwtPlotZoomer( QWidget *, bool doReplot = true );
explicit QwtPlotZoomer( int xAxis, int 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 setAxis( int xAxis, int yAxis );
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 * );
virtual void widgetKeyPressEvent( QKeyEvent * );
virtual void begin();
virtual bool end( bool ok = true );
virtual bool accept( QPolygon & ) const;
private:
void init( bool doReplot );
class PrivateData;
PrivateData *d_data;
};
#endif
QwtPlotPicker::end
virtual bool end(bool ok=true)
Definition: qwt_plot_picker.cpp:269
QwtPicker::accept
virtual bool accept(QPolygon &) const
Validate and fix up the selection.
Definition: qwt_picker.cpp:1380
QwtPlotPicker
QwtPlotPicker provides selections on a plot canvas.
Definition: qwt_plot_picker.h:28
QwtPlotPicker::setAxis
virtual void setAxis(int xAxis, int yAxis)
Definition: qwt_plot_picker.cpp:162
QwtPlotZoomer
QwtPlotZoomer provides stacked zooming for a plot widget.
Definition: qwt_plot_zoomer.h:78
QwtPlotZoomer::zoomed
void zoomed(const QRectF &rect)
QwtPicker::begin
virtual void begin()
Definition: qwt_picker.cpp:1236
QwtPicker::widgetMouseReleaseEvent
virtual void widgetMouseReleaseEvent(QMouseEvent *)
Definition: qwt_picker.cpp:1052
QwtPicker::widgetKeyPressEvent
virtual void widgetKeyPressEvent(QKeyEvent *)
Definition: qwt_picker.cpp:1109