QwtMagnifier(3) Qwt User's Guide QwtMagnifier(3)

QwtMagnifier - QwtMagnifier provides zooming, by magnifying in steps.

#include <qwt_magnifier.h>

Inherits QObject.

Inherited by QwtPlotMagnifier.


QwtMagnifier (QWidget *)
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)
void getMouseButton (Qt::MouseButton &, Qt::KeyboardModifiers &) const
void setWheelFactor (double)
Change the wheel factor. double wheelFactor () const
void setWheelModifiers (Qt::KeyboardModifiers)
Qt::KeyboardModifiers wheelModifiers () const
void setKeyFactor (double)
Change the key factor. double keyFactor () const
void setZoomInKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
void getZoomInKey (int &key, Qt::KeyboardModifiers &) const
Retrieve the settings of the zoom in key. void setZoomOutKey (int key, Qt::KeyboardModifiers=Qt::NoModifier)
void getZoomOutKey (int &key, Qt::KeyboardModifiers &) const
Retrieve the settings of the zoom out key. virtual bool eventFilter (QObject *, QEvent *)
Event filter.


virtual void rescale (double factor)=0
virtual void widgetMousePressEvent (QMouseEvent *)
virtual void widgetMouseReleaseEvent (QMouseEvent *)
virtual void widgetMouseMoveEvent (QMouseEvent *)
virtual void widgetWheelEvent (QWheelEvent *)
virtual void widgetKeyPressEvent (QKeyEvent *)
virtual void widgetKeyReleaseEvent (QKeyEvent *)

QwtMagnifier provides zooming, by magnifying in steps.

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

Constructor

Parameters:

parent Widget to be magnified

Event filter. When isEnabled() is true, the mouse events of the observed widget are filtered.

Parameters:

object Object to be filtered
event Event

Returns:

Forwarded to QObject::eventFilter()

See also:

widgetMousePressEvent(), widgetMouseReleaseEvent(), widgetMouseMoveEvent(), widgetWheelEvent(), widgetKeyPressEvent() widgetKeyReleaseEvent()

See also:

setMouseButton()

Retrieve the settings of the zoom in key.

Parameters:

key Key code, see Qt::Key
modifiers Keyboard modifiers

See also:

setZoomInKey()

Retrieve the settings of the zoom out key.

Parameters:

key Key code, see Qt::Key
modifiers Keyboard modifiers

See also:

setZoomOutKey()

Returns:

true when enabled, false otherwise

See also:

setEnabled(), eventFilter()

Returns:

Key factor

See also:

setKeyFactor()

Returns:

Mouse factor

See also:

setMouseFactor()

Returns:

Parent widget, where the rescaling happens

Returns:

Parent widget, where the rescaling happens

Rescale the parent widget

Parameters:

factor Scale factor

Implemented in QwtPlotMagnifier.

En/disable the magnifier. When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed.

Parameters:

on true or false

See also:

isEnabled(), eventFilter()

Change the key factor. The key factor defines the ratio between the current range on the parent widget and the zoomed range for each key press of the zoom in/out keys. The default value is 0.9.

Parameters:

factor Key factor

See also:

keyFactor(), setZoomInKey(), setZoomOutKey(), setWheelFactor, setMouseFactor()

Assign the mouse button, that is used for zooming in/out. The default value is Qt::RightButton.

Parameters:

button Button
modifiers Keyboard modifiers

See also:

getMouseButton()

Change the mouse factor. The mouse factor defines the ratio between the current range on the parent widget and the zoomed range for each vertical mouse movement. The default value is 0.95.

Parameters:

factor Wheel factor

See also:

mouseFactor(), setMouseButton(), setWheelFactor(), setKeyFactor()

Change the wheel factor. The wheel factor defines the ratio between the current range on the parent widget and the zoomed range for each step of the wheel.

Use values > 1 for magnification (i.e. 2.0) and values < 1 for scaling down (i.e. 1/2.0 = 0.5). You can use this feature for inverting the direction of the wheel.

The default value is 0.9.

Parameters:

factor Wheel factor

See also:

wheelFactor(), setWheelButtonState(), setMouseFactor(), setKeyFactor()

Assign keyboard modifiers for zooming in/out using the wheel. The default modifiers are Qt::NoModifiers.

Parameters:

modifiers Keyboard modifiers

See also:

wheelModifiers()

Assign the key, that is used for zooming in. The default combination is Qt::Key_Plus + Qt::NoModifier.

Parameters:

key
modifiers

See also:

getZoomInKey(), setZoomOutKey()

Assign the key, that is used for zooming out. The default combination is Qt::Key_Minus + Qt::NoModifier.

Parameters:

key
modifiers

See also:

getZoomOutKey(), setZoomOutKey()

Returns:

Wheel factor

See also:

setWheelFactor()

Returns:

Wheel modifiers

See also:

setWheelModifiers()

Handle a key press event for the observed widget.

Parameters:

keyEvent Key event

See also:

eventFilter(), widgetKeyReleaseEvent()

Handle a key release event for the observed widget.

Parameters:

keyEvent Key event

See also:

eventFilter(), widgetKeyReleaseEvent()

Handle a mouse move event for the observed widget.

Parameters:

mouseEvent Mouse event

See also:

eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),

Handle a mouse press event for the observed widget.

Parameters:

mouseEvent Mouse event

See also:

eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()

Handle a mouse release event for the observed widget.

Parameters:

mouseEvent Mouse event

See also:

eventFilter(), widgetMousePressEvent(), widgetMouseMoveEvent(),

Handle a wheel event for the observed widget.

Parameters:

wheelEvent Wheel event

See also:

eventFilter()

Generated automatically by Doxygen for Qwt User's Guide from the source code.

Wed Jan 2 2019 Version 6.1.4