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

Autoscalable axis with caption 更多...

#include <qwt3d_axis.h>

类 Qwt3D::Axis 继承关系图:
Qwt3D::Drawable

class  PrivateData
 

Public 成员函数

 Axis ()
 Default constructor
 
 Axis (Qwt3D::Triple beg, Qwt3D::Triple end)
 Constructs an axis with specified start and end positions
 
void draw () override
 Draws the axis including base line, tics, and label
 
void setPosition (const Qwt3D::Triple &beg, const Qwt3D::Triple &end)
 Sets the axis position
 
void position (Qwt3D::Triple &beg, Qwt3D::Triple &end) const
 
Qwt3D::Triple begin () const
 
Qwt3D::Triple end () const
 
double length () const
 
void setTicLength (double majorl, double minorl)
 Sets tic length
 
void ticLength (double &majorl, double &minorl) const
 
void setTicOrientation (double tx, double ty, double tz)
 Sets tic orientation from individual components
 
void setTicOrientation (const Qwt3D::Triple &val)
 Sets tic orientation from a Triple vector
 
Qwt3D::Triple ticOrientation () const
 
void setSymmetricTics (bool b)
 
void setLabelFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the font for the axis label
 
void setLabelFont (QFont const &font)
 Sets the font for the axis label
 
QFont const & labelFont () const
 
void setLabelString (QString const &name)
 Sets the axis label string
 
void setLabelPosition (const Qwt3D::Triple &pos, Qwt3D::ANCHOR)
 Sets label position in conjunction with an anchoring strategy
 
void setLabelColor (Qwt3D::RGBA col)
 Sets color for the axis label
 
void setLabel (bool val)
 
void adjustLabel (int val)
 
void setScaling (bool val)
 
bool scaling () const
 
void setScale (Qwt3D::SCALETYPE)
 Sets one of the predefined scaling types
 
void setScale (Scale *item)
 Sets a user-defined scale object
 
void setNumbers (bool val)
 
bool numbers () const
 
void setNumberColor (Qwt3D::RGBA col)
 Sets the color for axis numbers
 
Qwt3D::RGBA numberColor () const
 
void setNumberFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the font for axis numbers
 
void setNumberFont (QFont const &)
 Sets the font for axis numbers
 
QFont const & numberFont () const
 
void setNumberAnchor (Qwt3D::ANCHOR a)
 
void adjustNumbers (int val)
 
void setAutoScale (bool val=true)
 
bool autoScale () const
 
void setMajors (int val)
 Sets number of major intervals
 
void setMinors (int val)
 Sets number of minor intervals
 
int majors () const
 
int minors () const
 
Qwt3D::TripleField const & majorPositions () const
 
Qwt3D::TripleField const & minorPositions () const
 
void setLineWidth (double val, double majfac=0.9, double minfac=0.5)
 Sets line width for axis and tics
 
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 成员函数 继承自 Qwt3D::Drawable
virtual void saveGLState ()
 
virtual void restoreGLState ()
 
void attach (Drawable *)
 
void detach (Drawable *)
 
void detachAll ()
 
virtual void setColor (double r, double g, double b, double a=1)
 
virtual void setColor (Qwt3D::RGBA rgba)
 
Qwt3D::Triple relativePosition (Qwt3D::Triple rel)
 Calculates world coordinates from relative viewport position
 

额外继承的成员函数

- Protected 成员函数 继承自 Qwt3D::Drawable
void Enable (GLenum what, GLboolean val)
 
Qwt3D::Triple ViewPort2World (Qwt3D::Triple win, bool *err=nullptr)
 Converts viewport coordinates to world coordinates (glUnProject)
 
Qwt3D::Triple World2ViewPort (Qwt3D::Triple obj, bool *err=nullptr)
 Converts world coordinates to viewport coordinates (glProject)
 
 Drawable (Drawable &&other) noexcept
 
Drawableoperator= (Drawable &&other) noexcept
 
- Protected 属性 继承自 Qwt3D::Drawable
Qwt3D::RGBA color
 
GLdouble modelMatrix [16]
 
GLdouble projMatrix [16]
 
GLint viewport [4]
 

详细描述

