QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 成员函数 | 所有成员列表
Qwt3DAxis类 参考

Autoscalable axis with caption 更多...

#include <qwt3d_axis.h>

类 Qwt3DAxis 继承关系图:
Qwt3DDrawable

class  PrivateData
 

Public 成员函数

 Qwt3DAxis ()
 Default constructor
 
 Qwt3DAxis (Triple beg, Triple end)
 Constructs an axis with specified start and end positions
 
void draw (const Qwt3DRenderContext &ctx) override
 Draws the axis including base line, tics, and label
 
void setPosition (const Triple &beg, const Triple &end)
 
void position (Triple &beg, Triple &end) const
 
Triple begin () const
 
Triple end () const
 
double length () const
 
void setTicLength (double majorl, double minorl)
 
void ticLength (double &majorl, double &minorl) const
 
void setTicOrientation (double tx, double ty, double tz)
 
void setTicOrientation (const Triple &val)
 
Triple ticOrientation () const
 
void setSymmetricTics (bool b)
 
void setLabelFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 
void setLabelFont (QFont const &font)
 
QFont const & labelFont () const
 
void setLabelString (QString const &name)
 
QString labelString () const
 返回轴标签文本
 
void setLabelPosition (const Triple &pos, ANCHOR)
 
void setLabelColor (RGBA col)
 
RGBA labelColor () const
 返回轴标签颜色
 
void setLabel (bool val)
 
void adjustLabel (int val)
 
void setScaling (bool val)
 
bool scaling () const
 
void setScale (SCALETYPE)
 
void setScale (Qwt3DScale *item)
 
void setNumbers (bool val)
 
bool numbers () const
 
void setNumberColor (RGBA col)
 
RGBA numberColor () const
 
void setNumberFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 
void setNumberFont (QFont const &)
 
QFont const & numberFont () const
 
void setNumberAnchor (ANCHOR a)
 
void adjustNumbers (int val)
 
void setAutoScale (bool val=true)
 
bool autoScale () const
 
void setMajors (int val)
 
void setMinors (int val)
 
int majors () const
 
int minors () const
 
TripleField const & majorPositions () const
 
TripleField const & minorPositions () const
 
void setLineWidth (double val, double majfac=0.9, double minfac=0.5)
 
double lineWidth () const
 
double majLineWidth () const
 
double minLineWidth () const
 
void setLimits (double start, double stop)
 
void limits (double &start, double &stop) const
 
void recalculateTics ()
 
- Public 成员函数 继承自 Qwt3DDrawable
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 成员函数 继承自 Qwt3DDrawable
 Qwt3DDrawable (Qwt3DDrawable &&other) noexcept
 
Qwt3DDrawableoperator= (Qwt3DDrawable &&other) noexcept
 
- Protected 属性 继承自 Qwt3DDrawable
RGBA m_color
 

详细描述

Autoscalable axis with caption

Axes are highly customizable especially in terms of labeling and scaling.

构造及析构函数说明

◆ Qwt3DAxis() [1/2]

Qwt3DAxis::Qwt3DAxis ( )

Default constructor

Constructs an uninitialized axis with default parameters.

Destructor

◆ Qwt3DAxis() [2/2]

Qwt3DAxis::Qwt3DAxis ( Triple  beg,
Triple  end 
)

Constructs an axis with specified start and end positions

参数
begStart position of the axis
endEnd position of the axis

成员函数说明

◆ draw()

void Qwt3DAxis::draw ( const Qwt3DRenderContext ctx)
overridevirtual

Draws the axis including base line, tics, and label

参数
ctxRender context providing shaders, matrices, and coordinate conversion

Uses VBO + line shader for line geometry. Labels are drawn via Qwt3DLabel::draw() which uses its own texture-based rendering.

重载 Qwt3DDrawable .

◆ labelColor()

RGBA Qwt3DAxis::labelColor ( ) const

返回轴标签颜色

返回
RGBA 颜色值

委托到内部 Qwt3DLabelcolor() getter(Qwt3DDrawable 的公有 getter)。 setLabelColor() 通过 d->m_label.setColor(col) 设置, 此处返回 d->m_label.color()。 Qwt3DDrawable::color 是 protected 成员,Qwt3DAxis 和 Qwt3DLabel 是兄弟关系, C++ 规则下 Qwt3DAxis 不能直接通过 Qwt3DLabel 对象访问 protected 成员, 必须使用公有 color() getter。

◆ labelString()

QString Qwt3DAxis::labelString ( ) const

返回轴标签文本

返回
标签字符串

该类的文档由以下文件生成: