QwtAbstractLegend(3)

πŸ’– QwtAbstractLegend(3) πŸ’–

okay so bestie, this page is from the Library Functions Manual, and it's all about QwtAbstractLegend β€” the abstract base class for legend widgets. It's giving "parent class energy," and honestly? Iconic. ✨


🌸 NAME 🌸

QwtAbstractLegend β€” Abstract base class for legend widgets.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qwt_abstract_legend.h>
  • Inherits: QFrame.
  • Inherited by: QwtLegend.

πŸ’… Public Slots πŸ’…

  • virtual void updateLegend (const QVariant &itemInfo, const QList< QwtLegendData > &data)=0 β€” Update the entries for a plot item. Pure virtual slot, so your subclass has to show up and do the work. πŸ’–

πŸŽ€ Public Member Functions πŸŽ€

  • QwtAbstractLegend (QWidget *parent=NULL) β€” Constructor, with parent defaulting to NULL.
  • virtual ~QwtAbstractLegend () β€” Destructor.
  • virtual void renderLegend (QPainter *painter, const QRectF &rect, bool fillBackground) const =0 β€” Pure virtual render function. You gotta implement it.
  • virtual bool isEmpty () const =0 β€” Pure virtual check for whether the legend is empty.
  • virtual int scrollExtent (Qt::Orientation) const β€” Virtual function for the scroll extent.

🌈 Detailed Description 🌈

Abstract base class for legend widgets. No cap. 🫢

Legends that need to be under control of the QwtPlot layout system need to be derived from QwtAbstractLegend. That's the whole vibe.

Note: Other type of legends can be implemented by connecting to the QwtPlot::legendDataChanged() signal. But as these legends are unknown to the plot layout system the layout code ( on screen and for QwtPlotRenderer ) need to be organized in application code.
  • See also: QwtLegend

Definition at line 34 of file qwt_abstract_legend.h.


🧚 Constructor & Destructor Documentation 🧚

πŸ’œ QwtAbstractLegend::QwtAbstractLegend (QWidget * parent = NULL) [explicit]

Constructor. Main character constructor behavior. πŸ’…

  • parent β€” Parent widget

Definition at line 18 of file qwt_abstract_legend.cpp.

πŸ’œ QwtAbstractLegend::~QwtAbstractLegend () [virtual]

Destructor. Gotta clean up, bestie. πŸŽ€

Definition at line 24 of file qwt_abstract_legend.cpp.


πŸ”₯ Member Function Documentation πŸ”₯

⭐ virtual bool QwtAbstractLegend::isEmpty () const [pure virtual]

  • Returns: True, when no plot item is inserted

Implemented in QwtLegend.

⭐ virtual void QwtAbstractLegend::renderLegend (QPainter * painter, const QRectF & rect, bool fillBackground) const [pure virtual]

Render the legend into a given rectangle. Very demure, very mindful rendering. πŸ¦‹

  • painter β€” Painter
  • rect β€” Bounding rectangle
  • fillBackground β€” When true, fill rect with the widget background
  • See also: renderLegend() is used by QwtPlotRenderer

Implemented in QwtLegend.

⭐ int QwtAbstractLegend::scrollExtent (Qt::Orientation orientation) const [virtual]

Return the extent, that is needed for elements to scroll the legend ( usually scrollbars ),

  • orientation β€” Orientation
  • Returns: Extent of the corresponding scroll element

Reimplemented in QwtLegend.

Definition at line 35 of file qwt_abstract_legend.cpp.

⭐ virtual void QwtAbstractLegend::updateLegend (const QVariant & itemInfo, const QList< QwtLegendData > & data) [pure virtual], [slot]

Update the entries for a plot item. Your subclass has to implement this, periodt. πŸ’–

  • itemInfo β€” Info about an item
  • data β€” List of legend entry attributes for the item

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code.

okay that's the whole page, bestie β€” Qwt User's Guide source/version energy, tagged QwtAbstractLegend(3), and the footer date slot is literally blank so I'm not inventing one. πŸ’…βœ¨

πŸ“¦ where this page comes from