9#include "qwt_polar_plot.h"
10#include "qwt_polar_item.h"
11#include "qwt_legend.h"
12#include "qwt_scale_div.h"
16class QwtPolarItem::PrivateData
22 , renderThreadCount( 1 )
24 , legendIconSize( 8, 8 )
33 uint renderThreadCount;
50 m_data =
new PrivateData;
51 m_data->title =
title;
76 if (
plot == m_data->plot )
80 m_data->plot->attachItem(
this,
false );
85 m_data->plot->attachItem(
this,
true );
144 if ( m_data->z !=
z )
147 m_data->plot->attachItem(
this,
false );
152 m_data->plot->attachItem(
this,
true );
177 if ( m_data->title !=
title )
179 m_data->title =
title;
190 return m_data->title;
203 if (
bool( m_data->attributes & attribute ) != on )
206 m_data->attributes |= attribute;
208 m_data->attributes &= ~attribute;
223 return m_data->attributes & attribute;
236 if ( ( ( m_data->renderHints & hint ) != 0 ) != on )
239 m_data->renderHints |= hint;
241 m_data->renderHints &= ~hint;
256 return ( m_data->renderHints & hint );
274 m_data->renderThreadCount = numThreads;
284 return m_data->renderThreadCount;
297 if ( m_data->legendIconSize != size )
299 m_data->legendIconSize = size;
310 return m_data->legendIconSize;
333 if ( on != m_data->isVisible )
335 m_data->isVisible = on;
346 return m_data->isVisible;
406 Q_UNUSED( azimuthScaleDiv );
407 Q_UNUSED( radialScaleDiv );
408 Q_UNUSED( interval );
435 data.
setValue( QwtLegendData::TitleRole,
436 QVariant::fromValue( label ) );
441 data.
setValue( QwtLegendData::IconRole,
442 QVariant::fromValue( graphic ) );
463 int index,
const QSizeF& size )
const
A paint device for scalable graphics.
A class representing an interval.
Attributes of an entry on a legend.
void setValue(int role, const QVariant &)
bool testItemAttribute(ItemAttribute) const
virtual QwtInterval boundingInterval(int scaleId) const
QSize legendIconSize() const
virtual void itemChanged()
void setLegendIconSize(const QSize &)
QwtPolarItem(const QwtText &title=QwtText())
void detach()
This method detaches a QwtPolarItem from the QwtPolarPlot it has been associated with.
void setRenderThreadCount(uint numThreads)
ItemAttribute
Plot Item Attributes.
@ Legend
The item is represented on the legend.
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &)
Update the item to changes of the axes scale division.
virtual QList< QwtLegendData > legendData() const
Return all information, that is needed to represent the item on the legend.
void setTitle(const QString &title)
const QwtText & title() const
QFlags< ItemAttribute > ItemAttributes
bool testRenderHint(RenderHint) const
@ Rtti_PolarItem
Unspecific value, that can be used, when it doesn't matter.
void hide()
Hide the item.
virtual void setVisible(bool)
QwtPolarPlot * plot() const
virtual ~QwtPolarItem()
Destroy the QwtPolarItem.
virtual int marginHint() const
QFlags< RenderHint > RenderHints
void attach(QwtPolarPlot *plot)
Attach the item to a plot.
virtual QwtGraphic legendIcon(int index, const QSizeF &) const
uint renderThreadCount() const
void setItemAttribute(ItemAttribute, bool on=true)
void show()
Show the item.
virtual void legendChanged()
void setRenderHint(RenderHint, bool on=true)
void setZ(double z)
Set the z value.
A plotting widget, displaying a polar coordinate system.
void autoRefresh()
Replots the plot if QwtPlot::autoReplot() is true.
A class representing a scale division.
A class representing a text.
void setRenderFlags(int)
Change the render flags.