QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
Qwt3D::CoordinateSystem Class Reference

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

#include <qwt3d_coordsys.h>

Inheritance diagram for Qwt3D::CoordinateSystem:
Qwt3D::Drawable

Classes

class  PrivateData
 

Public Member Functions

 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 Member Functions inherited from 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 Attributes

std::vector< Axisaxes
 

Additional Inherited Members

- Protected Member Functions inherited from 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 Attributes inherited from Qwt3D::Drawable
Qwt3D::RGBA color
 
GLdouble modelMatrix [16]
 
GLdouble projMatrix [16]
 
GLint viewport [4]
 

Detailed Description

A coordinate system with different styles (BOX, FRAME)

Constructor & Destructor Documentation

◆ 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.

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

Destructor

Member Function Documentation

◆ adjustLabels()

void CoordinateSystem::adjustLabels ( int  val)

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

Parameters
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.

Parameters
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.

Reimplemented from Qwt3D::Drawable.

◆ setAutoScale()

void CoordinateSystem::setAutoScale ( bool  val = true)

Enables or disables automatic scaling for all axes.

Parameters
valTrue to enable auto-scaling, false to disable

◆ setAxesColor()

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

Sets a common color for all axes.

Parameters
valRGBA color value to apply to all axes

◆ setGridLines()

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

Sets grid line visibility.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
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.

Parameters
majorLength of major tic marks
minorLength of minor tic marks

The documentation for this class was generated from the following files: