QwtPlotPanner(3)

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

πŸŽ€ QwtPlotPanner πŸŽ€

okay bestie, we're in the Qwt User's Guide, and this right here is section 3 of the manual β€” the panner page. it's giving "small class, big main character energy." let's go πŸ’…


NAME ✨

QwtPlotPanner β€” and honestly? that's the whole name section. Doxygen left the little description after the dash completely blank. no cap, it's just vibes and a hyphen. but don't worry, we get the full tea in the Detailed Description below 🫢


SYNOPSIS 🌸

#include <qwt_plot_panner.h>

Inherits QwtPanner. so yeah, it's a glow-up of QwtPanner, not a fresh start ✨

Public Member Functions πŸ‘‘

QwtPlotPanner (QwtPlotCanvas *)
virtual ~QwtPlotPanner ()
QwtPlotCanvas * canvas ()
const QwtPlotCanvas * canvas () const
bool isAxisEnabled (int axis) const
QwtPlot * plot ()
const QwtPlot * plot () const
void setAxisEnabled (int axis, bool on)

look at that overloaded canvas() and plot() β€” const version and non-const version, iconic behavior, we love a class that respects const-correctness 😌

Protected Slots πŸ™ˆ

virtual void moveCanvas (int dx, int dy)

protected, virtual, and a slot. triple threat. she contains multitudes.

Additional Inherited Members πŸ’œ

there's a whole pile of extra members it inherits from QwtPanner too β€” this page isn't gonna list them all, so if you need the full family tree you know where to look.


Detailed Description 🌈

QwtPlotPanner provides panning of a plot canvas. that's the whole job, and she does it gorgeously πŸ’–

here's the actual mechanics: QwtPlotPanner is a panner for a QwtPlotCanvas, and what makes it special is that it adjusts the scales of the axes after dropping the canvas on its new position. so you drag, you let go, and then the axes catch up. not during. after. remember that, it comes back in the note πŸ‘‡

and the fun part β€” together with QwtPlotZoomer and QwtPlotMagnifier, you can implement powerful ways of navigating on a QwtPlot widget, easily. like, that's the whole squad right there. assemble them and suddenly your plot is fully interactive, no cap πŸ”₯

⚠️ Note: The axes are not updated, while dragging the canvas. so while your finger's down, the axes are just chillin. they sync up when you drop it. don't come for me when you notice it, it's literally documented.

See also: QwtPlotZoomer, QwtPlotMagnifier


Constructor & Destructor Documentation πŸ¦‹

QwtPlotPanner::QwtPlotPanner (QwtPlotCanvas *canvas) β€” [explicit]

Create a plot panner. The panner is enabled for all axes. every single one, out of the box, no extra steps πŸ’…

Parameters:

  • canvas β€” Plot canvas to pan, also the parent object. yes bestie, it's both the thing you pan and the parent. two jobs, one pointer, she's efficient.

See also: setAxisEnabled()


Member Function Documentation ⭐

bool QwtPlotPanner::isAxisEnabled (int axis) const

Test if an axis is enabled. that's it, that's the function. a little vibe check for your axes ✨

Parameters:

  • axis β€” Axis, see QwtPlot::Axis

Returns: True, if the axis is enabled.

See also: setAxisEnabled(), moveCanvas()

void QwtPlotPanner::moveCanvas (int dx, int dy) β€” [protected], [virtual], [slot]

Adjust the enabled axes according to dx/dy. this is the little engine underneath the panning πŸ”§

Parameters:

  • dx β€” Pixel offset in x direction
  • dy β€” Pixel offset in y direction

See also: QwtPanner::panned()

void QwtPlotPanner::setAxisEnabled (int axis, bool on)

En/Disable an axis. here's the important part, read it twice: Axes that are enabled will be synchronized to the result of panning. All other axes will remain unchanged. so you pick your faves, they pan with you, everybody else stays exactly where they are. selective participation, honestly iconic πŸŽ€

Parameters:

  • axis β€” Axis, see QwtPlot::Axis
  • on β€” On/Off

See also: isAxisEnabled(), moveCanvas()


Author πŸ’€

Generated automatically by Doxygen for Qwt User's Guide from the source code. so like, don't @ me, @ Doxygen 🫢


and that's the page, bestie!! mwah πŸ’– this was Version 5.2.3, dated Tue Nov 20 2012, from QwtPlotPanner(3) β€” periodt. go forth and pan responsibly βœ¨πŸ‘‘

πŸ“¦ where this page comes from