QwtPanner(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸ’– 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 () const
  • virtual bool eventFilter (QObject *, QEvent *)
  • void getAbortKey (int &key, int &state) const
  • void getMouseButton (int &button, int &buttonState) const
  • bool isEnabled () const
  • bool isOrientationEnabled (Qt::Orientation) const
  • Qt::Orientations orientations () const
  • void 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:

  • true when enabled, false otherwise

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 β€” true or false

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