qwt_plot_zoomer.h
Go to the documentation of this file.
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 
10 #ifndef QWT_PLOT_ZOOMER_H
11 #define QWT_PLOT_ZOOMER_H
12 
13 #include "qwt_global.h"
14 #include "qwt_plot_picker.h"
15 
16 class QSizeF;
17 template <typename T> class QStack;
18 
80 {
81  Q_OBJECT
82 public:
83  explicit QwtPlotZoomer( QWidget *, bool doReplot = true );
84  explicit QwtPlotZoomer( int xAxis, int yAxis,
85  QWidget *, bool doReplot = true );
86 
87  virtual ~QwtPlotZoomer();
88 
89  virtual void setZoomBase( bool doReplot = true );
90  virtual void setZoomBase( const QRectF & );
91 
92  QRectF zoomBase() const;
93  QRectF zoomRect() const;
94 
95  virtual void setAxis( int xAxis, int yAxis ) override;
96 
97  void setMaxStackDepth( int );
98  int maxStackDepth() const;
99 
100  const QStack<QRectF> &zoomStack() const;
101  void setZoomStack( const QStack<QRectF> &,
102  int zoomRectIndex = -1 );
103 
104  uint zoomRectIndex() const;
105 
106 public Q_SLOTS:
107  void moveBy( double dx, double dy );
108  virtual void moveTo( const QPointF & );
109 
110  virtual void zoom( const QRectF & );
111  virtual void zoom( int offset );
112 
113 Q_SIGNALS:
121  void zoomed( const QRectF &rect );
122 
123 protected:
124  virtual void rescale();
125 
126  virtual QSizeF minZoomSize() const;
127 
128  virtual void widgetMouseReleaseEvent( QMouseEvent * ) override;
129  virtual void widgetKeyPressEvent( QKeyEvent * ) override;
130 
131  virtual void begin() override;
132  virtual bool end( bool ok = true ) override;
133  virtual bool accept( QPolygon & ) const override;
134 
135 private:
136  void init( bool doReplot );
137 
138  class PrivateData;
140 };
141 
142 #endif
virtual void widgetKeyPressEvent(QKeyEvent *)
#define QWT_EXPORT
Definition: qwt_global.h:38
virtual bool end(bool ok=true)
virtual bool accept(QPolygon &) const
Validate and fix up the selection.
virtual void setAxis(int xAxis, int yAxis)
PrivateData * d_data
QwtPlotPicker provides selections on a plot canvas.
QwtPlotZoomer provides stacked zooming for a plot widget.
virtual void widgetMouseReleaseEvent(QMouseEvent *)
virtual void begin()
void init(QWidget *, RubberBand rubberBand, DisplayMode trackerMode)
Initialize the picker - used by the constructors.
Definition: qwt_picker.cpp:213


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17