boolQwtMagnifier::eventFilter(QObject*object,QEvent*event)[virtual]
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()
Seealso:widgetMousePressEvent(), widgetMouseReleaseEvent(), widgetMouseMoveEvent(), widgetWheelEvent(),
widgetKeyPressEvent()widgetKeyReleaseEvent()voidQwtMagnifier::getMouseButton(Qt::MouseButton&button,Qt::KeyboardModifiers&modifiers)constSeealso:setMouseButton()voidQwtMagnifier::getZoomInKey(int&key,Qt::KeyboardModifiers&modifiers)const
Retrieve the settings of the zoom in key.
Parameters:key Key code, see Qt::Key
modifiers Keyboard modifiers
Seealso:setZoomInKey()voidQwtMagnifier::getZoomOutKey(int&key,Qt::KeyboardModifiers&modifiers)const
Retrieve the settings of the zoom out key.
Parameters:key Key code, see Qt::Key
modifiers Keyboard modifiers
Seealso:setZoomOutKey()boolQwtMagnifier::isEnabled()constReturns:
true when enabled, false otherwise
Seealso:setEnabled(), eventFilter()doubleQwtMagnifier::keyFactor()constReturns:
Key factor
Seealso:setKeyFactor()doubleQwtMagnifier::mouseFactor()constReturns:
Mouse factor
Seealso:setMouseFactor()QWidget*QwtMagnifier::parentWidget()Returns:
Parent widget, where the rescaling happens
constQWidget*QwtMagnifier::parentWidget()constReturns:
Parent widget, where the rescaling happens
virtualvoidQwtMagnifier::rescale(doublefactor)[protected],[purevirtual]
Rescale the parent widget
Parameters:factor Scale factor
Implemented in QwtPlotMagnifier.
voidQwtMagnifier::setEnabled(boolon)
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
Seealso:isEnabled(), eventFilter()voidQwtMagnifier::setKeyFactor(doublefactor)
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
Seealso:keyFactor(), setZoomInKey(), setZoomOutKey(), setWheelFactor, setMouseFactor()voidQwtMagnifier::setMouseButton(Qt::MouseButtonbutton,Qt::KeyboardModifiersmodifiers=Qt::NoModifier)
Assign the mouse button, that is used for zooming in/out. The default value is Qt::RightButton.
Parameters:button Button
modifiers Keyboard modifiers
Seealso:getMouseButton()voidQwtMagnifier::setMouseFactor(doublefactor)
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
Seealso:mouseFactor(), setMouseButton(), setWheelFactor(), setKeyFactor()voidQwtMagnifier::setWheelFactor(doublefactor)
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
Seealso:wheelFactor(), setWheelButtonState(), setMouseFactor(), setKeyFactor()voidQwtMagnifier::setWheelModifiers(Qt::KeyboardModifiersmodifiers)
Assign keyboard modifiers for zooming in/out using the wheel. The default modifiers are Qt::NoModifiers.
Parameters:modifiers Keyboard modifiers
Seealso:wheelModifiers()voidQwtMagnifier::setZoomInKey(intkey,Qt::KeyboardModifiersmodifiers=Qt::NoModifier)
Assign the key, that is used for zooming in. The default combination is Qt::Key_Plus + Qt::NoModifier.
Parameters:keymodifiersSeealso:getZoomInKey(), setZoomOutKey()voidQwtMagnifier::setZoomOutKey(intkey,Qt::KeyboardModifiersmodifiers=Qt::NoModifier)
Assign the key, that is used for zooming out. The default combination is Qt::Key_Minus + Qt::NoModifier.
Parameters:keymodifiersSeealso:getZoomOutKey(), setZoomOutKey()doubleQwtMagnifier::wheelFactor()constReturns:
Wheel factor
Seealso:setWheelFactor()Qt::KeyboardModifiersQwtMagnifier::wheelModifiers()constReturns:
Wheel modifiers
Seealso:setWheelModifiers()voidQwtMagnifier::widgetKeyPressEvent(QKeyEvent*keyEvent)[protected],[virtual]
Handle a key press event for the observed widget.
Parameters:keyEvent Key event
Seealso:eventFilter(), widgetKeyReleaseEvent()voidQwtMagnifier::widgetKeyReleaseEvent(QKeyEvent*keyEvent)[protected],[virtual]
Handle a key release event for the observed widget.
Parameters:keyEvent Key event
Seealso:eventFilter(), widgetKeyReleaseEvent()voidQwtMagnifier::widgetMouseMoveEvent(QMouseEvent*mouseEvent)[protected],[virtual]
Handle a mouse move event for the observed widget.
Parameters:mouseEvent Mouse event
Seealso:eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),
voidQwtMagnifier::widgetMousePressEvent(QMouseEvent*mouseEvent)[protected],[virtual]
Handle a mouse press event for the observed widget.
Parameters:mouseEvent Mouse event
Seealso:eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()voidQwtMagnifier::widgetMouseReleaseEvent(QMouseEvent*mouseEvent)[protected],[virtual]
Handle a mouse release event for the observed widget.
Parameters:mouseEvent Mouse event
Seealso:eventFilter(), widgetMousePressEvent(), widgetMouseMoveEvent(),
voidQwtMagnifier::widgetWheelEvent(QWheelEvent*wheelEvent)[protected],[virtual]
Handle a wheel event for the observed widget.
Parameters:wheelEvent Wheel event
Seealso:eventFilter()