|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
用于日期/时间值的刻度引擎 更多...
#include <qwt_date_scale_engine.h>
类 | |
| class | PrivateData |
Public 成员函数 | |
| QwtDateScaleEngine (Qt::TimeSpec=Qt::LocalTime) | |
| Constructor with time specification | |
| virtual | ~QwtDateScaleEngine () |
| Destructor | |
| void | setTimeSpec (Qt::TimeSpec) |
| Set the time specification used by the engine | |
| Qt::TimeSpec | timeSpec () const |
| Get the time specification used by the engine | |
| void | setUtcOffset (int seconds) |
| Set the offset in seconds from Coordinated Universal Time | |
| int | utcOffset () const |
| Get the offset in seconds from Coordinated Universal Time | |
| void | setWeek0Type (QwtDate::Week0Type) |
| Set how to identify the first week of a year | |
| QwtDate::Week0Type | week0Type () const |
| Get how to identify the first week of a year | |
| void | setMaxWeeks (int) |
| Set upper limit for the number of weeks | |
| int | maxWeeks () const |
| Get upper limit for the number of weeks | |
| virtual void | autoScale (int maxNumSteps, double &x1, double &x2, double &stepSize) const override |
| Align and divide an interval | |
| virtual QwtScaleDiv | divideScale (double x1, double x2, int maxMajorSteps, int maxMinorSteps, double stepSize=0.0) const override |
| Calculate a scale division for a date/time interval | |
| virtual QwtDate::IntervalType | intervalType (const QDateTime &, const QDateTime &, int maxSteps) const |
| Classification of a date/time interval division | |
| QDateTime | toDateTime (double) const |
| Translate a double value into a QDateTime object | |
Public 成员函数 继承自 QwtLinearScaleEngine | |
| QwtLinearScaleEngine (uint base=10) | |
| 构造函数 | |
| virtual | ~QwtLinearScaleEngine () |
| Destructor | |
Public 成员函数 继承自 QwtScaleEngine | |
| 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 |
| 返回刻度上端的边距 | |
| void | setTransformation (QwtTransform *) |
| Set the transformation | |
| QwtTransform * | transformation () const |
| 创建并返回引擎变换的克隆 | |
Protected 成员函数 | |
| virtual QDateTime | alignDate (const QDateTime &, double stepSize, QwtDate::IntervalType, bool up) const |
| Align a date/time value for a step size | |
Protected 成员函数 继承自 QwtLinearScaleEngine | |
| QwtInterval | align (const QwtInterval &, double stepSize) const |
| 将区间对齐到步长 | |
| void | buildTicks (const QwtInterval &, double stepSize, int maxMinorSteps, QList< double > ticks[QwtScaleDiv::NTickTypes]) const |
| 计算区间的刻度 | |
| QList< double > | buildMajorTicks (const QwtInterval &interval, double stepSize) const |
| 计算区间的主刻度 | |
| void | buildMinorTicks (const QList< double > &majorTicks, int maxMinorSteps, double stepSize, QList< double > &minorTicks, QList< double > &mediumTicks) const |
| 计算主刻度的次刻度/中刻度 | |
Protected 成员函数 继承自 QwtScaleEngine | |
| 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 | |
额外继承的成员函数 | |
Public 类型 继承自 QwtScaleEngine | |
| enum | Attribute { NoAttribute = 0x00 , IncludeReference = 0x01 , Symmetric = 0x02 , Floating = 0x04 , Inverted = 0x08 } |
| 布局属性 更多... | |
用于日期/时间值的刻度引擎
|
explicit |
Constructor with time specification
构造函数
|
virtual |
Destructor
析构函数
|
protectedvirtual |
Align a date/time value for a step size
For Qt::Day alignments there is no "natural day 0" - instead the first day of the year is used to avoid jumping major ticks positions when panning a scale. For other alignments ( f.e according to the first day of the month ) alignDate() has to be overloaded.
| dateTime | Date/time value |
| stepSize | Step size |
| intervalType | Interval type |
| up | When true dateTime is ceiled - otherwise it is floored |
|
overridevirtual |
|
overridevirtual |
|
virtual |
Classification of a date/time interval division
日期/时间间隔划分的分类
| int QwtDateScaleEngine::maxWeeks | ( | ) | const |
Get upper limit for the number of weeks
获取周数的上限
| void QwtDateScaleEngine::setMaxWeeks | ( | int | weeks | ) |
Set upper limit for the number of weeks
设置周数的上限
| void QwtDateScaleEngine::setTimeSpec | ( | Qt::TimeSpec | timeSpec | ) |
Set the time specification used by the engine
设置引擎使用的时间规范
| void QwtDateScaleEngine::setUtcOffset | ( | int | seconds | ) |
Set the offset in seconds from Coordinated Universal Time
设置与世界协调时间的偏移量(秒)
| void QwtDateScaleEngine::setWeek0Type | ( | QwtDate::Week0Type | week0Type | ) |
Set how to identify the first week of a year
设置如何确定一年的第一周
| Qt::TimeSpec QwtDateScaleEngine::timeSpec | ( | ) | const |
Get the time specification used by the engine
获取引擎使用的时间规范
| QDateTime QwtDateScaleEngine::toDateTime | ( | double | value | ) | const |
Translate a double value into a QDateTime object
将 double 值转换为 QDateTime 对象
| int QwtDateScaleEngine::utcOffset | ( | ) | const |
Get the offset in seconds from Coordinated Universal Time
获取与世界协调时间的偏移量(秒)
| QwtDate::Week0Type QwtDateScaleEngine::week0Type | ( | ) | const |
Get how to identify the first week of a year
获取如何确定一年的第一周