Qwt User's Guide 6.1.4

qwt_plot_zoomer.h
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 #include <qstack.h>
16
77 class QWT_EXPORT QwtPlotZoomer: public QwtPlotPicker
78 {
79 Q_OBJECT
80 public:
81 explicit QwtPlotZoomer( QWidget *, bool doReplot = true );
82 explicit QwtPlotZoomer( int xAxis, int yAxis,
83 QWidget *, bool doReplot = true );
84
85 virtual ~QwtPlotZoomer();
86
87 virtual void setZoomBase( bool doReplot = true );
88 virtual void setZoomBase( const QRectF & );
89
90 QRectF zoomBase() const;
91 QRectF zoomRect() const;
92
93 virtual void setAxis( int xAxis, int yAxis );
94
95 void setMaxStackDepth( int );
96 int maxStackDepth() const;
97
98 const QStack<QRectF> &zoomStack() const;
99 void setZoomStack( const QStack<QRectF> &,
100 int zoomRectIndex = -1 );
101
102 uint zoomRectIndex() const;
103
104 public Q_SLOTS:
105 void moveBy( double dx, double dy );
106 virtual void moveTo( const QPointF & );
107
108 virtual void zoom( const QRectF & );
109 virtual void zoom( int offset );
110
111 Q_SIGNALS:
119 void zoomed( const QRectF &rect );
120
121 protected:
122 virtual void rescale();
123
124 virtual QSizeF minZoomSize() const;
125
126 virtual void widgetMouseReleaseEvent( QMouseEvent * );
127 virtual void widgetKeyPressEvent( QKeyEvent * );
128
129 virtual void begin();
130 virtual bool end( bool ok = true );
131 virtual bool accept( QPolygon & ) const;
132
133 private:
134 void init( bool doReplot );
135
136 class PrivateData;
137 PrivateData *d_data;
138 };
139
140 #endif
QwtPicker::widgetKeyPressEvent
virtual void widgetKeyPressEvent(QKeyEvent *)
Definition: qwt_picker.cpp:1109
QwtPlotPicker::setAxis
virtual void setAxis(int xAxis, int yAxis)
Definition: qwt_plot_picker.cpp:162
QwtPicker::accept
virtual bool accept(QPolygon &) const
Validate and fix up the selection.
Definition: qwt_picker.cpp:1380
QwtPlotPicker
QwtPlotPicker provides selections on a plot canvas.
Definition: qwt_plot_picker.h:27
QwtPicker::begin
virtual void begin()
Definition: qwt_picker.cpp:1236
QwtPicker::widgetMouseReleaseEvent
virtual void widgetMouseReleaseEvent(QMouseEvent *)
Definition: qwt_picker.cpp:1052
QwtPlotPicker::end
virtual bool end(bool ok=true)
Definition: qwt_plot_picker.cpp:269
QwtPlotZoomer
QwtPlotZoomer provides stacked zooming for a plot widget.
Definition: qwt_plot_zoomer.h:77