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

A Qt string or an output device dependent string. More...

#include <qwt3d_label.h>

Inheritance diagram for Qwt3DLabel:
Qwt3DDrawable

Classes

class  PrivateData
 

Public Member Functions

 Qwt3DLabel (const Qwt3DLabel &other)
 
 Qwt3DLabel (Qwt3DLabel &&other) noexcept
 
Qwt3DLabeloperator= (const Qwt3DLabel &other)
 
Qwt3DLabeloperator= (Qwt3DLabel &&other) noexcept
 
 Qwt3DLabel (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 
void setFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 
void adjust (int gap)
 
double gap () const
 
void setPosition (Triple pos, ANCHOR a=BottomLeft)
 
void setRelPosition (Tuple rpos, ANCHOR a, const Qwt3DRenderContext &ctx)
 
Triple first () const
 
Triple second () const
 
ANCHOR anchor () const
 
virtual void setColor (double r, double g, double b, double a=1) override
 
virtual void setColor (RGBA rgba) override
 
void setString (QString const &s)
 
QString string () const
 返回标签文本
 
void draw (const Qwt3DRenderContext &ctx) override
 Draws the label using a texture quad with GLSL text shader.
 
- Public Member Functions inherited from Qwt3DDrawable
void attach (Qwt3DDrawable *)
 
void detach (Qwt3DDrawable *)
 
void detachAll ()
 
RGBA color () const
 Returns the drawable's color.
 

Static Public Member Functions

static void useDeviceFonts (bool val)
 

Additional Inherited Members

- Protected Member Functions inherited from Qwt3DDrawable
 Qwt3DDrawable (Qwt3DDrawable &&other) noexcept
 
Qwt3DDrawableoperator= (Qwt3DDrawable &&other) noexcept
 
- Protected Attributes inherited from Qwt3DDrawable
RGBA m_color
 

Detailed Description

A Qt string or an output device dependent string.

Qwt3DLabel provides text rendering on 3D plots, supporting both Qt string representation and device-dependent string output.

Member Function Documentation

◆ draw()

void Qwt3DLabel::draw ( const Qwt3DRenderContext ctx)
overridevirtual

Draws the label using a texture quad with GLSL text shader.

Parameters
ctxRender context providing shaders, matrices, and coordinate conversion

Renders the text to a QImage, creates an OpenGL texture, and draws a textured quad using VBO + text.vert/text.frag shaders. For gl2ps vector export (deviceFonts mode), falls back to drawDeviceText.

Reimplemented from Qwt3DDrawable.

◆ setColor() [1/2]

void Qwt3DLabel::setColor ( double  r,
double  g,
double  b,
double  a = 1 
)
overridevirtual

Reimplemented from Qwt3DDrawable.

◆ setColor() [2/2]

void Qwt3DLabel::setColor ( RGBA  rgba)
overridevirtual

Reimplemented from Qwt3DDrawable.

◆ string()

QString Qwt3DLabel::string ( ) const

返回标签文本

Returns
当前标签文本字符串

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