Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PlotMagnifier Class Reference

#include <plotmagnifier.h>

Inheritance diagram for PlotMagnifier:
Inheritance graph
[legend]

Public Types

enum  AxisMode { X_AXIS, Y_AXIS, BOTH_AXES }
 

Signals

void rescaled (QRectF new_size)
 

Public Member Functions

 PlotMagnifier (QWidget *canvas)
 
virtual void rescale (double factor) override
 
void rescale (double factor, AxisMode axis)
 
void setAxisLimits (int axis, double lower, double upper)
 
void setDefaultMode (AxisMode mode)
 
virtual void widgetWheelEvent (QWheelEvent *event) override
 
virtual ~PlotMagnifier () override
 
- Public Member Functions inherited from QwtPlotMagnifier
QWidget * canvas ()
 Return observed plot canvas. More...
 
const QWidget * canvas () const
 Return Observed plot canvas. More...
 
bool isAxisEnabled (int axis) const
 
QwtPlotplot ()
 Return plot widget, containing the observed plot canvas. More...
 
const QwtPlotplot () const
 Return plot widget, containing the observed plot canvas. More...
 
 QwtPlotMagnifier (QWidget *)
 
void setAxisEnabled (int axis, 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...
 

Protected Member Functions

virtual void widgetMousePressEvent (QMouseEvent *event) override
 
- Protected Member Functions inherited from QwtMagnifier
virtual void widgetKeyPressEvent (QKeyEvent *)
 
virtual void widgetKeyReleaseEvent (QKeyEvent *)
 
virtual void widgetMouseMoveEvent (QMouseEvent *)
 
virtual void widgetMouseReleaseEvent (QMouseEvent *)
 

Protected Attributes

double _lower_bounds [QwtPlot::axisCnt]
 
QPointF _mouse_position
 
double _upper_bounds [QwtPlot::axisCnt]
 

Private Member Functions

QPointF invTransform (QPoint pos)
 

Private Attributes

AxisMode _default_mode
 
QTimer _future_emit
 

Additional Inherited Members

- Public Slots inherited from QwtPlotMagnifier

Detailed Description

Definition at line 9 of file plotmagnifier.h.

Member Enumeration Documentation

Enumerator
X_AXIS 
Y_AXIS 
BOTH_AXES 

Definition at line 20 of file plotmagnifier.h.

Constructor & Destructor Documentation

PlotMagnifier::PlotMagnifier ( QWidget *  canvas)
explicit

Definition at line 9 of file plotmagnifier.cpp.

PlotMagnifier::~PlotMagnifier ( )
overridevirtual

Definition at line 18 of file plotmagnifier.cpp.

Member Function Documentation

QPointF PlotMagnifier::invTransform ( QPoint  pos)
private

Definition at line 128 of file plotmagnifier.cpp.

virtual void PlotMagnifier::rescale ( double  factor)
inlineoverridevirtual

Zoom in/out the axes scales

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

Reimplemented from QwtPlotMagnifier.

Definition at line 27 of file plotmagnifier.h.

void PlotMagnifier::rescale ( double  factor,
AxisMode  axis 
)

Definition at line 31 of file plotmagnifier.cpp.

void PlotMagnifier::rescaled ( QRectF  new_size)
signal
void PlotMagnifier::setAxisLimits ( int  axis,
double  lower,
double  upper 
)

Definition at line 22 of file plotmagnifier.cpp.

void PlotMagnifier::setDefaultMode ( AxisMode  mode)
inline

Definition at line 32 of file plotmagnifier.h.

void PlotMagnifier::widgetMousePressEvent ( QMouseEvent *  mouseEvent)
overrideprotectedvirtual

Handle a mouse press event for the observed widget.

Parameters
mouseEventMouse event
See also
eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()

Reimplemented from QwtMagnifier.

Definition at line 141 of file plotmagnifier.cpp.

void PlotMagnifier::widgetWheelEvent ( QWheelEvent *  wheelEvent)
overridevirtual

Handle a wheel event for the observed widget.

Parameters
wheelEventWheel event
See also
eventFilter()

Reimplemented from QwtMagnifier.

Definition at line 135 of file plotmagnifier.cpp.

Member Data Documentation

AxisMode PlotMagnifier::_default_mode
private

Definition at line 53 of file plotmagnifier.h.

QTimer PlotMagnifier::_future_emit
private

Definition at line 52 of file plotmagnifier.h.

double PlotMagnifier::_lower_bounds[QwtPlot::axisCnt]
protected

Definition at line 42 of file plotmagnifier.h.

QPointF PlotMagnifier::_mouse_position
protected

Definition at line 45 of file plotmagnifier.h.

double PlotMagnifier::_upper_bounds[QwtPlot::axisCnt]
protected

Definition at line 43 of file plotmagnifier.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49