QwtMagnifier(3)
π QwtMagnifier(3) β from the Qwt User's Guide, bestie π
okay so this page is from the Qwt User's Guide and it's literally all about QwtMagnifier, the little icon that zooms your plots β¨
β¨ NAME β¨
QwtMagnifier β QwtMagnifier provides zooming, by magnifying in steps. that's it, that's the whole vibe π¦
πΈ SYNOPSIS πΈ
#include <qwt_magnifier.h>
- Inherits
QObject. π - Inherited by
QwtPlotMagnifier, andQwtPolarMagnifier.
π Public Member Functions
QwtMagnifier (QWidget *)virtual ~QwtMagnifier ()β Destructor.QWidget * parentWidget ()const QWidget * parentWidget () constvoid setEnabled (bool)β En/disable the magnifier.bool isEnabled () constvoid setMouseFactor (double)β Change the mouse factor.double mouseFactor () constvoid setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)void getMouseButton (Qt::MouseButton &, Qt::KeyboardModifiers &) constvoid setWheelFactor (double)β Change the wheel factor.double wheelFactor () constvoid setWheelModifiers (Qt::KeyboardModifiers)Qt::KeyboardModifiers wheelModifiers () constvoid setKeyFactor (double)β Change the key factor.double keyFactor () constvoid 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 *) overrideβ Event filter.
π«Ά Protected Member Functions
virtual void rescale (double factor)=0virtual void widgetMousePressEvent (QMouseEvent *)virtual void widgetMouseReleaseEvent (QMouseEvent *)virtual void widgetMouseMoveEvent (QMouseEvent *)virtual void widgetWheelEvent (QWheelEvent *)virtual void widgetKeyPressEvent (QKeyEvent *)virtual void widgetKeyReleaseEvent (QKeyEvent *)
π Detailed Description π
QwtMagnifier provides zooming, by magnifying in steps. no cap, that's the whole point π₯
Using QwtMagnifier a plot can be zoomed in/out in steps using keys, the mouse wheel or moving a mouse button in vertical direction. three whole ways, pick your fighter π
Definition at line 27 of file qwt_magnifier.h.
π Constructor & Destructor Documentation π
QwtMagnifier::QwtMagnifier (QWidget * parent) [explicit]
Constructor β¨
Parameters
- parent β Widget to be magnified
Definition at line 63 of file qwt_magnifier.cpp.
QwtMagnifier::~QwtMagnifier () [virtual]
Destructor. say bye bestie π
Definition at line 78 of file qwt_magnifier.cpp.
π Member Function Documentation π
bool QwtMagnifier::eventFilter (QObject * object, QEvent * event) [override], [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()
See also
widgetMousePressEvent(), widgetMouseReleaseEvent(), widgetMouseMoveEvent(), widgetWheelEvent(), widgetKeyPressEvent(), widgetKeyReleaseEvent()
Definition at line 317 of file qwt_magnifier.cpp.
void QwtMagnifier::getMouseButton (Qt::MouseButton & button, Qt::KeyboardModifiers & modifiers) const
See also
setMouseButton()
Definition at line 210 of file qwt_magnifier.cpp.
void QwtMagnifier::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
See also
setZoomInKey()
Definition at line 265 of file qwt_magnifier.cpp.
void QwtMagnifier::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
See also
setZoomOutKey()
Definition at line 295 of file qwt_magnifier.cpp.
bool QwtMagnifier::isEnabled () const
Returns
truewhen enabled,falseotherwise
See also
setEnabled(), eventFilter()
Definition at line 113 of file qwt_magnifier.cpp.
double QwtMagnifier::keyFactor () const
Returns
- Key factor
See also
setKeyFactor()
Definition at line 237 of file qwt_magnifier.cpp.
double QwtMagnifier::mouseFactor () const
Returns
- Mouse factor
See also
setMouseFactor()
Definition at line 188 of file qwt_magnifier.cpp.
QWidget * QwtMagnifier::parentWidget ()
Returns
- Parent widget, where the rescaling happens
Definition at line 499 of file qwt_magnifier.cpp.
const QWidget * QwtMagnifier::parentWidget () const
Returns
- Parent widget, where the rescaling happens
Definition at line 505 of file qwt_magnifier.cpp.
virtual void QwtMagnifier::rescale (double factor) [protected], [pure virtual]
Rescale the parent widget π
Parameters
- factor β Scale factor
void QwtMagnifier::setEnabled (bool on)
En/disable the magnifier. When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed. it's giving on/off switch energy π‘
Parameters
- on β
trueorfalse
See also
isEnabled(), eventFilter()
Definition at line 92 of file qwt_magnifier.cpp.
void QwtMagnifier::setKeyFactor (double factor)
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()
Definition at line 228 of file qwt_magnifier.cpp.
void QwtMagnifier::setMouseButton (Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 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
See also
getMouseButton()
Definition at line 202 of file qwt_magnifier.cpp.
void QwtMagnifier::setMouseFactor (double factor)
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()
Definition at line 179 of file qwt_magnifier.cpp.
void QwtMagnifier::setWheelFactor (double factor)
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. lowkey genius tbh
The default value is 0.9.
Parameters
- factor β Wheel factor
See also
wheelFactor(), setWheelButtonState(), setMouseFactor(), setKeyFactor()
Definition at line 134 of file qwt_magnifier.cpp.
void QwtMagnifier::setWheelModifiers (Qt::KeyboardModifiers modifiers)
Assign keyboard modifiers for zooming in/out using the wheel. The default modifiers are Qt::NoModifiers.
Parameters
- modifiers β Keyboard modifiers
See also
wheelModifiers()
Definition at line 155 of file qwt_magnifier.cpp.
void QwtMagnifier::setZoomInKey (int key, Qt::KeyboardModifiers modifiers = Qt::NoModifier)
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()
Definition at line 250 of file qwt_magnifier.cpp.
void QwtMagnifier::setZoomOutKey (int key, Qt::KeyboardModifiers modifiers = Qt::NoModifier)
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()
Definition at line 280 of file qwt_magnifier.cpp.
double QwtMagnifier::wheelFactor () const
Returns
- Wheel factor
See also
setWheelFactor()
Definition at line 143 of file qwt_magnifier.cpp.
Qt::KeyboardModifiers QwtMagnifier::wheelModifiers () const
Returns
- Wheel modifiers
See also
setWheelModifiers()
Definition at line 164 of file qwt_magnifier.cpp.
void QwtMagnifier::widgetKeyPressEvent (QKeyEvent * keyEvent) [protected], [virtual]
Handle a key press event for the observed widget.
Parameters
- keyEvent β Key event
See also
eventFilter(), widgetKeyReleaseEvent()
Reimplemented in QwtPolarMagnifier.
Definition at line 473 of file qwt_magnifier.cpp.
void QwtMagnifier::widgetKeyReleaseEvent (QKeyEvent * keyEvent) [protected], [virtual]
Handle a key release event for the observed widget.
Parameters
- keyEvent β Key event
See also
eventFilter(), widgetKeyReleaseEvent()
Definition at line 493 of file qwt_magnifier.cpp.
void QwtMagnifier::widgetMouseMoveEvent (QMouseEvent * mouseEvent) [protected], [virtual]
Handle a mouse move event for the observed widget.
Parameters
- mouseEvent β Mouse event
See also
eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),
Definition at line 407 of file qwt_magnifier.cpp.
void QwtMagnifier::widgetMousePressEvent (QMouseEvent * mouseEvent) [protected], [virtual]
Handle a mouse press event for the observed widget.
Parameters
- mouseEvent β Mouse event
See also
eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()
Definition at line 365 of file qwt_magnifier.cpp.
void QwtMagnifier::widgetMouseReleaseEvent (QMouseEvent * mouseEvent) [protected], [virtual]
Handle a mouse release event for the observed widget.
Parameters
- mouseEvent β Mouse event
See also
eventFilter(), widgetMousePressEvent(), widgetMouseMoveEvent(),
Definition at line 390 of file qwt_magnifier.cpp.
void QwtMagnifier::widgetWheelEvent (QWheelEvent * wheelEvent) [protected], [virtual]
Handle a wheel event for the observed widget.
Parameters
- wheelEvent β Wheel event
See also
eventFilter()
Definition at line 431 of file qwt_magnifier.cpp.
π¦ Author π¦
Generated automatically by Doxygen for Qwt User's Guide from the source code. not a human, just a robot doing its little thing π€π
and that's the whole page bestie, mwah π β this was QwtMagnifier(3) from the Qwt User's Guide, served fresh by Doxygen straight from the source code. go zoom something iconic β¨π
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms