|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
A coordinate system with different styles (BOX, FRAME) 更多...
#include <qwt3d_coordsys.h>
类 | |
| 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< Axis > | axes |
额外继承的成员函数 | |
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 | |
| Drawable & | operator= (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)
|
explicit |
Constructs a coordinate system with specified boundaries and style
| first | Minimum vertex of the coordinate system box |
| second | Maximum vertex of the coordinate system box |
| st | Coordinate system style (NOCOORD, BOX, or FRAME) |
Destructor
| void CoordinateSystem::adjustLabels | ( | int | val | ) |
Adjusts the distance between axis labels and axis body for all axes
| val | Offset value to fine-tune label positioning |
| void CoordinateSystem::adjustNumbers | ( | int | val | ) |
Adjusts the distance between axis numbering and axis body for all axes
| val | Offset value to fine-tune number positioning |
|
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 .
| void CoordinateSystem::setAutoScale | ( | bool | val = true | ) |
Enables or disables automatic scaling for all axes
| val | True to enable auto-scaling, false to disable |
| void CoordinateSystem::setAxesColor | ( | Qwt3D::RGBA | val | ) |
Sets a common color for all axes
| val | RGBA color value to apply to all axes |
| void CoordinateSystem::setGridLines | ( | bool | majors, |
| bool | minors, | ||
| int | sides = Qwt3D::NOSIDEGRID |
||
| ) |
Sets grid line visibility
| majors | Draw grid between major tics |
| minors | Draw grid between minor tics |
| sides | Side(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.
| void CoordinateSystem::setLabelColor | ( | Qwt3D::RGBA | val | ) |
Sets a common color for all axis labels
| val | RGBA color value to apply to axis labels |
| void CoordinateSystem::setLabelFont | ( | QFont const & | font | ) |
Sets the font used for axis labels across all axes
| font | QFont object to apply to all axis labels |
| 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
| family | Font family name |
| pointSize | Font size in points |
| weight | Font weight (e.g., QFont::Normal, QFont::Bold) |
| italic | Whether to use italic style |
| void CoordinateSystem::setLineWidth | ( | double | val, |
| double | majfac = 0.9, |
||
| double | minfac = 0.5 |
||
| ) |
Sets line width for axes and tic marks
| val | Base line width for axes |
| majfac | Scaling factor for major tic line width |
| minfac | Scaling factor for minor tic line width |
| void CoordinateSystem::setNumberColor | ( | Qwt3D::RGBA | val | ) |
Sets a common color for all axis numberings
| val | RGBA color value to apply to axis numbers |
| void CoordinateSystem::setNumberFont | ( | QFont const & | font | ) |
Sets the font used for axis numbering across all axes
| font | QFont object to apply to all axis numberings |
| 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
| family | Font family name |
| pointSize | Font size in points |
| weight | Font weight (e.g., QFont::Normal, QFont::Bold) |
| italic | Whether to use italic style |
| void CoordinateSystem::setPosition | ( | Qwt3D::Triple | first, |
| Qwt3D::Triple | second | ||
| ) |
Sets the position of the coordinate system box
| first | Front-left-bottom corner of the bounding box |
| second | Back-right-top corner of the bounding box |
| 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
| s | Coordinate system style (NOCOORD, BOX, or FRAME) |
| frame_1 | First axis to display when using FRAME style |
| frame_2 | Second axis to display when using FRAME style |
| frame_3 | Third 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.
| void CoordinateSystem::setTicLength | ( | double | major, |
| double | minor | ||
| ) |
Sets the length of major and minor tic marks for all axes
| major | Length of major tic marks |
| minor | Length of minor tic marks |