|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
QwtPlotCachePanner 提供绘图画布的平移功能 更多...
#include <qwt_plot_cache_panner.h>
类 | |
| class | PrivateData |
Public 槽 | |
| virtual void | moveCanvas (int dx, int dy) |
| Move the canvas by the specified offset | |
Public 成员函数 | |
| QwtPlotCachePanner (QWidget *) | |
| Constructor | |
| virtual | ~QwtPlotCachePanner () |
| Destructor | |
| QWidget * | canvas () |
| Get the canvas widget | |
| const QWidget * | canvas () const |
| Get the canvas widget (const version) | |
| QwtPlot * | plot () |
| Get the plot widget | |
| const QwtPlot * | plot () const |
| Get the plot widget (const version) | |
| void | setAxisEnabled (QwtAxisId axisId, bool on) |
| Enable or disable an axis for panning | |
| bool | isAxisEnabled (QwtAxisId) const |
| Check if an axis is enabled for panning | |
Public 成员函数 继承自 QwtCachePanner | |
| QwtCachePanner (QWidget *parent) | |
| 创建一个启用左键鼠标按钮的平移器 | |
| virtual | ~QwtCachePanner () |
| 析构函数 | |
| void | setEnabled (bool) |
| 启用/禁用平移器 | |
| bool | isEnabled () const |
| 返回平移器是否启用 | |
| void | setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier) |
| 更改用于平移的鼠标按钮和修饰键 | |
| void | getMouseButton (Qt::MouseButton &button, Qt::KeyboardModifiers &) const |
| 获取用于平移的鼠标按钮和修饰键 | |
| void | setAbortKey (int key, Qt::KeyboardModifiers=Qt::NoModifier) |
| 更改中止键 | |
| void | getAbortKey (int &key, Qt::KeyboardModifiers &) const |
| 获取中止键和修饰键 | |
| void | setCursor (const QCursor &) |
| 更改平移时激活的光标 | |
| const QCursor | cursor () const |
| 返回平移时激活的光标 | |
| void | setOrientations (Qt::Orientations) |
| 设置启用平移的方向 | |
| Qt::Orientations | orientations () const |
| 返回启用平移的方向 | |
| bool | isOrientationEnabled (Qt::Orientation) const |
| 检查某个方向是否启用 | |
| virtual bool | eventFilter (QObject *, QEvent *) override |
| 事件过滤器 | |
Protected 成员函数 | |
| virtual QBitmap | contentsMask () const override |
| Get the contents mask | |
| virtual QPixmap | grab () const override |
| Grab the canvas | |
Protected 成员函数 继承自 QwtCachePanner | |
| virtual void | widgetMousePressEvent (QMouseEvent *) |
| Handle a mouse press event for the observed widget. | |
| virtual void | widgetMouseReleaseEvent (QMouseEvent *) |
| Handle a mouse release event for the observed widget. | |
| virtual void | widgetMouseMoveEvent (QMouseEvent *) |
| Handle a mouse move event for the observed widget. | |
| virtual void | widgetKeyPressEvent (QKeyEvent *) |
| Handle a key press event for the observed widget. | |
| virtual void | widgetKeyReleaseEvent (QKeyEvent *) |
| Handle a key release event for the observed widget. | |
| virtual void | paintEvent (QPaintEvent *) override |
| 绘制事件 | |
额外继承的成员函数 | |
信号 继承自 QwtCachePanner | |
| void | panned (int dx, int dy) |
| 平移完成时发出的信号 | |
| void | moved (int dx, int dy) |
| 控件移动但平移未完成时发出的信号 | |
QwtPlotCachePanner 提供绘图画布的平移功能
|
explicit |
Constructor
构造绑定为绘图部件画布的平移器
创建一个绑定到指定画布的 QwtPlotCachePanner 对象。 默认情况下,所有坐标轴都启用平移功能。
| canvas | 要平移的绘图画布,同时作为父对象 |
|
virtual |
Destructor
析构函数
释放平移器持有的所有资源。
| QWidget * QwtPlotCachePanner::canvas | ( | ) |
Get the canvas widget
返回被观察的绘图画布
| const QWidget * QwtPlotCachePanner::canvas | ( | ) | const |
Get the canvas widget (const version)
返回被观察的绘图画布(常量版本)
|
overrideprotectedvirtual |
Get the contents mask
Calculate a mask from the border path of the canvas
重载 QwtCachePanner .
|
overrideprotectedvirtual |
| bool QwtPlotCachePanner::isAxisEnabled | ( | QwtAxisId | axisId | ) | const |
Check if an axis is enabled for panning
测试坐标轴是否启用平移功能
| axisId | 要测试的坐标轴标识符 |
|
virtualslot |
Move the canvas by the specified offset
根据像素偏移量调整已启用的坐标轴
按指定的像素偏移量移动画布,并相应地更新坐标轴比例尺。 只有已启用的坐标轴会受到影响。
| dx | X 方向的像素偏移量 |
| dy | Y 方向的像素偏移量 |
| QwtPlot * QwtPlotCachePanner::plot | ( | ) |
| const QwtPlot * QwtPlotCachePanner::plot | ( | ) | const |
| void QwtPlotCachePanner::setAxisEnabled | ( | QwtAxisId | axisId, |
| bool | on | ||
| ) |
Enable or disable an axis for panning
启用或禁用坐标轴的平移功能
启用的坐标轴会在平移操作后同步更新, 其他未启用的坐标轴将保持不变。
| axisId | 坐标轴标识符 |
| on | true 为启用,false 为禁用 |