QwtPanner(3)
π QwtPanner β from the Qwt User's Guide, bestie edition π
okay so welcome to the QwtPanner(3) page!! this is the manual for the Qwt User's Guide and we're gonna get you fluent in it, no cap. grab a snack π
β¨ NAME β¨
QwtPanner β that's the whole name, that's it, she's mysterious, she's iconic π
β¨ SYNOPSIS β¨
first things first, you gotta pull her in:
#include <qwt_panner.h>
Inherited by QwtPlotPanner. so like, QwtPlotPanner is the daughter and she ate π
πΈ Signals πΈ
void moved (int dx, int dy)void panned (int dx, int dy)
πΈ Public Member Functions πΈ
QwtPanner (QWidget *parent)virtual ~QwtPanner ()const QCursor cursor () constvirtual bool eventFilter (QObject *, QEvent *)void getAbortKey (int &key, int &state) constvoid getMouseButton (int &button, int &buttonState) constbool isEnabled () constbool isOrientationEnabled (Qt::Orientation) constQt::Orientations orientations () constvoid setAbortKey (int key, int state=Qt::NoButton)void setCursor (const QCursor &)void setEnabled (bool)void setMouseButton (int button, int buttonState=Qt::NoButton)void setOrientations (Qt::Orientations)
πΈ Protected Member Functions πΈ
virtual void paintEvent (QPaintEvent *)virtual void widgetKeyPressEvent (QKeyEvent *)virtual void widgetKeyReleaseEvent (QKeyEvent *)virtual void widgetMouseMoveEvent (QMouseEvent *)virtual void widgetMousePressEvent (QMouseEvent *)virtual void widgetMouseReleaseEvent (QMouseEvent *)
β¨ Detailed Description β¨
okay so what does she actually DO β QwtPanner provides panning of a widget. π«
QwtPanner grabs the contents of a widget, that can be dragged in all directions. The offset between the start and the end position is emitted by the panned signal. the way that she just... measures the distance and tells everyone? main character energy fr fr π
here's the tech tea: QwtPanner grabs the content of the widget into a pixmap and moves the pixmap around, without initiating any repaint events for the widget. Areas, that are not part of content are not painted while panning in in process. This makes panning fast enough for widgets, where repaints are too slow for mouse movements. she's literally built different β instead of making the widget redraw a million times she just yeets a pixmap around. slay β¨
but listen β for widgets, where repaints are very fast it might be better to implement panning manually by mapping mouse events into paint events. so if your widget is already speedy, do it yourself, don't call her, she's busy π«Ά
β¨ Constructor & Destructor Documentation β¨
π QwtPanner::QwtPanner (QWidget *parent)
Creates an panner that is enabled for the left mouse button. yes queen, left click is the default, she comes out the box ready π
Parameters:
- parent β Parent widget to be panned
β¨ Member Function Documentation β¨
π¦ const QCursor QwtPanner::cursor () const
Returns:
- Cursor that is active while panning
See also: setCursor()
π¦ bool QwtPanner::eventFilter (QObject *o, QEvent *e) [virtual]
Event filter. When isEnabled() the mouse events of the observed widget are filtered. so she's the bouncer at the door checking every event's vibe π
See also: widgetMousePressEvent(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()
π¦ bool QwtPanner::isEnabled () const
Returns:
truewhen enabled,falseotherwise
See also: setEnabled, eventFilter()
π¦ bool QwtPanner::isOrientationEnabled (Qt::Orientation o) const
Return true if a orientatio is enabled π
See also: orientations(), setOrientations()
π¦ void QwtPanner::moved (int dx, int dy) [signal]
Signal emitted, while the widget moved, but panning is not finished. she's mid-drag and she's LIVE-updating you, obsessed π£
Parameters:
- dx β Offset in horizontal direction
- dy β Offset in vertical direction
π¦ void QwtPanner::paintEvent (QPaintEvent *pe) [protected], [virtual]
Paint event. Repaint the grabbed pixmap on its current position and fill the empty spaces by the background of the parent widget. she drags the picture over and then patches the gaps with the parent's background like nothing happened π¨
Parameters:
- pe β Paint event
π¦ void QwtPanner::panned (int dx, int dy) [signal]
Signal emitted, when panning is done. THE FINAL BOSS SIGNAL. drag's over, here's your total π
Parameters:
- dx β Offset in horizontal direction
- dy β Offset in vertical direction
π¦ void QwtPanner::setAbortKey (int key, int state = Qt::NoButton)
Change the abort key. The defaults are Qt::Key_Escape and Qt::NoButton. so like, hit Esc and she stops, that's the panic button bestie π
Parameters:
- key β Key ( See
Qt::Keycode) - state β State
π¦ void QwtPanner::setCursor (const QCursor &cursor)
Change the cursor, that is active while panning. The default is the cursor of the parent widget.
Parameters:
- cursor β New cursor
See also: setCursor()
π¦ void QwtPanner::setEnabled (bool on)
En/disable the panner. When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed. on/off, in/out, that's the whole toggle energy π
Parameters:
- on β
trueorfalse
See also: isEnabled(), eventFilter()
π¦ void QwtPanner::setMouseButton (int button, int buttonState = Qt::NoButton)
Change the mouse button. The defaults are Qt::LeftButton and Qt::NoButton
π¦ void QwtPanner::setOrientations (Qt::Orientations o)
Set the orientations, where panning is enabled. The default value is in both directions: Qt::Horizontal | Qt::Vertical
/param o Orientation
π¦ void QwtPanner::widgetKeyPressEvent (QKeyEvent *ke) [protected], [virtual]
Handle a key press event for the observed widget.
Parameters:
- ke β Key event
See also: eventFilter(), widgetKeyReleaseEvent()
π¦ void QwtPanner::widgetKeyReleaseEvent (QKeyEvent *) [protected], [virtual]
Handle a key release event for the observed widget.
See also: eventFilter(), widgetKeyReleaseEvent()
π¦ void QwtPanner::widgetMouseMoveEvent (QMouseEvent *me) [protected], [virtual]
Handle a mouse move event for the observed widget.
Parameters:
- me β Mouse event
See also: eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent()
π¦ void QwtPanner::widgetMousePressEvent (QMouseEvent *me) [protected], [virtual]
Handle a mouse press event for the observed widget.
Parameters:
- me β Mouse event
See also: eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()
π¦ void QwtPanner::widgetMouseReleaseEvent (QMouseEvent *me) [protected], [virtual]
Handle a mouse release event for the observed widget.
Parameters:
- me β Mouse event
See also: eventFilter(), widgetMousePressEvent(), widgetMouseMoveEvent()
β¨ Author β¨
Generated automatically by Doxygen for Qwt User's Guide from the source code. (not me writing fanfic, the robot did it π€)
and that's the whole page bestie!! you're now certified in QwtPanner π go forth and pan π
Version 5.2.3 β Tue Nov 20 2012 π©· that's the source, the version and the date, mwah, bye!! π β¨π
π¦ 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