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

A coordinate system with different styles (BOX, FRAME) 更多...

#include <qwt3d_coordsys.h>

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

class  PrivateData
 

Public 成员函数

 CoordinateSystem (Qwt3D::Triple blb=Qwt3D::Triple(0, 0, 0), Qwt3D::Triple ftr=Qwt3D::Triple(0, 0, 0), Qwt3D::COORDSTYLE=Qwt3D::BOX)
 Constructs a coordinate system with specified boundaries and style
 
void init (Qwt3D::Triple beg=Qwt3D::Triple(0, 0, 0), Qwt3D::Triple end=Qwt3D::Triple(0, 0, 0))
 
void setStyle (Qwt3D::COORDSTYLE s, Qwt3D::AXIS frame_1=Qwt3D::X1, Qwt3D::AXIS frame_2=Qwt3D::Y1, Qwt3D::AXIS frame_3=Qwt3D::Z1)
 Sets the coordinate system style and selects which axes to display in FRAME mode
 
Qwt3D::COORDSTYLE style () const
 
void setPosition (Qwt3D::Triple first, Qwt3D::Triple second)
 Sets the position of the coordinate system box
 
void setAxesColor (Qwt3D::RGBA val)
 Sets a common color for all axes
 
void setNumberFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the font used for axis numbering across all axes
 
void setNumberFont (QFont const &font)
 Sets the font used for axis numbering across all axes
 
void setNumberColor (Qwt3D::RGBA val)
 Sets a common color for all axis numberings
 
void setStandardScale ()
 Sets all axes to use linear scaling with real number items
 
void adjustNumbers (int val)
 Adjusts the distance between axis numbering and axis body for all axes
 
void adjustLabels (int val)
 Adjusts the distance between axis labels and axis body for all axes
 
void setGridLinesColor (Qwt3D::RGBA val)
 
void setLabelFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the font used for axis labels across all axes
 
void setLabelFont (QFont const &font)
 Sets the font used for axis labels across all axes
 
void setLabelColor (Qwt3D::RGBA val)
 Sets a common color for all axis labels
 
void setLineWidth (double val, double majfac=0.9, double minfac=0.5)
 Sets line width for axes and tic marks
 
void setTicLength (double major, double minor)
 Sets the length of major and minor tic marks for all axes
 
void setAutoScale (bool val=true)
 Enables or disables automatic scaling for all axes
 
Qwt3D::Triple first () const
 
Qwt3D::Triple second () const
 
void setAutoDecoration (bool val=true)
 
bool autoDecoration () const
 
void setLineSmooth (bool val=true)
 
bool lineSmooth () const
 
void draw () override
 Draws the coordinate system, including grid lines if enabled
 
void setGridLines (bool majors, bool minors, int sides=Qwt3D::NOSIDEGRID)
 Sets grid line visibility
 
int grids () const
 
- 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
 

Public 属性

std::vector< Axisaxes
 

额外继承的成员函数

- 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]
 

详细描述

A coordinate system with different styles (BOX, FRAME)

构造及析构函数说明

◆ CoordinateSystem()

CoordinateSystem::CoordinateSystem ( Qwt3D::Triple  blb = Qwt3D::Triple(0, 0, 0),
Qwt3D::Triple  ftr = Qwt3D::Triple(0, 0, 0),
Qwt3D::COORDSTYLE  st = Qwt3D::BOX 
)
explicit

Constructs a coordinate system with specified boundaries and style

参数
firstMinimum vertex of the coordinate system box
secondMaximum vertex of the coordinate system box
stCoordinate system style (NOCOORD, BOX, or FRAME)

Destructor

成员函数说明

◆ adjustLabels()

void CoordinateSystem::adjustLabels ( int  val)

Adjusts the distance between axis labels and axis body for all axes

参数
valOffset value to fine-tune label positioning

◆ adjustNumbers()

void CoordinateSystem::adjustNumbers ( int  val)