Autoscalable axis with caption

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

构造及析构函数说明

◆ Axis() [1/2]

Axis::Axis ( )

Default constructor

Constructs an uninitialized axis with default parameters.

Destructor

◆ Axis() [2/2]

Axis::Axis ( Qwt3D::Triple  beg,
Qwt3D::Triple  end 
)

Constructs an axis with specified start and end positions

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

成员函数说明

◆ draw()

void Axis::draw ( )
overridevirtual

Draws the axis including base line, tics, and label

重载 Qwt3D::Drawable .

◆ setLabelColor()

void Axis::setLabelColor ( Qwt3D::RGBA  col)

Sets color for the axis label

参数
colRGBA color value for the label

◆ setLabelFont() [1/2]

void Axis::setLabelFont ( QFont const &  font)

Sets the font for the axis label

参数
fontQFont object to use for the axis label

◆ setLabelFont() [2/2]

void Axis::setLabelFont ( QString const &  family,
int  pointSize,
int  weight = QFont::Normal,
bool  italic = false 
)

Sets the font for the axis label

参数
familyFont family name
pointSizeFont point size
weightFont weight
italicWhether font is italic

◆ setLabelPosition()

void Axis::setLabelPosition ( const Qwt3D::Triple pos,
Qwt3D::ANCHOR  an 
)

Sets label position in conjunction with an anchoring strategy

参数
posPosition for the label
anAnchor strategy for the label

◆ setLabelString()

void Axis::setLabelString ( QString const &  name)

Sets the axis label string

参数
nameThe label text string

◆ setLineWidth()

void Axis::setLineWidth ( double  val,
double  majfac = 0.9,
double  minfac = 0.5 
)

Sets line width for axis and tics

参数
valThickness for axis base line
majfacRelative thickness for axis major tics (majfac*val)
minfacRelative thickness for axis minor tics (minfac*val)

◆ setMajors()

void Axis::setMajors ( int  val)

Sets number of major intervals

参数
valNumber of major intervals (always >= 1)

◆ setMinors()

void Axis::setMinors ( int  val)

Sets number of minor intervals

参数
valNumber of minor intervals (always >= 1)
参见
LogScale::setMinors()

◆ setNumberColor()

void Axis::setNumberColor ( Qwt3D::RGBA  col)

Sets the color for axis numbers

参数
colRGBA color value for axis numbers

◆ setNumberFont() [1/2]

void Axis::setNumberFont ( QFont const &  font)

Sets the font for axis numbers

参数
fontQFont object to use for axis numbers

◆ setNumberFont() [2/2]

void Axis::setNumberFont ( QString const &  family,
int  pointSize,
int  weight = QFont::Normal,
bool  italic = false 
)

Sets the font for axis numbers

参数
familyFont family name
pointSizeFont point size
weightFont weight
italicWhether font is italic

◆ setPosition()

void Axis::setPosition ( const Qwt3D::Triple beg,
const Qwt3D::Triple end 
)

Sets the axis position

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

◆ setScale() [1/2]

void Axis::setScale ( Qwt3D::SCALETYPE  val)

Sets one of the predefined scaling types

参数
valPredefined scale type (LINEARSCALE or LOG10SCALE)
警告
Too small intervals in logarithmic scales lead to empty scales (or perhaps a scale only containing an isolated major tic). Better switch to linear scales in such cases.

◆ setScale() [2/2]

void Axis::setScale ( Scale val)

Sets a user-defined scale object

参数
valPointer to a Scale object. Use with a heap based initialized pointer only. The axis adopts ownership.

◆ setTicLength()

void Axis::setTicLength ( double  majorl,
double  minorl 
)

Sets tic length

参数
majorlLength of major tics
minorlLength of minor tics

◆ setTicOrientation() [1/2]

void Axis::setTicOrientation ( const Qwt3D::Triple val)

Sets tic orientation from a Triple vector

参数
valOrientation vector for tics (will be normalized)

◆ setTicOrientation() [2/2]

void Axis::setTicOrientation ( double  tx,
double  ty,
double  tz 
)

Sets tic orientation from individual components

参数
txX component of tic orientation
tyY component of tic orientation
tzZ component of tic orientation

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