QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 槽 | Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtPlotScaleEventDispatcher类 参考

Event filter for parasitic plots, handling axis interactions 更多...

#include <qwt_plot_scale_event_dispatcher.h>

类 QwtPlotScaleEventDispatcher 继承关系图:

class  PrivateData
 

Public 槽

void updateCache ()
 Update cache
 
void setEnable (bool on=true)
 Set enabled state
 

Public 成员函数

 QwtPlotScaleEventDispatcher (QwtPlot *plot, QObject *par=nullptr)
 Constructor
 
 ~QwtPlotScaleEventDispatcher () override
 Destructor
 
bool isEnable () const
 Check if enabled
 

静态 Public 成员函数

static QwtAxisId findAxisIdByScaleWidget (const QwtPlot *plot, const QwtScaleWidget *scaleWidget)
 Find axis ID corresponding to QwtScaleWidget
 

Protected 成员函数

virtual bool eventFilter (QObject *obj, QEvent *e) override
 
void rebuildCache ()
 Rebuild all cache data; must be called when a new parasite plot is added to cache the plot's axes
 
virtual bool handleMousePress (QwtPlot *bindPlot, QMouseEvent *e)
 
virtual bool handleMouseMove (QwtPlot *bindPlot, QMouseEvent *e)
 
virtual bool handleMouseRelease (QwtPlot *bindPlot, QMouseEvent *e)
 
virtual bool handleWheelEvent (QwtPlot *bindPlot, QWheelEvent *e)
 
QwtScaleWidgetfindTargetOnScale (const QPoint &pos)
 

详细描述

Event filter for parasitic plots, handling axis interactions

Since parasitic plots are child windows of host plots, events from multiple parasitic plots' widgets cannot be passed to other parasitic plots' widgets. For example, with 2 parasitic plots, their axis areas overlap. The top-level parasitic plot's axis widget has the same size as the lower-level and host plot's axis widgets. Only the top-level parasitic axis widget receives events. Even if ignored, events only fall to the current parasitic plot window, not the next level's axis widget. This class is designed to solve this problem. Axis actions are executed here as event handlers rather than event propagators.

构造及析构函数说明

◆ QwtPlotScaleEventDispatcher()

QwtPlotScaleEventDispatcher::QwtPlotScaleEventDispatcher ( QwtPlot plot,
QObject *  par = nullptr 
)
explicit

Constructor

参数
[in]plotPlot widget
[in]parParent object

Destructor

成员函数说明

◆ findAxisIdByScaleWidget()

QwtAxisId QwtPlotScaleEventDispatcher::findAxisIdByScaleWidget ( const QwtPlot plot,
const QwtScaleWidget scaleWidget 
)
static

Find axis ID corresponding to QwtScaleWidget

参数
[in]plotQwtPlot pointer
[in]scaleWidgetQwtScaleWidget to find
返回
Axis ID, returns QwtAxis::AxisPositions if not found

◆ isEnable()

bool QwtPlotScaleEventDispatcher::isEnable ( ) const

Check if enabled

返回
True if enabled

◆ setEnable

void QwtPlotScaleEventDispatcher::setEnable ( bool  on = true)
slot

Set enabled state

参数
[in]onEnable/disable

◆ updateCache

void QwtPlotScaleEventDispatcher::updateCache ( )
slot

Update cache

Update cache, rebuild if necessary

Called when cache is dirty or needs refresh.


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