qwt_polar_magnifier.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
  2. * QwtPolar Widget Library
  3. * Copyright (C) 2008 Uwe Rathmann
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the Qwt License, Version 1.0
  7. *****************************************************************************/
  8. #ifndef QWT_POLAR_MAGNIFIER_H
  9. #define QWT_POLAR_MAGNIFIER_H 1
  10. #include "qwt_polar_global.h"
  11. #include "qwt_magnifier.h"
  12. class QwtPolarPlot;
  13. class QwtPolarCanvas;
  14. /*!
  15. \brief QwtPolarMagnifier provides zooming, by magnifying in steps.
  16. Using QwtPlotMagnifier a plot can be zoomed in/out in steps using
  17. keys, the mouse wheel or moving a mouse button in vertical direction.
  18. Together with QwtPolarPanner it is possible to implement
  19. an individual navigation of the plot canvas.
  20. \sa QwtPolarPanner, QwtPolarPlot, QwtPolarCanvas
  21. */
  22. class QWT_POLAR_EXPORT QwtPolarMagnifier: public QwtMagnifier
  23. {
  24. Q_OBJECT
  25. public:
  26. explicit QwtPolarMagnifier( QwtPolarCanvas * );
  27. virtual ~QwtPolarMagnifier();
  28. void setUnzoomKey( int key, int modifiers );
  29. void getUnzoomKey( int &key, int &modifiers ) const;
  30. QwtPolarPlot *plot();
  31. const QwtPolarPlot *plot() const;
  32. QwtPolarCanvas *canvas();
  33. const QwtPolarCanvas *canvas() const;
  34. protected:
  35. virtual void rescale( double factor );
  36. void unzoom();
  37. virtual void widgetKeyPressEvent( QKeyEvent * );
  38. private:
  39. class PrivateData;
  40. PrivateData *d_data;
  41. };
  42. #endif