QwtPolarItem(3)
π QwtPolarItem π
okay so this is the QwtPolarItem(3) page from the Library Functions Manual, bestie, and it's part 1 β we are keeping every single detail, no cap.
β¨ NAME β¨
QwtPolarItem β Base class for items on a polar plot.
π SYNOPSIS π
bestie, here is the whole cast list β do not lose a single signature, fr fr.
#include <qwt_polar_item.h>
Inherited by QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and
QwtPolarSpectrogram.
Public Types
enum RttiValues { Rtti_PolarItem = 0, Rtti_PolarGrid, Rtti_PolarMarker,
Rtti_PolarCurve, Rtti_PolarSpectrogram, Rtti_PolarUserItem = 1000 }
Runtime type information.
enum ItemAttribute { Legend = 0x01, AutoScale = 0x02 }
Plot Item Attributes.
enum RenderHint { RenderAntialiased = 0x01 }
Render hints.
typedef QFlags< ItemAttribute > ItemAttributes
typedef QFlags< RenderHint > RenderHints
Public Member Functions
QwtPolarItem (const QwtText &title=QwtText())
virtual ~QwtPolarItem ()
Destroy the QwtPolarItem.
void attach (QwtPolarPlot *plot)
Attach the item to a plot.
void detach ()
This method detaches a QwtPolarItem from the QwtPolarPlot it has
been associated with.
QwtPolarPlot * plot () const
void setTitle (const QString &title)
void setTitle (const QwtText &title)
const QwtText & title () const
virtual int rtti () const
void setItemAttribute (ItemAttribute, bool on=true)
bool testItemAttribute (ItemAttribute) const
void setRenderHint (RenderHint, bool on=true)
bool testRenderHint (RenderHint) const
void setRenderThreadCount (uint numThreads)
uint renderThreadCount () const
double z () const
void setZ (double z)
Set the z value.
void show ()
Show the item.
void hide ()
Hide the item.
virtual void setVisible (bool)
bool isVisible () const
virtual void itemChanged ()
virtual void legendChanged ()
virtual void draw (QPainter *painter, const QwtScaleMap &azimuthMap,
const QwtScaleMap &radialMap, const QPointF &pole, double radius,
const QRectF &canvasRect) const =0
Draw the item.
virtual QwtInterval boundingInterval (int scaleId) const
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &,
const QwtInterval &)
Update the item to changes of the axes scale division.
virtual int marginHint () const
void setLegendIconSize (const QSize &)
QSize legendIconSize () const
virtual QList< QwtLegendData > legendData () const
Return all information, that is needed to represent the item on the
legend.
virtual QwtGraphic legendIcon (int index, const QSizeF &) const
πΈ Detailed Description πΈ
Okay so QwtPolarItem is literally the base class for items on a polar plot.
A QwtPolarItem is βsomething that can be painted on the canvasβ. It gets connected to the QwtPolar framework through a couple of virtual methods, and those are individually implemented in derived item classes.
QwtPolar offers an implementation of the most common types of items, but deriving from QwtPolarItem makes it easy to implement additional types of items.
Definition at line 37 of file qwt_polar_item.h.
π Member Typedef Documentation π
typedef QFlags<ItemAttribute > QwtPolarItem::ItemAttributesβ An ORed combination ofItemAttributevalues. Definition at line 86 of fileqwt_polar_item.h.typedef QFlags<RenderHint > QwtPolarItem::RenderHintsβ An ORed combination ofRenderHintvalues. Definition at line 98 of fileqwt_polar_item.h.
π Member Enumeration Documentation π
π¦ enum QwtPolarItem::ItemAttribute
Plot Item Attributes.
See also setItemAttribute(), testItemAttribute().
Enumerator
Legendβ The item is represented on the legend.AutoScaleβ TheboundingRect()of the item is included in the autoscaling calculation.
Definition at line 74 of file qwt_polar_item.h.
π¦ enum QwtPolarItem::RenderHint
Render hints.
See also setRenderHint(), testRenderHint().
Enumerator
RenderAntialiasedβ Enable antialiasing.
Definition at line 92 of file qwt_polar_item.h.
π¦ enum QwtPolarItem::RttiValues
Runtime type information. RttiValues is used to cast plot items, without having to enable runtime type information of the compiler.
Enumerator
Rtti_PolarItemβ Unspecific value, that can be used, when it doesn't matter.Rtti_PolarGridβ ForQwtPolarGrid.Rtti_PolarMarkerβ ForQwtPolarMarker.Rtti_PolarCurveβ ForQwtPolarCurve.Rtti_PolarSpectrogramβ ForQwtPolarSpectrogram.Rtti_PolarUserItemβ Values>= Rtti_PolarUserItemare reserved for plot items not implemented in theQwtPolarlibrary.
Definition at line 46 of file qwt_polar_item.h.
β Constructor & Destructor Documentation β
π QwtPolarItem::QwtPolarItem (const QwtText & title = QwtText()) [explicit]
Constructor.
Parameters: title β Item title, f.e used on a legend.
See also setTitle().
Definition at line 48 of file qwt_polar_item.cpp.
π QwtPolarItem::~QwtPolarItem () [virtual]
Destroy the QwtPolarItem.
Definition at line 55 of file qwt_polar_item.cpp.
π attach()
void QwtPolarItem::attach(QwtPolarPlot *plot)
Okay so this is literally how you commit β it attaches the item to the QwtPolarPlot you hand it. And bestie, it's polite about it: it'll first detach the QwtPolarItem from any plot left over from a previous call to attach (if necessary). So no messy ex-situationships β¨
And plot twist: if you pass a NULL argument, it detaches from any QwtPolarPlot it was attached to. Ghosting, but make it API π
plotβ the plot widget you're attaching to π«Ά
See also: QwtPolarItem::detach()
Definition at line 74 of file qwt_polar_item.cpp.
π boundingInterval()
QwtInterval QwtPolarItem::boundingInterval(int scaleId) const [virtual]
The interval that's necessary to display the item. It's giving "how much space do I actually need" energy β and it's highkey useful for operations like clipping or autoscaling π₯
For items (like the grid) where a bounding interval makes no sense, an invalid interval is returned. Not every icon needs a bounding box, and that's valid π
scaleIdβ scale id (QwtPolar::Scale)
Returns: bounding interval of the plot item for a specific scale.
Reimplemented in QwtPolarCurve, QwtPolarMarker, and QwtPolarSpectrogram.
Definition at line 381 of file qwt_polar_item.cpp.
βοΈ detach()
void QwtPolarItem::detach()
This method detaches a QwtPolarItem from the QwtPolarPlot it has been associated with. And the lore is: detach() is equivalent to calling attach( NULL ) π«Ά
See also: attach()
Definition at line 95 of file qwt_polar_item.cpp.
π¨ draw()
virtual void QwtPolarItem::draw(QPainter *painter, const QwtScaleMap &azimuthMap,
const QwtScaleMap &radialMap, const QPointF &pole,
double radius, const QRectF &canvasRect) const [pure virtual]
Draw the item. This one's the main character β it's pure virtual, so every subclass has to show up and actually do the art ποΈβ¨
painterβ painterazimuthMapβ maps azimuth values to values related to0.0,M_2PIradialMapβ maps radius values into painter coordinatespoleβ position of the pole in painter coordinatesradiusβ radius of the complete plot area in painter coordinatescanvasRectβ contents rect of the canvas in painter coordinates
Implemented in QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and QwtPolarSpectrogram.
π hide()
void QwtPolarItem::hide()
Hide the item. Out of sight, out of mind, no cap π
Definition at line 320 of file qwt_polar_item.cpp.
π isVisible()
bool QwtPolarItem::isVisible() const
Returns: true if visible.
See also: setVisible(), show(), hide()
Definition at line 344 of file qwt_polar_item.cpp.
π itemChanged()
void QwtPolarItem::itemChanged() [virtual]
Update the legend and call QwtPolarPlot::autoRefresh for the parent plot. It's the "hey bestie, things changed, refresh the vibe" button π
See also: updateLegend()
Definition at line 355 of file qwt_polar_item.cpp.
π legendChanged()
void QwtPolarItem::legendChanged() [virtual]
Update the legend of the parent plot. Just keeping the receipts current π§Ύβ¨
See also: QwtPolarPlot::updateLegend(), itemChanged()
Definition at line 365 of file qwt_polar_item.cpp.
π·οΈ legendData()
QList<QwtLegendData> QwtPolarItem::legendData() const [virtual]
Return all information that is needed to represent the item on the legend. Most items are represented by one entry on the legend showing an icon and a text β very demure, very icon-plus-label π
QwtLegendData is basically a list of QVariants that makes it possible to overload and reimplement legendData() to return almost any type of information that is understood by the receiver that acts as the legend. Flexible? We love to see it πΈ
The default implementation returns one entry with the title() of the item and the legendIcon().
See also: title(), legendIcon(), QwtLegend
Definition at line 428 of file qwt_polar_item.cpp.
πΌοΈ legendIcon()
QwtGraphic QwtPolarItem::legendIcon(int index, const QSizeF &size) const [virtual]
Returns: icon representing the item on the legend.
The default implementation returns an invalid icon β so yeah, if your item looks iconless in the legend, that's not a bug, that's the default bestie π
indexβ index of the legend entry (usually there is only one)sizeβ icon size
See also: setLegendIconSize(), legendData()
Reimplemented in QwtPolarCurve.
Definition at line 462 of file qwt_polar_item.cpp.
π legendIconSize()
QSize QwtPolarItem::legendIconSize() const
Returns: legend icon size.
See also: setLegendIconSize(), legendIcon()
Definition at line 308 of file qwt_polar_item.cpp.
π marginHint()
int QwtPolarItem::marginHint() const [virtual]
Some items like to display something (f.e. the azimuth axis) outside of the area of the interval of the radial scale. The default implementation returns 0 pixels β respectfully staying in its lane π«Ά
Returns: hint for the margin.
Reimplemented in QwtPolarGrid.
Definition at line 478 of file qwt_polar_item.cpp.
πͺ© plot()
QwtPolarPlot *QwtPolarItem::plot() const
Returns: attached plot.
Definition at line 118 of file qwt_polar_item.cpp.
π§΅ renderThreadCount()
uint QwtPolarItem::renderThreadCount() const
Returns: number of threads to be used for rendering. If numThreads() is set to 0, the system specific ideal thread count is used.
Definition at line 282 of file qwt_polar_item.cpp.
π rtti()
int QwtPolarItem::rtti() const [virtual]
Return rtti for the specific class represented. QwtPolarItem is simply a virtual interface class, and base classes will implement this method with specific rtti values so a user can differentiate them. It's the class's government name, fr fr πͺͺ
The rtti value is useful for environments where the runtime type information is disabled and it is not possible to do a dynamic_cast<...>.
Returns: rtti value.
See also: RttiValues
Reimplemented in QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and QwtPolarSpectrogram.
Definition at line 112 of file qwt_polar_item.cpp.
ποΈ setItemAttribute()
void QwtPolarItem::setItemAttribute(ItemAttribute attribute, bool on = true)
Toggle an item attribute. On or off, your call bestie β¨
attributeβ attribute typeonβtrue/false
See also: testItemAttribute(), ItemAttribute
Definition at line 201 of file qwt_polar_item.cpp.
π setLegendIconSize()
void QwtPolarItem::setLegendIconSize(const QSize &size)
Set the size of the legend icon. The default setting is 8x8 pixels β tiny but iconic, honestly π
sizeβ size
See also: legendIconSize(), legendIcon()
Definition at line 295 of file qwt_polar_item.cpp.
πͺ setRenderHint()
void QwtPolarItem::setRenderHint(RenderHint hint, bool on = true)
Toggle a render hint. Same energy as the attribute one, but for how it renders π«
hintβ render hintonβtrue/false
See also: testRenderHint(), RenderHint
Definition at line 234 of file qwt_polar_item.cpp.
π§΅ setRenderThreadCount()
void QwtPolarItem::setRenderThreadCount(uint numThreads)
On multi core systems, rendering of certain plot item (f.e. QwtPolarSpectrogram) can be done in parallel in several threads. Parallel render is lowkey a flex π₯
The default setting is set to 1.
numThreadsβ number of threads to be used for rendering. IfnumThreadsis set to0, the system specific ideal thread count is used.
The default thread count is 1 ( = no additional threads ).
Definition at line 272 of file qwt_polar_item.cpp.
βοΈ setTitle()
void QwtPolarItem::setTitle(const QString &title)
Set a new title. Give your item a name, bestie, it deserves one π
titleβ title
See also: title()
Definition at line 164 of file qwt_polar_item.cpp.
βοΈ setTitle() (the QwtText overload)
void QwtPolarItem::setTitle(const QwtText &title)
Set a new title β this time taking a QwtText, because sometimes plain strings just aren't the moment π
titleβ title
See also: title()
Definition at line 175 of file qwt_polar_item.cpp.
π«£ setVisible()
void QwtPolarItem::setVisible(bool on) [virtual]
Show/hide the item. One call, both vibes β¨
onβ show iftrue, otherwise hide
See also: isVisible(), show(), hide()
Definition at line 331 of file qwt_polar_item.cpp.
ποΈ setZ()
void QwtPolarItem::setZ(double z)
Set the z value. Plot items are painted in increasing z-order β so yeah, higher z means you're on top, main character energy fr π
zβ z-value
See also: z(), QwtPolarItemDict::itemList()
Definition at line 142 of file qwt_polar_item.cpp.
π show()
void QwtPolarItem::show()
Show the item. And the crowd goes wild ππ
Definition at line 314 of file qwt_polar_item.cpp.
π§ͺ testItemAttribute()
bool QwtPolarItem::testItemAttribute(ItemAttribute attribute) const
Test an item attribute. Just checking, no pressure π«Ά
attributeβ attribute type
Returns: true/false
See also: setItemAttribute(), ItemAttribute
Definition at line 221 of file qwt_polar_item.cpp.
π§ͺ testRenderHint()
bool QwtPolarItem::testRenderHint(RenderHint hint) const
Test a render hint. Same vibe check, different hint β¨
hintβ render hint
Returns: true/false
See also: setRenderHint(), RenderHint
Definition at line 254 of file qwt_polar_item.cpp.
π¬ title()
const QwtText & QwtPolarItem::title() const
Returns: title of the item.
See also: setTitle()
Definition at line 188 of file qwt_polar_item.cpp.
π updateScaleDiv()
void QwtPolarItem::updateScaleDiv(const QwtScaleDiv &azimuthScaleDiv,
const QwtScaleDiv &radialScaleDiv,
const QwtInterval &interval) [virtual]
Update the item to changes of the axes scale division. Basically: update the item when the axes of the plot have changed π
The default implementation does nothing, but items that depend on the scale division (like QwtPolarGrid()) have to reimplement updateScaleDiv(). So if your grid is acting brand new after an axis change, that's on you to hook up π
azimuthScaleDivβ scale division of the azimuth-scaleradialScaleDivβ scale division of the radius-axisintervalβ the interval of the radius-axis that is visible on the canvas
See also: QwtPolarPlot::updateAxes()
Reimplemented in QwtPolarGrid.
Definition at line 403 of file qwt_polar_item.cpp.
π’ z()
double QwtPolarItem::z() const
Plot items are painted in increasing z-order.
Returns: z value.
See also: setZ(), QwtPolarItemDict::itemList()
Definition at line 129 of file qwt_polar_item.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
And that's the whole page, bestie β this one's out of the Qwt User's Guide, filed under QwtPolarItem(3), autogenerated by Doxygen straight from the source. Go forth and polar-plot slay ππ¦β¨
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms