QwtPlotRescaler 负责处理绘图比例尺的固定宽高比
更多...
#include <qwt_plot_rescaler.h>
QwtPlotRescaler 负责处理绘图比例尺的固定宽高比
◆ ExpandingDirection
扩展方向
| 枚举值 |
|---|
| ExpandUp | The upper limit of the scale is adjusted
|
| ExpandDown | The lower limit of the scale is adjusted
|
| ExpandBoth | Both limits of the scale are adjusted
|
◆ RescalePolicy
重缩放策略
| 枚举值 |
|---|
| Fixed | 当画布的几何形状改变时,参考轴的区间保持不变。所有其他轴 将根据其宽高比进行调整。
|
| Expanding | 当画布的几何形状改变时,参考轴的区间将收缩/扩展。所有其他轴 将根据其宽高比进行调整。
由一个像素表示的区间是固定的。
|
| Fitting | 计算轴的区间,使所有轴都包含它们的区间提示。
|
◆ QwtPlotRescaler()
◆ ~QwtPlotRescaler()
| QwtPlotRescaler::~QwtPlotRescaler |
( |
| ) |
|
|
virtual |
◆ aspectRatio()
| double QwtPlotRescaler::aspectRatio |
( |
QwtAxisId |
axisId | ) |
const |
◆ canvas() [1/2]
| QWidget * QwtPlotRescaler::canvas |
( |
| ) |
|
◆ canvas() [2/2]
| const QWidget * QwtPlotRescaler::canvas |
( |
| ) |
const |
◆ canvasResizeEvent()
| void QwtPlotRescaler::canvasResizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protectedvirtual |
Event handler for resize events of the plot canvas
- 参数
-
- 参见
- rescale()
◆ eventFilter()
| bool QwtPlotRescaler::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| |
|
overridevirtual |
画布事件过滤器
处理画布的调整大小和整理请求事件。
- 参数
-
| [in] | object | 接收事件的对象 |
| [in] | event | 接收到的事件 |
- 返回
- false 以允许事件的进一步处理
◆ expandingDirection()
◆ expandInterval()
Expand the interval
- 参数
-
| interval | Interval to be expanded |
| width | Distance to be added to the interval |
| direction | Direction of the expand operation |
- 返回
- Expanded interval
◆ expandScale()
| QwtInterval QwtPlotRescaler::expandScale |
( |
QwtAxisId |
axisId, |
|
|
const QSize & |
oldSize, |
|
|
const QSize & |
newSize |
|
) |
| const |
|
protectedvirtual |
Calculate the new scale interval of a plot axis
- 参数
-
| axisId | Axis |
| oldSize | Previous size of the canvas |
| newSize | New size of the canvas |
- 返回
- Calculated new interval for the axis
◆ interval()
| QwtInterval QwtPlotRescaler::interval |
( |
QwtAxisId |
axisId | ) |
const |
|
protected |
- 参数
-
- 返回
- Normalized interval of an axis
◆ intervalHint()
| QwtInterval QwtPlotRescaler::intervalHint |
( |
QwtAxisId |
axisId | ) |
const |
◆ isEnabled()
| bool QwtPlotRescaler::isEnabled |
( |
| ) |
const |
◆ orientation()
| Qt::Orientation QwtPlotRescaler::orientation |
( |
QwtAxisId |
axisId | ) |
const |
|
protected |
- 返回
- Orientation of an axis
- 参数
-
◆ plot() [1/2]
| QwtPlot * QwtPlotRescaler::plot |
( |
| ) |
|
◆ plot() [2/2]
| const QwtPlot * QwtPlotRescaler::plot |
( |
| ) |
const |
◆ referenceAxis()
| QwtAxisId QwtPlotRescaler::referenceAxis |
( |
| ) |
const |
◆ rescale() [1/2]
| void QwtPlotRescaler::rescale |
( |
| ) |
const |
◆ rescale() [2/2]
| void QwtPlotRescaler::rescale |
( |
const QSize & |
oldSize, |
|
|
const QSize & |
newSize |
|
) |
| const |
|
protectedvirtual |
Adjust the plot axes scales
- 参数
-
| oldSize | Previous size of the canvas |
| newSize | New size of the canvas |
◆ rescalePolicy()
◆ setAspectRatio() [1/2]
| void QwtPlotRescaler::setAspectRatio |
( |
double |
ratio | ) |
|
◆ setAspectRatio() [2/2]
| void QwtPlotRescaler::setAspectRatio |
( |
QwtAxisId |
axisId, |
|
|
double |
ratio |
|
) |
| |
设置指定轴的宽高比
设置参考轴与指定轴之间的宽高比。默认比值为 1.0。
- 参数
-
| [in] | axisId | 轴标识符 |
| [in] | ratio | 宽高比 |
- 参见
- aspectRatio()
◆ setEnabled()
| void QwtPlotRescaler::setEnabled |
( |
bool |
on | ) |
|
◆ setExpandingDirection() [1/2]
◆ setExpandingDirection() [2/2]
| void QwtPlotRescaler::setExpandingDirection |
( |
QwtAxisId |
axisId, |
|
|
ExpandingDirection |
direction |
|
) |
| |
◆ setIntervalHint()
| void QwtPlotRescaler::setIntervalHint |
( |
QwtAxisId |
axisId, |
|
|
const QwtInterval & |
interval |
|
) |
| |
◆ setReferenceAxis()
| void QwtPlotRescaler::setReferenceAxis |
( |
QwtAxisId |
axisId | ) |
|
◆ setRescalePolicy()
◆ syncScale()
| QwtInterval QwtPlotRescaler::syncScale |
( |
QwtAxisId |
axisId, |
|
|
const QwtInterval & |
reference, |
|
|
const QSize & |
size |
|
) |
| const |
|
protectedvirtual |
Synchronize an axis scale according to the scale of the reference axis
- 参数
-
| axisId | Axis |
| reference | Interval of the reference axis |
| size | Size of the canvas |
- 返回
- New interval for axis
◆ updateScales()
| void QwtPlotRescaler::updateScales |
( |
QwtInterval |
intervals[QwtAxis::AxisPositions] | ) |
const |
|
protectedvirtual |
Update the axes scales
- 参数
-
该类的文档由以下文件生成:
- /home/runner/work/QWT/QWT/src/plot/qwt_plot_rescaler.h
- /home/runner/work/QWT/QWT/src/plot/qwt_plot_rescaler.cpp