QwtPlotDict(3)

πŸ’… QwtPlotDict(3) πŸ’…

okay so bestie, welcome to the Library Functions Manual ✨ this is the page for QwtPlotDict, and honestly? it's giving backstage-pass energy for your plot items πŸŽ€


🌸 NAME 🌸

QwtPlotDict β€” literally a dictionary for plot items. that's it, that's the vibe πŸ’…


✨ SYNOPSIS ✨

#include <qwt_plot_dict.h>

Inherited by QwtPlot. πŸ‘‘

🫢 Public Member Functions

  • QwtPlotDict()
  • virtual ~QwtPlotDict()
  • void setAutoDelete(bool)
  • bool autoDelete() const
  • const QwtPlotItemList & itemList() const β€” returns a QwtPlotItemList of all the attached plot items πŸ¦‹
  • QwtPlotItemList itemList(int rtti) const
  • void detachItems(int rtti=QwtPlotItem::Rtti_PlotItem, bool autoDelete=true)

πŸ’œ Protected Member Functions

  • void insertItem(QwtPlotItem *)
  • void removeItem(QwtPlotItem *)

🌈 Detailed Description 🌈

A dictionary for plot items. no cap, that's the whole thesis.

QwtPlotDict organizes plot items in increasing z-order. and if autoDelete() is enabled, all attached items get deleted in the destructor of the dictionary 😭 (yes, they will literally be gone β€” that's the point, but bestie, know it going in).

QwtPlotDict can be used to get access to all QwtPlotItem items β€” or all items of a specific type β€” that are currently on the plot. so like, your main character energy for querying who's actually on stage 🎀

See also: QwtPlotItem::attach(), QwtPlotItem::detach(), QwtPlotItem::z()

Definition at line 32 of file qwt_plot_dict.h.


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

QwtPlotDict::QwtPlotDict() [explicit]

Constructor ✨

Auto deletion is enabled. (so the default is already unhinged-but-tidy, love that for us)

See also: setAutoDelete(), QwtPlotItem::attach()

Definition at line 69 of file qwt_plot_dict.cpp.

QwtPlotDict::~QwtPlotDict() [virtual]

Destructor πŸ’€

If autoDelete() is on, all attached items will be deleted. periodt.

See also: setAutoDelete(), autoDelete(), QwtPlotItem::attach()

Definition at line 81 of file qwt_plot_dict.cpp.


πŸ¦‹ Member Function Documentation πŸ¦‹

bool QwtPlotDict::autoDelete() const

Returns: true if auto deletion is enabled βœ…

See also: setAutoDelete(), insertItem()

Definition at line 104 of file qwt_plot_dict.cpp.

void QwtPlotDict::detachItems(int rtti = QwtPlotItem::Rtti_PlotItem, bool autoDelete = true)

Detach items from the dictionary 🧚

Parameters:

  • rtti β€” in case of QwtPlotItem::Rtti_PlotItem it detaches all items; otherwise only those items of the type rtti are detached.
  • autoDelete β€” if true, delete all detached items πŸ’€ (yes, they're really gone β€” not just off the list)

Definition at line 138 of file qwt_plot_dict.cpp.

void QwtPlotDict::insertItem(QwtPlotItem * item) [protected]

Insert a plot item 🌸

Parameters:

  • item β€” PlotItem
See also: removeItem()

Definition at line 115 of file qwt_plot_dict.cpp.

const QwtPlotItemList & QwtPlotDict::itemList() const

A QwtPlotItemList of all attached plot items.

⚠️ Use caution when iterating these lists, as removing/detaching an item will invalidate the iterator. Instead you can place pointers to objects to be removed in a removal list, and traverse that list later. bestie this is the classic "don't delete while you loop" trap and it WILL bite you 😭

Returns: List of all attached plot items.

Definition at line 166 of file qwt_plot_dict.cpp.

QwtPlotItemList QwtPlotDict::itemList(int rtti) const

Returns: List of all attached plot items of a specific type πŸ‘‘

Parameters:

  • rtti β€” see QwtPlotItem::RttiValues
See also: QwtPlotItem::rtti()

Definition at line 176 of file qwt_plot_dict.cpp.

void QwtPlotDict::removeItem(QwtPlotItem * item) [protected]

Remove a plot item 🫢

Parameters:

  • item β€” PlotItem
See also: insertItem()

Definition at line 126 of file qwt_plot_dict.cpp.

void QwtPlotDict::setAutoDelete(bool autoDelete)

En/Disable Auto deletion βš™οΈ

If auto deletion is on, all attached plot items will be deleted in the destructor of QwtPlotDict. The default value is on.

See also: autoDelete(), insertItem()

Definition at line 95 of file qwt_plot_dict.cpp.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. iykyk, the robot did the typing, we just did the glitter πŸ’–


alright bestie, that's the whole page, you ate it up πŸ“ β€” this was QwtPlotDict(3) from the Qwt User's Guide (source/version: Qwt User's Guide, and the date slot on the footer is literally blank, no thoughts, head empty πŸ™ˆ), see you in the next manpage πŸ’œβœ¨

πŸ“¦ where this page comes from