qwt_plot_magnifier.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
  2. * Qwt Widget Library
  3. * Copyright (C) 1997 Josef Wilgen
  4. * Copyright (C) 2002 Uwe Rathmann
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the Qwt License, Version 1.0
  8. *****************************************************************************/
  9. #ifndef QWT_PLOT_MAGNIFIER_H
  10. #define QWT_PLOT_MAGNIFIER_H 1
  11. #include "qwt_global.h"
  12. #include "qwt_magnifier.h"
  13. class QwtPlot;
  14. /*!
  15. \brief QwtPlotMagnifier 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 QwtPlotZoomer and QwtPlotPanner it is possible to implement
  19. individual and powerful navigation of the plot canvas.
  20. \sa QwtPlotZoomer, QwtPlotPanner, QwtPlot
  21. */
  22. class QWT_EXPORT QwtPlotMagnifier: public QwtMagnifier
  23. {
  24. Q_OBJECT
  25. public:
  26. explicit QwtPlotMagnifier( QWidget * );
  27. virtual ~QwtPlotMagnifier();
  28. void setAxisEnabled( int axis, bool on );
  29. bool isAxisEnabled( int axis ) const;
  30. QWidget *canvas();
  31. const QWidget *canvas() const;
  32. QwtPlot *plot();
  33. const QwtPlot *plot() const;
  34. protected:
  35. virtual void rescale( double factor );
  36. private:
  37. class PrivateData;
  38. PrivateData *d_data;
  39. };
  40. #endif