QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtScaleEngine类 参考abstract

刻度引擎的基类 更多...

#include <qwt_scale_engine.h>

类 QwtScaleEngine 继承关系图:
QwtLinearScaleEngine QwtLogScaleEngine QwtDateScaleEngine

class  PrivateData
 

Public 类型

enum  Attribute {
  NoAttribute = 0x00 , IncludeReference = 0x01 , Symmetric = 0x02 , Floating = 0x04 ,
  Inverted = 0x08
}
 布局属性 更多...
 

Public 成员函数

 QwtScaleEngine (uint base=10)
 构造函数
 
virtual ~QwtScaleEngine ()
 Destructor
 
void setBase (uint base)
 Set the base
 
uint base () const
 返回刻度引擎的基数
 
void setAttribute (Attribute, bool on=true)
 Set an attribute
 
bool testAttribute (Attribute) const
 测试属性是否启用
 
void setAttributes (Attributes)
 Set attributes
 
Attributes attributes () const
 返回刻度属性
 
void setReference (double)
 Set the reference value
 
double reference () const
 返回参考值
 
void setMargins (double lower, double upper)
 Set the margins
 
double lowerMargin () const
 返回刻度下端的边距
 
double upperMargin () const
 返回刻度上端的边距
 
virtual void autoScale (int maxNumSteps, double &x1, double &x2, double &stepSize) const =0
 Align and divide an interval
 
virtual QwtScaleDiv divideScale (double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const =0
 Calculate a scale division
 
void setTransformation (QwtTransform *)
 Set the transformation
 
QwtTransformtransformation () const
 创建并返回引擎变换的克隆
 

Protected 成员函数

bool contains (const QwtInterval &, double value) const
 Check if an interval contains a value
 
QList< double > strip (const QList< double > &, const QwtInterval &) const
 Strip values outside an interval
 
double divideInterval (double intervalSize, int numSteps) const
 Divide an interval
 
QwtInterval buildInterval (double value) const
 Build an interval around a value
 

详细描述

刻度引擎的基类

成员枚举类型说明

◆ Attribute

布局属性

枚举值
NoAttribute 

No attributes

IncludeReference 

Build a scale which includes the reference() value

Symmetric 

Build a scale which is symmetric to the reference() value

Floating 

刻度的端点值 = 最外侧包含值 + 指定边距(详见 setMargins() 方法)。 若未设置此属性,刻度的端点值将为步长的整数倍。

Inverted 

Turn the scale upside down

构造及析构函数说明

◆ QwtScaleEngine()

QwtScaleEngine::QwtScaleEngine ( uint  base = 10)
explicit

构造函数

成员函数说明

◆ attributes()

QwtScaleEngine::Attributes QwtScaleEngine::attributes ( ) const

返回刻度属性

返回
the attributes

◆ autoScale()

virtual void QwtScaleEngine::autoScale ( int  maxNumSteps,
double &  x1,
double &  x2,
double &  stepSize 
) const
pure virtual

Align and divide an interval

QwtDateScaleEngine, QwtLinearScaleEngine , 以及 QwtLogScaleEngine 内被实现.

◆ base()

uint QwtScaleEngine::base ( ) const

返回刻度引擎的基数

返回
the base

◆ buildInterval()

QwtInterval QwtScaleEngine::buildInterval ( double  value) const
protected

Build an interval around a value

围绕值构建区间

◆ contains()

bool QwtScaleEngine::contains ( const QwtInterval interval,
double  value 
) const
protected

Check if an interval contains a value

检查区间是否"包含"一个值

◆ divideInterval()

double QwtScaleEngine::divideInterval ( double  intervalSize,
int  numSteps 
) const
protected

Divide an interval

计算区间大小的步长

◆ divideScale()

virtual QwtScaleDiv QwtScaleEngine::divideScale ( double  x1,
double  x2,
int  maxMajorSteps,
int  maxMinorSteps,
double  stepSize = 0.0 
) const
pure virtual

Calculate a scale division

QwtDateScaleEngine, QwtLinearScaleEngine , 以及 QwtLogScaleEngine 内被实现.

◆ lowerMargin()

double QwtScaleEngine::lowerMargin ( ) const

返回刻度下端的边距

返回
the lower margin

◆ reference()

double QwtScaleEngine::reference ( ) const

返回参考值

返回
the reference value

◆ setAttribute()

void QwtScaleEngine::setAttribute ( Attribute  attribute,
bool  on = true 
)

Set an attribute

更改刻度属性

◆ setAttributes()

void QwtScaleEngine::setAttributes ( Attributes  attributes)

Set attributes

更改刻度属性

◆ setBase()

void QwtScaleEngine::setBase ( uint  base)

Set the base

设置刻度引擎的基数

◆ setMargins()

void QwtScaleEngine::setMargins ( double  lower,
double  upper 
)

Set the margins

指定刻度端点的边距

◆ setReference()

void QwtScaleEngine::setReference ( double  reference)

Set the reference value

指定参考点

◆ setTransformation()

void QwtScaleEngine::setTransformation ( QwtTransform transform)

Set the transformation

设置变换

◆ strip()

QList< double > QwtScaleEngine::strip ( const QList< double > &  ticks,
const QwtInterval interval 
) const
protected

Strip values outside an interval

从列表中移除不在区间内的刻度

◆ testAttribute()

bool QwtScaleEngine::testAttribute ( Attribute  attribute) const

测试属性是否启用

返回
true if an attribute is set

◆ transformation()

QwtTransform * QwtScaleEngine::transformation ( ) const

创建并返回引擎变换的克隆

返回
the transformation

◆ upperMargin()

double QwtScaleEngine::upperMargin ( ) const

返回刻度上端的边距

返回
the upper margin

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