|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
Autoscalable axis with caption. More...
#include <qwt3d_axis.h>
Classes | |
| class | PrivateData |
Public Member Functions | |
| 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 Member Functions inherited from 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from Qwt3DDrawable | |
| Qwt3DDrawable (Qwt3DDrawable &&other) noexcept | |
| Qwt3DDrawable & | operator= (Qwt3DDrawable &&other) noexcept |
Protected Attributes inherited from Qwt3DDrawable | |
| RGBA | m_color |
Autoscalable axis with caption.
Axes are highly customizable especially in terms of labeling and scaling.
| Qwt3DAxis::Qwt3DAxis | ( | ) |
Default constructor.
Constructs an uninitialized axis with default parameters.
Destructor
Constructs an axis with specified start and end positions.
| beg | Start position of the axis |
| end | End position of the axis |
|
overridevirtual |
Draws the axis including base line, tics, and label.
| ctx | Render 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.
Reimplemented from Qwt3DDrawable.
| RGBA Qwt3DAxis::labelColor | ( | ) | const |
返回轴标签颜色
委托到内部 Qwt3DLabel 的 color() getter(Qwt3DDrawable 的公有 getter)。 setLabelColor() 通过 d->m_label.setColor(col) 设置, 此处返回 d->m_label.color()。 Qwt3DDrawable::color 是 protected 成员,Qwt3DAxis 和 Qwt3DLabel 是兄弟关系, C++ 规则下 Qwt3DAxis 不能直接通过 Qwt3DLabel 对象访问 protected 成员, 必须使用公有 color() getter。
| QString Qwt3DAxis::labelString | ( | ) | const |
返回轴标签文本