QWT 7.0.1
Loading...
Searching...
No Matches
Classes | Public Slots | Public Member Functions | List of all members
QwtPlotMagnifier Class Reference

QwtPlotMagnifier provides zooming, by magnifying in steps. More...

#include <qwt_plot_magnifier.h>

Inheritance diagram for QwtPlotMagnifier:
QwtMagnifier

Classes

class  PrivateData
 

Public Slots

virtual void rescale (double factor) QWT_OVERRIDE
 Zoom in/out the axes scales.
 

Public Member Functions

 QwtPlotMagnifier (QWidget *)
 Constructor.
 
virtual ~QwtPlotMagnifier ()
 Destructor.
 
void setAxisEnabled (QwtAxisId, bool on)
 En/Disable an axis.
 
bool isAxisEnabled (QwtAxisId) const
 Test if an axis is enabled.
 
QWidget * canvas ()
 Return observed plot canvas.
 
const QWidget * canvas () const
 Return Observed plot canvas.
 
QwtPlotplot ()
 Return plot widget, containing the observed plot canvas.
 
const QwtPlotplot () const
 Return plot widget, containing the observed plot canvas.
 
- Public Member Functions inherited from QwtMagnifier
 QwtMagnifier (QWidget *)
 Constructor.
 
virtual ~QwtMagnifier ()
 Destructor.
 
QWidget * parentWidget ()
 
const QWidget * parentWidget () const
 
void setEnabled (bool)
 En/disable the magnifier.
 
bool isEnabled () const
 
void setMouseFactor (double)
 Change the mouse factor.
 
double mouseFactor () const
 
void setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)
 Assign the mouse button, that is used for zooming in/out.
 
void getMouseButton (Qt::MouseButton &, Qt::KeyboardModifiers &) const
 
void setWheelFactor (double)
 Change the wheel factor.
 
double wheelFactor () const
 
void setWheelModifiers (Qt::KeyboardModifiers)
 Assign keyboard modifiers for zooming in/out using the wheel.
 
Qt::KeyboardModifiers wheelModifiers () const
 
void setKeyFactor (double)
 Change the key factor.
 
double keyFactor () const
 
void setZoomInKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
 Assign the key, that is used for zooming in.
 
void getZoomInKey (int &key, Qt::KeyboardModifiers &) const
 Retrieve the settings of the zoom in key.
 
void setZoomOutKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
 Assign the key, that is used for zooming out.
 
void getZoomOutKey (int &key, Qt::KeyboardModifiers &) const
 Retrieve the settings of the zoom out key.
 
virtual bool eventFilter (QObject *, QEvent *) QWT_OVERRIDE
 Event filter.
 

Additional Inherited Members

- Protected Member Functions inherited from QwtMagnifier
virtual void rescale (double factor)=0
 Rescale the parent widget.
 
virtual void widgetMousePressEvent (QMouseEvent *)
 Handle a mouse press event for the observed widget.
 
virtual void widgetMouseReleaseEvent (QMouseEvent *)
 Handle a mouse release event for the observed widget.
 
virtual void widgetMouseMoveEvent (QMouseEvent *)
 Handle a mouse move event for the observed widget.
 
virtual void widgetWheelEvent (QWheelEvent *)
 Handle a wheel event for the observed widget.
 
virtual void widgetKeyPressEvent (QKeyEvent *)
 Handle a key press event for the observed widget.
 
virtual void widgetKeyReleaseEvent (QKeyEvent *)
 Handle a key release event for the observed widget.
 

Detailed Description

QwtPlotMagnifier provides zooming, by magnifying in steps.

Using QwtPlotMagnifier a plot can be zoomed in/out in steps using keys, the mouse wheel or moving a mouse button in vertical direction.

Together with QwtPlotZoomer and QwtPlotPanner it is possible to implement individual and powerful navigation of the plot canvas.

See also
QwtPlotZoomer, QwtPlotPanner, QwtPlot

Constructor & Destructor Documentation

◆ QwtPlotMagnifier()

QwtPlotMagnifier::QwtPlotMagnifier ( QWidget *  canvas)
explicit

Constructor.

Parameters
canvasPlot canvas to be magnified

Member Function Documentation

◆ isAxisEnabled()

bool QwtPlotMagnifier::isAxisEnabled ( QwtAxisId  axisId) const

Test if an axis is enabled.

Parameters
axisIdAxis
Returns
True, if the axis is enabled
See also
setAxisEnabled()

◆ rescale

void QwtPlotMagnifier::rescale ( double  factor)
virtualslot

Zoom in/out the axes scales.

Parameters
factorA value < 1.0 zooms in, a value > 1.0 zooms out.

◆ setAxisEnabled()

void QwtPlotMagnifier::setAxisEnabled ( QwtAxisId  axisId,
bool  on 
)

En/Disable an axis.

Only Axes that are enabled will be zoomed. All other axes will remain unchanged.

Parameters
axisIdAxis
onOn/Off
See also
isAxisEnabled()

The documentation for this class was generated from the following files: