|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Base class for all 3D plot items 更多...
#include <qwt3d_plotitem.h>
类 | |
| class | PrivateData |
Public 成员函数 | |
| Qwt3DPlotItem () | |
| Default constructor | |
| virtual | ~Qwt3DPlotItem () |
| Destructor — detaches from any plot | |
| void | attach (Qwt3DPlot *plot) |
| Attach the item to a plot | |
| void | detach () |
| Detach the item from its plot | |
| Qwt3DPlot * | plot () const |
| Get the plot this item is attached to | |
| virtual void | draw ()=0 |
| Draw the item using the current GL context | |
| virtual ParallelEpiped | hull () const =0 |
| Get the bounding hull of the item in 3D space | |
| void | setTitle (const QString &title) |
| Set the item title | |
| QString | title () const |
| Get the item title | |
| void | setZ (double z) |
| Set the z-order value (controls draw sequence) | |
| double | z () const |
| Get the z-order value | |
| void | setVisible (bool on) |
| Set item visibility | |
| bool | isVisible () const |
| Check if the item is visible | |
| virtual int | rtti () const |
| Runtime type information | |
| virtual void | itemChanged () |
| Notify the plot that the item has changed | |
| virtual void | populateLegendColors (ColorVector &colors) const |
| Populate the legend color vector from the item's color functor | |
Base class for all 3D plot items
A Qwt3DPlotItem is "something", that can be drawn within the GL context of a Qwt3DPlot widget. Items are not widgets themselves; they are pure data + drawing logic objects that are attached to a Qwt3DPlot via attach() and rendered during Qwt3DPlot::paintGL().
The rendering pipeline calls draw() for each attached item in order of ascending z-value. Items manage their own data, geometry caching (VBO/VAO), and color/style. The view transformation, projection, and lighting are set up by Qwt3DPlot before draw() is called.
To implement a custom 3D plot item, derive from Qwt3DPlotItem and implement the pure virtual draw() and hull() methods:
| Qwt3DPlotItem::Qwt3DPlotItem | ( | ) |
Default constructor
Constructs a Qwt3DPlotItem with default settings.
Destructor
Destroys the Qwt3DPlotItem and detaches it from any plot.
| void Qwt3DPlotItem::attach | ( | Qwt3DPlot * | plot | ) |
Attach the item to a plot
| [in] | plot | Plot widget to attach to |
This method attaches a Qwt3DPlotItem to the Qwt3DPlot argument. It will first detach the Qwt3DPlotItem from any plot from a previous call to attach (if necessary). If a nullptr argument is passed, it will detach from any Qwt3DPlot it was attached to.
| void Qwt3DPlotItem::detach | ( | ) |
Detach the item from its plot
Detach the item from the plot
This method detaches a Qwt3DPlotItem from any Qwt3DPlot it has been associated with. detach() is equivalent to calling attach(nullptr).
|
pure virtual |
Draw the item using the current GL context
在 Qwt3DBar, Qwt3DLine , 以及 Qwt3DSurface 内被实现.
|
pure virtual |
Get the bounding hull of the item in 3D space
在 Qwt3DBar, Qwt3DLine , 以及 Qwt3DSurface 内被实现.
| bool Qwt3DPlotItem::isVisible | ( | ) | const |
|
virtual |
Notify the plot that the item has changed
Triggers a plot update so the item is redrawn.
| Qwt3DPlot * Qwt3DPlotItem::plot | ( | ) | const |
Get the plot this item is attached to
Get the plot the item is attached to
|
virtual |
Populate the legend color vector from the item's color functor
被 Qwt3DBar, Qwt3DLine , 以及 Qwt3DSurface 重载.
|
virtual |
Runtime type information
运行时类型信息
用于运行时类型识别,支持安全向下转型、设置面板工厂路由和序列化分发。 设计与 2D QwtPlotItem::rtti() 完全对齐。
被 Qwt3DBar, Qwt3DLine , 以及 Qwt3DSurface 重载.
| void Qwt3DPlotItem::setTitle | ( | const QString & | title | ) |
| void Qwt3DPlotItem::setVisible | ( | bool | on | ) |
| void Qwt3DPlotItem::setZ | ( | double | z | ) |
Set the z-order value (controls draw sequence)
Set the z-order value
| [in] | z | Z-value for the item |
Plot items are drawn in increasing z-order.
| QString Qwt3DPlotItem::title | ( | ) | const |
| double Qwt3DPlotItem::z | ( | ) | const |