423 const QBrush& brush,
const QSizeF&
size )
const 426 if ( !size.isEmpty() )
430 QRectF r( 0, 0, size.width(), size.height() );
432 QPainter painter( &icon );
433 painter.fillRect( r, brush );
570 return QRectF( 1.0, 1.0, -2.0, -2.0 );
597 double&
left,
double&
top,
double&
right,
double& bottom )
const 601 Q_UNUSED( canvasRect );
604 left = top = right = bottom = 0.0;
634 QVariant::fromValue( label ) );
640 QVariant::fromValue( graphic ) );
668 Q_UNUSED( xScaleDiv );
669 Q_UNUSED( yScaleDiv );
708 return QRectF( xMap.
s1(), yMap.
s1(),
723 const QRectF rect( xMap.
p1(), yMap.
p1(),
virtual void legendChanged()
uint renderThreadCount() const
ItemAttribute
Plot Item Attributes.
void show()
Show the item.
bool isYAxis(int axisPos)
const QwtText & title() const
void setRenderFlags(int)
Change the render flags.
QwtGraphic defaultIcon(const QBrush &, const QSizeF &) const
Return a default icon from a brush.
void autoRefresh()
Replots the plot if autoReplot() is true.
A class representing a scale division.
QRectF paintRect(const QwtScaleMap &, const QwtScaleMap &) const
Calculate the bounding paint rectangle of 2 maps.
virtual QRectF boundingRect() const
QwtPlotItem::ItemInterests interests
void setTitle(const QString &title)
void setDefaultSize(const QSizeF &)
Set a default size.
The item is represented on the legend.
QwtAxisId xAxis() const
Return xAxis.
QwtPlot * plot() const
Return attached plot.
virtual QwtGraphic legendIcon(int index, const QSizeF &) const
void setAxes(QwtAxisId xAxis, QwtAxisId yAxis)
bool testItemInterest(ItemInterest) const
A class representing a text.
bool isXAxis(int axisPos)
void setZ(double z)
Set the z value.
void attachItem(QwtPlotItem *, bool)
Attach/Detach a plot item.
Y axis left of the canvas.
virtual QList< QwtLegendData > legendData() const
Return all information, that is needed to represent the item on the legend.
A paint device for scalable graphics.
virtual ~QwtPlotItem()
Destroy the QwtPlotItem.
virtual void itemChanged()
void hide()
Hide the item.
int QwtAxisId
Axis identifier.
virtual void setVisible(bool)
QwtPlotItem::RenderHints renderHints
void attach(QwtPlot *plot)
Attach the item to a plot.
QRectF scaleRect(const QwtScaleMap &, const QwtScaleMap &) const
Calculate the bounding scale rectangle of 2 maps.
bool testRenderHint(RenderHint) const
QwtPlotItem::ItemAttributes attributes
void setValue(int role, const QVariant &)
QSize legendIconSize() const
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &)
Update the item to changes of the axes scale division.
void setRenderHint(RenderHint, bool on=true)
void setRenderThreadCount(uint numThreads)
span_constexpr std::size_t size(span< T, Extent > const &spn)
virtual void updateLegend(const QwtPlotItem *, const QList< QwtLegendData > &)
Update the item to changes of the legend info.
Base class for items on the plot canvas.
void setItemAttribute(ItemAttribute, bool on=true)
void setLegendIconSize(const QSize &)
void setItemInterest(ItemInterest, bool on=true)
QwtAxisId yAxis() const
Return yAxis.
ItemInterest
Plot Item Interests.
Attributes of an entry on a legend.
Unspecific value, that can be used, when it doesn't matter.
virtual void getCanvasMarginHint(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
Calculate a hint for the canvas margin.
bool testItemAttribute(ItemAttribute) const
void detach()
This method detaches a QwtPlotItem from any QwtPlot it has been associated with.