QwtMagnifier(3)
π QwtMagnifier π
okay bestie, sit down, hydrate, and let's talk about the QwtMagnifier page from the Qwt User's Guide manual. She's a class, she zooms, she's lowkey iconic, and we're gonna go through every single line of her docs. no skimming. periodt. β¨
πΈ NAME πΈ
QwtMagnifier β and that's literally it, the original just leaves a lil dash hanging there like a cliffhanger. No description, no vibes explained, just the name. We respect the mystery. π«Ά
π¦ SYNOPSIS π¦
#include <qwt_magnifier.h>
Inherited by QwtPlotMagnifier. (yes, she has a whole sub-class, main character energy fr fr π)
π Public Member Functions
QwtMagnifier (QWidget *)virtual ~QwtMagnifier ()virtual bool eventFilter (QObject *, QEvent *)void getMouseButton (int &button, int &buttonState) constvoid getZoomInKey (int &key, int &modifiers) constvoid getZoomOutKey (int &key, int &modifiers) constbool isEnabled () constdouble keyFactor () constdouble mouseFactor () constQWidget * parentWidget ()const QWidget * parentWidget () constvoid setEnabled (bool)void setKeyFactor (double)void setMouseButton (int button, int buttonState=Qt::NoButton)void setMouseFactor (double)void setWheelButtonState (int buttonState)void setWheelFactor (double)void setZoomInKey (int key, int modifiers)void setZoomOutKey (int key, int modifiers)int wheelButtonState () constdouble wheelFactor () const
π Protected Member Functions
virtual void rescale (double factor)=0virtual void widgetKeyPressEvent (QKeyEvent *)virtual void widgetKeyReleaseEvent (QKeyEvent *)virtual void widgetMouseMoveEvent (QMouseEvent *)virtual void widgetMousePressEvent (QMouseEvent *)virtual void widgetMouseReleaseEvent (QMouseEvent *)virtual void widgetWheelEvent (QWheelEvent *)
β¨ Detailed Description β¨
okay so here's the tea: QwtMagnifier provides zooming, by magnifying in steps. That's the whole bit. π
And using QwtMagnifier, a plot can be zoomed in/out in steps using keys, the mouse wheel, or by moving a mouse button in vertical direction. Three whole ways to zoom. Versatile queen. π
πΌ Constructor & Destructor Documentation πΌ
QwtMagnifier::QwtMagnifier (QWidget *parent) [explicit]
Constructor. She's born. π
Parameters:
- parent β Widget to be magnified
π₯ Member Function Documentation π₯
bool QwtMagnifier::eventFilter (QObject *o, QEvent *e) [virtual]
Event filter. When isEnabled() is true, the mouse events of the observed widget are filtered. π
See also: widgetMousePressEvent(), widgetMouseReleaseEvent(), widgetMouseMoveEvent(), widgetWheelEvent(), widgetKeyPressEvent() widgetKeyReleaseEvent()
void QwtMagnifier::getMouseButton (int &button, int &buttonState) const
No prose here bestie, just a pointer. π See also: setMouseButton()
void QwtMagnifier::getZoomInKey (int &key, int &modifiers) const
See also: setZoomInKey()
void QwtMagnifier::getZoomOutKey (int &key, int &modifiers) const
See also: setZoomOutKey()
bool QwtMagnifier::isEnabled () const
Returns: true when enabled, false otherwise
See also: setEnabled(), eventFilter()
double QwtMagnifier::keyFactor () const
Returns: Key factor
See also: setKeyFactor()
double QwtMagnifier::mouseFactor () const
Returns: Mouse factor
See also: setMouseFactor()
QWidget * QwtMagnifier::parentWidget ()
Returns: Parent widget, where the rescaling happens
const QWidget * QwtMagnifier::parentWidget () const
Returns: Parent widget, where the rescaling happens
virtual void QwtMagnifier::rescale (double factor) [protected], [pure virtual]
Rescale the parent widget. It's pure virtual, so this one's a "you handle it, sub-class" situation. π«‘
Parameters:
- factor β Scale factor
Implemented in QwtPlotMagnifier.
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. On and off, no in-between. π
Parameters:
- on β
trueorfalse
See also: isEnabled(), eventFilter()
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()
void QwtMagnifier::setMouseButton (int button, int buttonState = Qt::NoButton)
Assign the mouse button that is used for zooming in/out. The default value is Qt::RightButton.
Parameters:
- button β Button
- buttonState β Button state
See also: getMouseButton()
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()
void QwtMagnifier::setWheelButtonState (int buttonState)
Assign a mandatory button state for zooming in/out using the wheel. The default button state is Qt::NoButton. Like, the wheel must have this state. Mandatory. She said what she said. π
Parameters:
- buttonState β Button state
See also: wheelButtonState()
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. The default value is 0.9.
Parameters:
- factor β Wheel factor
See also: wheelFactor(), setWheelButtonState(), setMouseFactor(), setKeyFactor()
void QwtMagnifier::setZoomInKey (int key, int modifiers)
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()
void QwtMagnifier::setZoomOutKey (int key, int modifiers)
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()
not the See also section pointing atsetZoomOutKey()from insidesetZoomOutKey(). bestie is her own reference. we don't ask questions, we just reproduce it faithfully. π
int QwtMagnifier::wheelButtonState () const
Returns: Wheel button state
See also: setWheelButtonState()
double QwtMagnifier::wheelFactor () const
Returns: Wheel factor
See also: setWheelFactor()
void QwtMagnifier::widgetKeyPressEvent (QKeyEvent *ke) [protected], [virtual]
Handle a key press event for the observed widget. β¨οΈ
Parameters:
- ke β Key event
See also: eventFilter(), widgetKeyReleaseEvent()
void QwtMagnifier::widgetKeyReleaseEvent (QKeyEvent *) [protected], [virtual]
Handle a key release event for the observed widget. (yes, the See also points back at itself again β iconic, honestly π)
Parameters:
- ke β Key event
See also: eventFilter(), widgetKeyReleaseEvent()
void QwtMagnifier::widgetMouseMoveEvent (QMouseEvent *me) [protected], [virtual]
Handle a mouse move event for the observed widget. π±οΈ
Parameters:
- me β Mouse event
See also: eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent(),
void QwtMagnifier::widgetMousePressEvent (QMouseEvent *me) [protected], [virtual]
Handle a mouse press event for the observed widget.
Parameters:
- me β Mouse event
See also: eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()
void QwtMagnifier::widgetMouseReleaseEvent (QMouseEvent *) [protected], [virtual]
Handle a mouse release event for the observed widget. (no Parameters block on this one, she keeps it minimal π)
See also: eventFilter(), widgetMousePressEvent(), widgetMouseMoveEvent(),
void QwtMagnifier::widgetWheelEvent (QWheelEvent *we) [protected], [virtual]
Handle a wheel event for the observed widget.
Parameters:
- we β Wheel event
See also: eventFilter()
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. So like, a robot wrote this, and now a girl on the internet is translating it. Full circle. π§
and that's the whole page bestie, no cap, we did not skip a single flag, default, param, or self-referential See also. πΈ
Version 5.2.3 β Tue Nov 20 2012 π stay zoomed in, stay magnified, mwah π β¨
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms