1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
/*
* python-qwt. Python wrapper for the Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
* Copyright (C) 2015 Gudjon I. Gudjonsson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
class QwtPlotZoomer: QwtPlotPicker
{
%TypeHeaderCode
#include <qwt_plot_zoomer.h>
%End
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; FIXME
//void setZoomStack( const QStack<QRectF> &, int zoomRectIndex = -1 ); FIXME
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:
/*!
A signal emitting the zoomRect(), when the plot has been
zoomed in or out.
\param rect Current zoom rectangle.
*/
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;
};
|