|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
Abstract base class for Drawables. More...
#include <qwt3d_drawable.h>
Classes | |
| class | PrivateData |
Public Member Functions | |
| virtual void | draw (const Qwt3DRenderContext &ctx) |
| void | attach (Qwt3DDrawable *) |
| void | detach (Qwt3DDrawable *) |
| void | detachAll () |
| virtual void | setColor (double r, double g, double b, double a=1) |
| virtual void | setColor (RGBA rgba) |
| RGBA | color () const |
| Returns the drawable's color. | |
Protected Member Functions | |
| Qwt3DDrawable (Qwt3DDrawable &&other) noexcept | |
| Qwt3DDrawable & | operator= (Qwt3DDrawable &&other) noexcept |
Protected Attributes | |
| RGBA | m_color |
Abstract base class for Drawables.
Drawables are scene-graph nodes rendered during paintGL. They no longer manage legacy GL state. Each drawable receives its rendering resources (shaders, matrices, viewport, coordinate conversion) through a Qwt3DRenderContext passed to draw(), eliminating the former Qwt3DPlot* back-pointer (deferred smell #1, resolved).
| RGBA Qwt3DDrawable::color | ( | ) | const |
Returns the drawable's color.
返回 drawable 的颜色
返回 protected 成员 m_color。添加此公有 getter 是为了让兄弟类 (如 Qwt3DAxis 访问 Qwt3DLabel 的 color)能跨对象读取颜色值, 而无需直接访问 protected 成员。C++ 规则下,派生类只能通过 this 访问自身基类的 protected 成员,不能通过另一个兄弟类对象访问。
|
virtual |
Reimplemented in Qwt3DAxis, Qwt3DColorLegend, Qwt3DCoordinateSystem, and Qwt3DLabel.