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

Non-visual scale class encapsulating tic generation 更多...

#include <qwt3d_scale.h>

类 Qwt3D::Scale 继承关系图:
Qwt3D::LinearScale Qwt3D::LogScale

class  PrivateData
 

Protected 成员函数

virtual QString ticLabel (unsigned int idx) const
 Maps the double value at tic-position idx to a final representation
 
virtual void setLimits (double start, double stop)
 Sets start and stop value for the scale
 
virtual void setMajors (int val)
 Sets number of major intervals
 
virtual void setMinors (int val)
 Sets number of minor intervals per major interval
 
virtual void setMajorLimits (double start, double stop)
 Sets value of first and last major tic
 
int majors () const
 Returns major intervals
 
int minors () const
 Returns minor intervals
 
virtual Scaleclone () const =0
 
virtual void calculate ()=0
 
virtual int autoscale (double &a, double &b, double start, double stop, int ivals)
 Autoscales the axis
 
const std::vector< double > & majorTicks () const
 Returns const reference to major tic positions
 
const std::vector< double > & minorTicks () const
 Returns const reference to minor tic positions
 
void copyFrom (const Scale &other)
 Copies Scale base state from another Scale
 

友元

class Axis
 Indices used to identify an axis.
 
class ClonePtr< Scale >
 

详细描述

Non-visual scale class encapsulating tic generation

The class encapsulates non-visual scales. It is utilized by Axis and also collaborates closely with AutoScaler. A Scale allows control over all aspects of tic generation including arbitrary transformations of tic values into corresponding strings. The strings contain what eventually will be shown as tic labels. Standard linear and logarithmic scales have been integrated into the Axis interface. User-defined axes can be derived from Scale, LinearScale et al.

成员函数说明

◆ autoscale()

int Scale::autoscale ( double &  a,
double &  b,
double  start,
double  stop,
int  ivals 
)
protectedvirtual

Autoscales the axis

参数
[out]aFirst major tic after applying autoscaling
[out]bLast major tic after applying autoscaling
startScale begin
stopScale end
ivalsRequested number of major intervals
返回
Number of major intervals after autoscaling

The default implementation sets a=start, b=stop and returns ivals.

Qwt3D::LinearScale 重载.

◆ calculate()

virtual void Qwt3D::Scale::calculate ( )
protectedpure virtual

Qwt3D::LinearScale , 以及 Qwt3D::LogScale 内被实现.

◆ clone()

virtual Scale * Qwt3D::Scale::clone ( ) const
protectedpure virtual

Qwt3D::LinearScale , 以及 Qwt3D::LogScale 内被实现.

◆ copyFrom()

void Scale::copyFrom ( const Scale other)
protected

Copies Scale base state from another Scale

参数
otherSource Scale to copy from

Used by derived class clone() implementations to copy the Scale base data without requiring a copy constructor.

◆ majors()

int Scale::majors ( ) const
protected

Returns major intervals

返回
Number of major intervals

◆ majorTicks()

const std::vector< double > & Scale::majorTicks ( ) const
protected

Returns const reference to major tic positions

返回
Const reference to the vector of major tic positions

◆ minors()

int Scale::minors ( ) const
protected

Returns minor intervals

返回
Number of minor intervals

◆ minorTicks()

const std::vector< double > & Scale::minorTicks ( ) const
protected

Returns const reference to minor tic positions

返回
Const reference to the vector of minor tic positions

◆ setLimits()

void Scale::setLimits ( double  start,
double  stop 
)
protectedvirtual

Sets start and stop value for the scale

参数
startScale start value
stopScale stop value

◆ setMajorLimits()

void Scale::setMajorLimits ( double  start,
double  stop 
)
protectedvirtual

Sets value of first and last major tic

参数
startFirst major tic value
stopLast major tic value

◆ setMajors()

void Scale::setMajors ( int  val)
protectedvirtual

Sets number of major intervals

参数
valNumber of major intervals

◆ setMinors()

void Scale::setMinors ( int  val)
protectedvirtual

Sets number of minor intervals per major interval

参数
valNumber of minor intervals

Qwt3D::LogScale 重载.

◆ ticLabel()

QString Scale::ticLabel ( unsigned int  idx) const
protectedvirtual

Maps the double value at tic-position idx to a final representation

参数
idxThe current major tic index
返回
The QString representation for the value corresponding to a valid index, an empty QString else.

The default return value is simply the tic values QString representation. Overwrite this function, if you plan to transform the value in some way. See e.g. LogScale::ticLabel.

Qwt3D::LogScale 重载.

友元及相关函数文档

◆ Axis

friend class Axis
friend

Indices used to identify an axis.

参见
Scale

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