Definition at line 30 of file qwt_plot_item.h.
Public Types | |
enum | RttiValues { Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotMarker, Rtti_PlotCurve, Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotSVG, Rtti_PlotUserItem = 1000 } |
enum | ItemAttribute { Legend = 1, AutoScale = 2 } |
enum | RenderHint { RenderAntialiased = 1 } |
Public Member Functions | |
QwtPlotItem (const QwtText &title=QwtText()) | |
virtual | ~QwtPlotItem () |
void | attach (QwtPlot *plot) |
void | detach () |
QwtPlot * | 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 |
double | z () const |
void | setZ (double z) |
void | show () |
void | hide () |
virtual void | setVisible (bool) |
bool | isVisible () const |
void | setAxis (int xAxis, int yAxis) |
void | setXAxis (int axis) |
int | xAxis () const |
void | setYAxis (int axis) |
int | yAxis () const |
virtual void | itemChanged () |
virtual void | draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &canvasRect) const =0 |
virtual QwtDoubleRect | boundingRect () const |
virtual void | updateLegend (QwtLegend *) const |
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
virtual QWidget * | legendItem () const |
QwtDoubleRect | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
QRect | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
QRect | transform (const QwtScaleMap &, const QwtScaleMap &, const QwtDoubleRect &) const |
QwtDoubleRect | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRect &) const |
|
Constructor.
Definition at line 48 of file qwt_plot_item.cpp. References title(). |
|
Destroy the QwtPlotItem.
Definition at line 55 of file qwt_plot_item.cpp. References attach(). |
|
Attach the item to a plot Definition at line 64 of file qwt_plot_item.cpp. References legendItem(), and plot(). Referenced by ~QwtPlotItem(). |
|
Reimplemented in QwtPlotCurve, QwtPlotMarker, QwtPlotSpectrogram, and QwtPlotSvgItem. Definition at line 367 of file qwt_plot_item.cpp. Referenced by QwtPlotRasterItem::draw(), QwtPlotCurve::maxXValue(), QwtPlotCurve::maxYValue(), QwtPlotCurve::minXValue(), and QwtPlotCurve::minYValue(). |
|
Draw the item.
Implemented in QwtPlotCurve, QwtPlotGrid, QwtPlotMarker, QwtPlotRasterItem, QwtPlotSpectrogram, and QwtPlotSvgItem. |
|
Transform a rectangle from paint to scale coordinates
Definition at line 526 of file qwt_plot_item.cpp. References QwtScaleMap::invTransform(). Referenced by QwtPlotSvgItem::draw(), QwtPlotSpectrogram::draw(), and QwtPlotRasterItem::draw(). |
|
Definition at line 275 of file qwt_plot_item.cpp. |
|
|
Allocate the widget that represents the item on the legend. The default implementation is made for QwtPlotCurve and returns a QwtLegendItem(), but an item could be represented by any type of widget, by overloading legendItem() and updateLegend().
Definition at line 382 of file qwt_plot_item.cpp. Referenced by attach(), updateLegend(), and QwtPlotCurve::updateLegend(). |
|
Calculate the bounding paint rect of 2 maps.
Definition at line 482 of file qwt_plot_item.cpp. References QwtScaleMap::p1(), and QwtScaleMap::pDist(). Referenced by QwtPlotRasterItem::draw(). |
|
Return attached plot.
Definition at line 103 of file qwt_plot_item.cpp. Referenced by attach(), QwtPlotCurve::closestPoint(), and QwtPlotCurve::draw(). |
|
Calculate the bounding scale rect of 2 maps.
Definition at line 467 of file qwt_plot_item.cpp. References QwtScaleMap::s1(), and QwtScaleMap::sDist(). |
|
Set X and Y axis The item will painted according to the coordinates its Axes.
Definition at line 307 of file qwt_plot_item.cpp. References itemChanged(). |
|
Toggle an item attribute
Definition at line 184 of file qwt_plot_item.cpp. References itemChanged(). Referenced by QwtPlotCurve::init(), and QwtPlotSpectrogram::QwtPlotSpectrogram(). |
|
Toggle an render hint
Definition at line 219 of file qwt_plot_item.cpp. References itemChanged(). |
|
Set a new title
Definition at line 158 of file qwt_plot_item.cpp. References itemChanged(), and title(). |
|
Set a new title
Definition at line 147 of file qwt_plot_item.cpp. |
|
Show/Hide the item
Definition at line 262 of file qwt_plot_item.cpp. References itemChanged(). |
|
Set the X axis The item will painted according to the coordinates its Axes.
Definition at line 326 of file qwt_plot_item.cpp. References itemChanged(). |
|
Set the Y axis The item will painted according to the coordinates its Axes.
Definition at line 343 of file qwt_plot_item.cpp. References itemChanged(). |
|
Set the z value. Plot items are painted in increasing z-order.
Definition at line 126 of file qwt_plot_item.cpp. References itemChanged(). Referenced by QwtPlotCurve::init(), QwtPlotGrid::QwtPlotGrid(), QwtPlotMarker::QwtPlotMarker(), and QwtPlotSpectrogram::QwtPlotSpectrogram(). |
|
Test an item attribute
Definition at line 204 of file qwt_plot_item.cpp. Referenced by updateLegend(). |
|
Test a render hint
Definition at line 239 of file qwt_plot_item.cpp. |
|
Definition at line 171 of file qwt_plot_item.cpp. Referenced by QwtPlotItem(), setTitle(), and QwtPlotCurve::updateLegend(). |
|
Transform a rectangle
Definition at line 501 of file qwt_plot_item.cpp. References QwtScaleMap::transform(). Referenced by QwtPlotSvgItem::draw(), QwtPlotSpectrogram::draw(), QwtPlotRasterItem::draw(), and QwtPlotSpectrogram::renderImage(). |
|
Update the widget that represents the item on the legend. updateLegend() is called from itemChanged() to adopt the widget representing the item on the legend to its new configuration. The default implementation is made for QwtPlotCurve and updates a QwtLegendItem(), but an item could be represented by any type of widget, by overloading legendItem() and updateLegend().
Reimplemented in QwtPlotCurve. Definition at line 399 of file qwt_plot_item.cpp. References QwtLegend::find(), QwtLegend::insert(), QwtLegend::itemMode(), legendItem(), and testItemAttribute(). Referenced by itemChanged(), QwtLegend::setDisplayPolicy(), and QwtPlotCurve::updateLegend(). |
|
Update the item to changes of the axes scale division. Update the item, when the axes of plot have changed. The default implementation does nothing, but items that depend on the scale division (like QwtPlotGrid()) have to reimplement updateScaleDiv()
Reimplemented in QwtPlotGrid. Definition at line 454 of file qwt_plot_item.cpp. |
|
Return xAxis.
Definition at line 353 of file qwt_plot_item.cpp. Referenced by QwtPlotCurve::closestPoint(). |
|
Return yAxis.
Definition at line 359 of file qwt_plot_item.cpp. Referenced by QwtPlotCurve::closestPoint(). |
|
Plot items are painted in increasing z-order.
Definition at line 113 of file qwt_plot_item.cpp. |