qwt_plot_zoomer.h
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_PLOT_ZOOMER_H
00011 #define QWT_PLOT_ZOOMER_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_plot_picker.h"
00015 #include <qstack.h>
00016 
00077 class QWT_EXPORT QwtPlotZoomer: public QwtPlotPicker
00078 {
00079     Q_OBJECT
00080 public:
00081     explicit QwtPlotZoomer( QWidget *, bool doReplot = true );
00082     explicit QwtPlotZoomer( int xAxis, int yAxis,
00083                             QWidget *, bool doReplot = true );
00084 
00085     virtual ~QwtPlotZoomer();
00086 
00087     virtual void setZoomBase( bool doReplot = true );
00088     virtual void setZoomBase( const QRectF & );
00089 
00090     QRectF zoomBase() const;
00091     QRectF zoomRect() const;
00092 
00093     virtual void setAxis( int xAxis, int yAxis );
00094 
00095     void setMaxStackDepth( int );
00096     int maxStackDepth() const;
00097 
00098     const QStack<QRectF> &zoomStack() const;
00099     void setZoomStack( const QStack<QRectF> &,
00100         int zoomRectIndex = -1 );
00101 
00102     uint zoomRectIndex() const;
00103 
00104 public Q_SLOTS:
00105     void moveBy( double x, double y );
00106     virtual void moveTo( const QPointF & );
00107 
00108     virtual void zoom( const QRectF & );
00109     virtual void zoom( int up );
00110 
00111 Q_SIGNALS:
00119     void zoomed( const QRectF &rect );
00120 
00121 protected:
00122     virtual void rescale();
00123 
00124     virtual QSizeF minZoomSize() const;
00125 
00126     virtual void widgetMouseReleaseEvent( QMouseEvent * );
00127     virtual void widgetKeyPressEvent( QKeyEvent * );
00128 
00129     virtual void begin();
00130     virtual bool end( bool ok = true );
00131     virtual bool accept( QPolygon & ) const;
00132 
00133 private:
00134     void init( bool doReplot );
00135 
00136     class PrivateData;
00137     PrivateData *d_data;
00138 };
00139 
00140 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56