QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
QwtMagnifier Class Referenceabstract

QwtMagnifier provides zooming by magnifying in steps. More...

#include <qwt_magnifier.h>

Inheritance diagram for QwtMagnifier:
QwtPlotMagnifier QwtPolarMagnifier

Classes

class  PrivateData
 

Public Member Functions

 QwtMagnifier (QWidget *)
 Constructor.
 
virtual ~QwtMagnifier ()
 Destructor .
 
QWidget * parentWidget ()
 Return the parent widget where the rescaling happens.
 
const QWidget * parentWidget () const
 Return the parent widget where the rescaling happens.
 
void setEnabled (bool)
 En/disable the magnifier.
 
bool isEnabled () const
 Return whether the magnifier is enabled.
 
void setMouseFactor (double)
 Change the mouse factor.
 
double mouseFactor () const
 Return the mouse factor.
 
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
 Get the mouse button and modifiers used for zooming.
 
void setWheelFactor (double)
 Change the wheel factor.
 
double wheelFactor () const
 Return the wheel factor.
 
void setWheelModifiers (Qt::KeyboardModifiers)
 Assign keyboard modifiers for zooming in/out using the wheel.
 
Qt::KeyboardModifiers wheelModifiers () const
 Return the wheel modifiers.
 
void setKeyFactor (double)
 Change the key factor.
 
double keyFactor () const
 Return the key factor.
 
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 *) override
 Event filter.
 

Protected Member Functions

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

QwtMagnifier provides zooming by magnifying in steps.

Constructor & Destructor Documentation

◆ QwtMagnifier()

QwtMagnifier::QwtMagnifier ( QWidget *  parent)
explicit

Constructor.

◆ ~QwtMagnifier()

QwtMagnifier::~QwtMagnifier ( )
virtual

Destructor .

Member Function Documentation

◆ eventFilter()

bool QwtMagnifier::eventFilter ( QObject *  object,
QEvent *  event 
)
overridevirtual

Event filter.

◆ getMouseButton()

void QwtMagnifier::getMouseButton ( Qt::MouseButton &  button,
Qt::KeyboardModifiers &  modifiers 
) const

Get the mouse button and modifiers used for zooming.

◆ getZoomInKey()

void QwtMagnifier::getZoomInKey ( int &  key,
Qt::KeyboardModifiers &  modifiers 
) const

Retrieve the settings of the zoom in key.

◆ getZoomOutKey()

void QwtMagnifier::getZoomOutKey ( int &  key,
Qt::KeyboardModifiers &  modifiers 
) const

Retrieve the settings of the zoom out key.

◆ isEnabled()

bool QwtMagnifier::isEnabled ( ) const

Return whether the magnifier is enabled.

◆ keyFactor()

double QwtMagnifier::keyFactor ( ) const

Return the key factor.

◆ mouseFactor()

double QwtMagnifier::mouseFactor ( ) const

Return the mouse factor.

◆ parentWidget() [1/2]

QWidget * QwtMagnifier::parentWidget ( )

Return the parent widget where the rescaling happens.

◆ parentWidget() [2/2]

const QWidget * QwtMagnifier::parentWidget ( ) const

Return the parent widget where the rescaling happens.

◆ rescale()

virtual void QwtMagnifier::rescale ( double  factor)
protectedpure virtual

Rescale the parent widget.

◆ setEnabled()

void QwtMagnifier::setEnabled ( bool  on)

En/disable the magnifier.

◆ setKeyFactor()

void QwtMagnifier::setKeyFactor ( double  factor)

Change the key factor.

◆ setMouseButton()

void QwtMagnifier::setMouseButton ( Qt::MouseButton  button,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)

Assign the mouse button that is used for zooming in/out.

◆ setMouseFactor()

void QwtMagnifier::setMouseFactor ( double  factor)

Change the mouse factor.

◆ setWheelFactor()

void QwtMagnifier::setWheelFactor ( double  factor)

Change the wheel factor.

◆ setWheelModifiers()

void QwtMagnifier::setWheelModifiers ( Qt::KeyboardModifiers  modifiers)

Assign keyboard modifiers for zooming in/out using the wheel.

◆ setZoomInKey()

void QwtMagnifier::setZoomInKey ( int  key,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)

Assign the key that is used for zooming in.

◆ setZoomOutKey()

void QwtMagnifier::setZoomOutKey ( int  key,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)

Assign the key that is used for zooming out.

◆ wheelFactor()

double QwtMagnifier::wheelFactor ( ) const

Return the wheel factor.

◆ wheelModifiers()

Qt::KeyboardModifiers QwtMagnifier::wheelModifiers ( ) const

Return the wheel modifiers.

◆ widgetKeyPressEvent()

void QwtMagnifier::widgetKeyPressEvent ( QKeyEvent *  keyEvent)
protectedvirtual

Handle a key press event for the observed widget.

Parameters
keyEventKey event
See also
eventFilter(), widgetKeyReleaseEvent()

Reimplemented in QwtPolarMagnifier.

◆ widgetKeyReleaseEvent()

void QwtMagnifier::widgetKeyReleaseEvent ( QKeyEvent *  keyEvent)
protectedvirtual

Handle a key release event for the observed widget.

Parameters
keyEventKey event
See also
eventFilter(), widgetKeyReleaseEvent()

◆ widgetMouseMoveEvent()

void QwtMagnifier::widgetMouseMoveEvent ( QMouseEvent *  mouseEvent)
protectedvirtual

Handle a mouse move event for the observed widget.

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

◆ widgetMousePressEvent()

void QwtMagnifier::widgetMousePressEvent ( QMouseEvent *  mouseEvent)
protectedvirtual

Handle a mouse press event for the observed widget.

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

◆ widgetMouseReleaseEvent()

void QwtMagnifier::widgetMouseReleaseEvent ( QMouseEvent *  mouseEvent)
protectedvirtual

Handle a mouse release event for the observed widget.

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

◆ widgetWheelEvent()

void QwtMagnifier::widgetWheelEvent ( QWheelEvent *  wheelEvent)
protectedvirtual

Handle a wheel event for the observed widget.

Parameters
wheelEventWheel event
See also
eventFilter()

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