Classes | Public Slots | Public Member Functions | Private Attributes | List of all members
QwtPlotMagnifier Class Reference

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

#include <qwt_plot_magnifier.h>

Inheritance diagram for QwtPlotMagnifier:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Slots

virtual void rescale (double factor) QWT_OVERRIDE
 

Public Member Functions

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

Private Attributes

PrivateDatam_data
 

Additional Inherited Members

- Protected Member Functions inherited from QwtMagnifier
virtual void rescale (double factor)=0
 
virtual void widgetKeyPressEvent (QKeyEvent *)
 
virtual void widgetKeyReleaseEvent (QKeyEvent *)
 
virtual void widgetMouseMoveEvent (QMouseEvent *)
 
virtual void widgetMousePressEvent (QMouseEvent *)
 
virtual void widgetMouseReleaseEvent (QMouseEvent *)
 
virtual void widgetWheelEvent (QWheelEvent *)
 

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

Definition at line 30 of file qwt_plot_magnifier.h.

Constructor & Destructor Documentation

◆ QwtPlotMagnifier()

QwtPlotMagnifier::QwtPlotMagnifier ( QWidget *  canvas)
explicit

Constructor

Parameters
canvasPlot canvas to be magnified

Definition at line 30 of file qwt_plot_magnifier.cpp.

◆ ~QwtPlotMagnifier()

QwtPlotMagnifier::~QwtPlotMagnifier ( )
virtual

Destructor.

Definition at line 37 of file qwt_plot_magnifier.cpp.

Member Function Documentation

◆ canvas() [1/2]

const QWidget * QwtPlotMagnifier::canvas ( )

Return observed plot canvas.

Return Observed plot canvas.

Definition at line 76 of file qwt_plot_magnifier.cpp.

◆ canvas() [2/2]

const QWidget* QwtPlotMagnifier::canvas ( ) const

◆ 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()

Definition at line 67 of file qwt_plot_magnifier.cpp.

◆ plot() [1/2]

const QwtPlot * QwtPlotMagnifier::plot ( )

Return plot widget, containing the observed plot canvas.

Definition at line 88 of file qwt_plot_magnifier.cpp.

◆ plot() [2/2]

const QwtPlot* QwtPlotMagnifier::plot ( ) const

◆ 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.

Reimplemented in PlotMagnifier.

Definition at line 111 of file qwt_plot_magnifier.cpp.

◆ 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()

Definition at line 53 of file qwt_plot_magnifier.cpp.

Member Data Documentation

◆ m_data

PrivateData* QwtPlotMagnifier::m_data
private

Definition at line 51 of file qwt_plot_magnifier.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:50