.TH "QwtMagnifier" 3 "Sun Jul 18 2021" "Version 6.2.0" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtMagnifier \- \fBQwtMagnifier\fP provides zooming, by magnifying in steps\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits QObject\&. .PP Inherited by \fBQwtPlotMagnifier\fP, and \fBQwtPolarMagnifier\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtMagnifier\fP (QWidget *)" .br .ti -1c .RI "virtual \fB~QwtMagnifier\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "QWidget * \fBparentWidget\fP ()" .br .ti -1c .RI "const QWidget * \fBparentWidget\fP () const" .br .ti -1c .RI "void \fBsetEnabled\fP (bool)" .br .RI "En/disable the magnifier\&. " .ti -1c .RI "bool \fBisEnabled\fP () const" .br .ti -1c .RI "void \fBsetMouseFactor\fP (double)" .br .RI "Change the mouse factor\&. " .ti -1c .RI "double \fBmouseFactor\fP () const" .br .ti -1c .RI "void \fBsetMouseButton\fP (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)" .br .ti -1c .RI "void \fBgetMouseButton\fP (Qt::MouseButton &, Qt::KeyboardModifiers &) const" .br .ti -1c .RI "void \fBsetWheelFactor\fP (double)" .br .RI "Change the wheel factor\&. " .ti -1c .RI "double \fBwheelFactor\fP () const" .br .ti -1c .RI "void \fBsetWheelModifiers\fP (Qt::KeyboardModifiers)" .br .ti -1c .RI "Qt::KeyboardModifiers \fBwheelModifiers\fP () const" .br .ti -1c .RI "void \fBsetKeyFactor\fP (double)" .br .RI "Change the key factor\&. " .ti -1c .RI "double \fBkeyFactor\fP () const" .br .ti -1c .RI "void \fBsetZoomInKey\fP (int key, Qt::KeyboardModifiers=Qt::NoModifier)" .br .ti -1c .RI "void \fBgetZoomInKey\fP (int &key, Qt::KeyboardModifiers &) const" .br .RI "Retrieve the settings of the zoom in key\&. " .ti -1c .RI "void \fBsetZoomOutKey\fP (int key, Qt::KeyboardModifiers=Qt::NoModifier)" .br .ti -1c .RI "void \fBgetZoomOutKey\fP (int &key, Qt::KeyboardModifiers &) const" .br .RI "Retrieve the settings of the zoom out key\&. " .ti -1c .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *) override" .br .RI "Event filter\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBrescale\fP (double factor)=0" .br .ti -1c .RI "virtual void \fBwidgetMousePressEvent\fP (QMouseEvent *)" .br .ti -1c .RI "virtual void \fBwidgetMouseReleaseEvent\fP (QMouseEvent *)" .br .ti -1c .RI "virtual void \fBwidgetMouseMoveEvent\fP (QMouseEvent *)" .br .ti -1c .RI "virtual void \fBwidgetWheelEvent\fP (QWheelEvent *)" .br .ti -1c .RI "virtual void \fBwidgetKeyPressEvent\fP (QKeyEvent *)" .br .ti -1c .RI "virtual void \fBwidgetKeyReleaseEvent\fP (QKeyEvent *)" .br .in -1c .SH "Detailed Description" .PP \fBQwtMagnifier\fP provides zooming, by magnifying in steps\&. Using \fBQwtMagnifier\fP a plot can be zoomed in/out in steps using keys, the mouse wheel or moving a mouse button in vertical direction\&. .PP Definition at line 27 of file qwt_magnifier\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "QwtMagnifier::QwtMagnifier (QWidget * parent)\fC [explicit]\fP" Constructor .PP \fBParameters\fP .RS 4 \fIparent\fP Widget to be magnified .RE .PP .PP Definition at line 63 of file qwt_magnifier\&.cpp\&. .SH "Member Function Documentation" .PP .SS "bool QwtMagnifier::eventFilter (QObject * object, QEvent * event)\fC [override]\fP, \fC [virtual]\fP" .PP Event filter\&. When \fBisEnabled()\fP is true, the mouse events of the observed widget are filtered\&. .PP \fBParameters\fP .RS 4 \fIobject\fP Object to be filtered .br \fIevent\fP Event .RE .PP \fBReturns\fP .RS 4 Forwarded to QObject::eventFilter() .RE .PP \fBSee also\fP .RS 4 \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP, \fBwidgetWheelEvent()\fP, \fBwidgetKeyPressEvent()\fP \fBwidgetKeyReleaseEvent()\fP .RE .PP .PP Definition at line 317 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::getMouseButton (Qt::MouseButton & button, Qt::KeyboardModifiers & modifiers) const" .PP \fBSee also\fP .RS 4 \fBsetMouseButton()\fP .RE .PP .PP Definition at line 210 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::getZoomInKey (int & key, Qt::KeyboardModifiers & modifiers) const" .PP Retrieve the settings of the zoom in key\&. .PP \fBParameters\fP .RS 4 \fIkey\fP Key code, see Qt::Key .br \fImodifiers\fP Keyboard modifiers .RE .PP \fBSee also\fP .RS 4 \fBsetZoomInKey()\fP .RE .PP .PP Definition at line 265 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::getZoomOutKey (int & key, Qt::KeyboardModifiers & modifiers) const" .PP Retrieve the settings of the zoom out key\&. .PP \fBParameters\fP .RS 4 \fIkey\fP Key code, see Qt::Key .br \fImodifiers\fP Keyboard modifiers .RE .PP \fBSee also\fP .RS 4 \fBsetZoomOutKey()\fP .RE .PP .PP Definition at line 295 of file qwt_magnifier\&.cpp\&. .SS "bool QwtMagnifier::isEnabled () const" .PP \fBReturns\fP .RS 4 true when enabled, false otherwise .RE .PP \fBSee also\fP .RS 4 \fBsetEnabled()\fP, \fBeventFilter()\fP .RE .PP .PP Definition at line 113 of file qwt_magnifier\&.cpp\&. .SS "double QwtMagnifier::keyFactor () const" .PP \fBReturns\fP .RS 4 Key factor .RE .PP \fBSee also\fP .RS 4 \fBsetKeyFactor()\fP .RE .PP .PP Definition at line 237 of file qwt_magnifier\&.cpp\&. .SS "double QwtMagnifier::mouseFactor () const" .PP \fBReturns\fP .RS 4 Mouse factor .RE .PP \fBSee also\fP .RS 4 \fBsetMouseFactor()\fP .RE .PP .PP Definition at line 188 of file qwt_magnifier\&.cpp\&. .SS "QWidget * QwtMagnifier::parentWidget ()" .PP \fBReturns\fP .RS 4 Parent widget, where the rescaling happens .RE .PP .PP Definition at line 499 of file qwt_magnifier\&.cpp\&. .SS "const QWidget * QwtMagnifier::parentWidget () const" .PP \fBReturns\fP .RS 4 Parent widget, where the rescaling happens .RE .PP .PP Definition at line 505 of file qwt_magnifier\&.cpp\&. .SS "virtual void QwtMagnifier::rescale (double factor)\fC [protected]\fP, \fC [pure virtual]\fP" Rescale the parent widget .PP \fBParameters\fP .RS 4 \fIfactor\fP Scale factor .RE .PP .SS "void QwtMagnifier::setEnabled (bool on)" .PP En/disable the magnifier\&. When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed\&. .PP \fBParameters\fP .RS 4 \fIon\fP true or false .RE .PP \fBSee also\fP .RS 4 \fBisEnabled()\fP, \fBeventFilter()\fP .RE .PP .PP Definition at line 92 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setKeyFactor (double factor)" .PP 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\&. .PP \fBParameters\fP .RS 4 \fIfactor\fP Key factor .RE .PP \fBSee also\fP .RS 4 \fBkeyFactor()\fP, \fBsetZoomInKey()\fP, \fBsetZoomOutKey()\fP, \fBsetWheelFactor\fP, \fBsetMouseFactor()\fP .RE .PP .PP Definition at line 228 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setMouseButton (Qt::MouseButton button, Qt::KeyboardModifiers modifiers = \fCQt::NoModifier\fP)" Assign the mouse button, that is used for zooming in/out\&. The default value is Qt::RightButton\&. .PP \fBParameters\fP .RS 4 \fIbutton\fP Button .br \fImodifiers\fP Keyboard modifiers .RE .PP \fBSee also\fP .RS 4 \fBgetMouseButton()\fP .RE .PP .PP Definition at line 202 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setMouseFactor (double factor)" .PP 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\&. .PP \fBParameters\fP .RS 4 \fIfactor\fP Wheel factor .RE .PP \fBSee also\fP .RS 4 \fBmouseFactor()\fP, \fBsetMouseButton()\fP, \fBsetWheelFactor()\fP, \fBsetKeyFactor()\fP .RE .PP .PP Definition at line 179 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setWheelFactor (double factor)" .PP 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\&. .PP 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\&. .PP The default value is 0\&.9\&. .PP \fBParameters\fP .RS 4 \fIfactor\fP Wheel factor .RE .PP \fBSee also\fP .RS 4 \fBwheelFactor()\fP, setWheelButtonState(), \fBsetMouseFactor()\fP, \fBsetKeyFactor()\fP .RE .PP .PP Definition at line 134 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setWheelModifiers (Qt::KeyboardModifiers modifiers)" Assign keyboard modifiers for zooming in/out using the wheel\&. The default modifiers are Qt::NoModifiers\&. .PP \fBParameters\fP .RS 4 \fImodifiers\fP Keyboard modifiers .RE .PP \fBSee also\fP .RS 4 \fBwheelModifiers()\fP .RE .PP .PP Definition at line 155 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setZoomInKey (int key, Qt::KeyboardModifiers modifiers = \fCQt::NoModifier\fP)" Assign the key, that is used for zooming in\&. The default combination is Qt::Key_Plus + Qt::NoModifier\&. .PP \fBParameters\fP .RS 4 \fIkey\fP .br \fImodifiers\fP .RE .PP \fBSee also\fP .RS 4 \fBgetZoomInKey()\fP, \fBsetZoomOutKey()\fP .RE .PP .PP Definition at line 250 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::setZoomOutKey (int key, Qt::KeyboardModifiers modifiers = \fCQt::NoModifier\fP)" Assign the key, that is used for zooming out\&. The default combination is Qt::Key_Minus + Qt::NoModifier\&. .PP \fBParameters\fP .RS 4 \fIkey\fP .br \fImodifiers\fP .RE .PP \fBSee also\fP .RS 4 \fBgetZoomOutKey()\fP, \fBsetZoomOutKey()\fP .RE .PP .PP Definition at line 280 of file qwt_magnifier\&.cpp\&. .SS "double QwtMagnifier::wheelFactor () const" .PP \fBReturns\fP .RS 4 Wheel factor .RE .PP \fBSee also\fP .RS 4 \fBsetWheelFactor()\fP .RE .PP .PP Definition at line 143 of file qwt_magnifier\&.cpp\&. .SS "Qt::KeyboardModifiers QwtMagnifier::wheelModifiers () const" .PP \fBReturns\fP .RS 4 Wheel modifiers .RE .PP \fBSee also\fP .RS 4 \fBsetWheelModifiers()\fP .RE .PP .PP Definition at line 164 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::widgetKeyPressEvent (QKeyEvent * keyEvent)\fC [protected]\fP, \fC [virtual]\fP" Handle a key press event for the observed widget\&. .PP \fBParameters\fP .RS 4 \fIkeyEvent\fP Key event .RE .PP \fBSee also\fP .RS 4 \fBeventFilter()\fP, \fBwidgetKeyReleaseEvent()\fP .RE .PP .PP Reimplemented in \fBQwtPolarMagnifier\fP\&. .PP Definition at line 473 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::widgetKeyReleaseEvent (QKeyEvent * keyEvent)\fC [protected]\fP, \fC [virtual]\fP" Handle a key release event for the observed widget\&. .PP \fBParameters\fP .RS 4 \fIkeyEvent\fP Key event .RE .PP \fBSee also\fP .RS 4 \fBeventFilter()\fP, \fBwidgetKeyReleaseEvent()\fP .RE .PP .PP Definition at line 493 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::widgetMouseMoveEvent (QMouseEvent * mouseEvent)\fC [protected]\fP, \fC [virtual]\fP" Handle a mouse move event for the observed widget\&. .PP \fBParameters\fP .RS 4 \fImouseEvent\fP Mouse event .RE .PP \fBSee also\fP .RS 4 \fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseReleaseEvent()\fP, .RE .PP .PP Definition at line 407 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::widgetMousePressEvent (QMouseEvent * mouseEvent)\fC [protected]\fP, \fC [virtual]\fP" Handle a mouse press event for the observed widget\&. .PP \fBParameters\fP .RS 4 \fImouseEvent\fP Mouse event .RE .PP \fBSee also\fP .RS 4 \fBeventFilter()\fP, \fBwidgetMouseReleaseEvent()\fP, \fBwidgetMouseMoveEvent()\fP .RE .PP .PP Definition at line 365 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::widgetMouseReleaseEvent (QMouseEvent * mouseEvent)\fC [protected]\fP, \fC [virtual]\fP" Handle a mouse release event for the observed widget\&. .PP \fBParameters\fP .RS 4 \fImouseEvent\fP Mouse event .RE .PP \fBSee also\fP .RS 4 \fBeventFilter()\fP, \fBwidgetMousePressEvent()\fP, \fBwidgetMouseMoveEvent()\fP, .RE .PP .PP Definition at line 390 of file qwt_magnifier\&.cpp\&. .SS "void QwtMagnifier::widgetWheelEvent (QWheelEvent * wheelEvent)\fC [protected]\fP, \fC [virtual]\fP" Handle a wheel event for the observed widget\&. .PP \fBParameters\fP .RS 4 \fIwheelEvent\fP Wheel event .RE .PP \fBSee also\fP .RS 4 \fBeventFilter()\fP .RE .PP .PP Definition at line 431 of file qwt_magnifier\&.cpp\&. .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.