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 x, double y );
virtual void moveTo( const QPointF & );
virtual void zoom( const QRectF & );
virtual void zoom( int up );
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
QwtPicker::widgetKeyPressEvent
virtual void widgetKeyPressEvent(QKeyEvent *)
Definition: qwt_picker.cpp:1105
QwtPlotPicker::setAxis
virtual void setAxis(int xAxis, int yAxis)
Definition: qwt_plot_picker.cpp:162
QwtPlotPicker
QwtPlotPicker provides selections on a plot canvas.
Definition: qwt_plot_picker.h:27
QwtPicker::begin
virtual void begin()
Definition: qwt_picker.cpp:1232
QwtPicker::widgetMouseReleaseEvent
virtual void widgetMouseReleaseEvent(QMouseEvent *)
Definition: qwt_picker.cpp:1048
QwtPlotPicker::end
virtual bool end(bool ok=true)
Definition: qwt_plot_picker.cpp:266
QwtPicker::accept
virtual bool accept(QPolygon &) const
Validate and fix up the selection.
Definition: qwt_picker.cpp:1383
QwtPlotZoomer
QwtPlotZoomer provides stacked zooming for a plot widget.
Definition: qwt_plot_zoomer.h:77