Adjusts the distance between axis numbering and axis body for all axes

参数
valOffset value to fine-tune number positioning

◆ draw()

void CoordinateSystem::draw ( )
overridevirtual

Draws the coordinate system, including grid lines if enabled

Chooses visible axes automatically when auto-decoration is on, then draws major and minor grid lines as configured.

重载 Qwt3D::Drawable .

◆ setAutoScale()

void CoordinateSystem::setAutoScale ( bool  val = true)

Enables or disables automatic scaling for all axes

参数
valTrue to enable auto-scaling, false to disable

◆ setAxesColor()

void CoordinateSystem::setAxesColor ( Qwt3D::RGBA  val)

Sets a common color for all axes

参数
valRGBA color value to apply to all axes

◆ setGridLines()

void CoordinateSystem::setGridLines ( bool  majors,
bool  minors,
int  sides = Qwt3D::NOSIDEGRID 
)

Sets grid line visibility

参数
majorsDraw grid between major tics
minorsDraw grid between minor tics
sidesSide(s) where the grid should be drawn

The axis used for tic calculation is chosen randomly from the respective pair. For most cases an identical tic distribution is therefore recommended.

◆ setLabelColor()

void CoordinateSystem::setLabelColor ( Qwt3D::RGBA  val)

Sets a common color for all axis labels

参数
valRGBA color value to apply to axis labels

◆ setLabelFont() [1/2]

void CoordinateSystem::setLabelFont ( QFont const &  font)

Sets the font used for axis labels across all axes

参数
fontQFont object to apply to all axis labels

◆ setLabelFont() [2/2]

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

Sets the font used for axis labels across all axes

参数
familyFont family name
pointSizeFont size in points
weightFont weight (e.g., QFont::Normal, QFont::Bold)
italicWhether to use italic style

◆ setLineWidth()

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

Sets line width for axes and tic marks

参数
valBase line width for axes
majfacScaling factor for major tic line width
minfacScaling factor for minor tic line width

◆ setNumberColor()

void CoordinateSystem::setNumberColor ( Qwt3D::RGBA  val)

Sets a common color for all axis numberings

参数
valRGBA color value to apply to axis numbers

◆ setNumberFont() [1/2]

void CoordinateSystem::setNumberFont ( QFont const &  font)

Sets the font used for axis numbering across all axes

参数
fontQFont object to apply to all axis numberings

◆ setNumberFont() [2/2]

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

Sets the font used for axis numbering across all axes

参数
familyFont family name
pointSizeFont size in points
weightFont weight (e.g., QFont::Normal, QFont::Bold)
italicWhether to use italic style

◆ setPosition()

void CoordinateSystem::setPosition ( Qwt3D::Triple  first,
Qwt3D::Triple  second 
)

Sets the position of the coordinate system box

参数
firstFront-left-bottom corner of the bounding box
secondBack-right-top corner of the bounding box

◆ setStyle()

void CoordinateSystem::setStyle ( Qwt3D::COORDSTYLE  s,
Qwt3D::AXIS  frame_1 = Qwt3D::X1,
Qwt3D::AXIS  frame_2 = Qwt3D::Y1,
Qwt3D::AXIS  frame_3 = Qwt3D::Z1 
)

Sets the coordinate system style and selects which axes to display in FRAME mode

参数
sCoordinate system style (NOCOORD, BOX, or FRAME)
frame_1First axis to display when using FRAME style
frame_2Second axis to display when using FRAME style
frame_3Third axis to display when using FRAME style

In BOX mode all 12 axes are drawn. In FRAME mode only the three specified axes are drawn (unless auto-decoration is enabled). NOCOORD disables all coordinate system rendering.

◆ setTicLength()

void CoordinateSystem::setTicLength ( double  major,
double  minor 
)

Sets the length of major and minor tic marks for all axes

参数
majorLength of major tic marks
minorLength of minor tic marks

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