QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Qwt3DDrawable Class Referenceabstract

Abstract base class for Drawables. More...

#include <qwt3d_drawable.h>

Inheritance diagram for Qwt3DDrawable:
Qwt3DAxis Qwt3DColorLegend Qwt3DCoordinateSystem Qwt3DLabel

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
 
Qwt3DDrawableoperator= (Qwt3DDrawable &&other) noexcept
 

Protected Attributes

RGBA m_color
 

Detailed Description

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).

Member Function Documentation

◆ color()

RGBA Qwt3DDrawable::color ( ) const

Returns the drawable's color.

返回 drawable 的颜色

Returns
RGBA 颜色值

返回 protected 成员 m_color。添加此公有 getter 是为了让兄弟类 (如 Qwt3DAxis 访问 Qwt3DLabel 的 color)能跨对象读取颜色值, 而无需直接访问 protected 成员。C++ 规则下,派生类只能通过 this 访问自身基类的 protected 成员,不能通过另一个兄弟类对象访问。

◆ draw()

void Qwt3DDrawable::draw ( const Qwt3DRenderContext ctx)
virtual

The documentation for this class was generated from the following files: