QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_plot_scale_event_dispatcher.h
1#ifndef QWTPLOTSCALEEVENTDISPATCHER_H
2#define QWTPLOTSCALEEVENTDISPATCHER_H
3#include <QObject>
4#include "qwt_global.h"
5#include "qwt_axis_id.h"
6class QMouseEvent;
7class QWheelEvent;
8class QwtPlot;
22class QWT_EXPORT QwtPlotScaleEventDispatcher : public QObject
23{
24 Q_OBJECT
25 QWT_DECLARE_PRIVATE(QwtPlotScaleEventDispatcher)
26public:
28 explicit QwtPlotScaleEventDispatcher(QwtPlot* plot, QObject* par = nullptr);
32 bool isEnable() const;
34 static QwtAxisId findAxisIdByScaleWidget(const QwtPlot* plot, const QwtScaleWidget* scaleWidget);
35public Q_SLOTS:
37 void updateCache();
39 void setEnable(bool on = true);
40
41protected:
42 virtual bool eventFilter(QObject* obj, QEvent* e) override;
43 // Update data
44 void rebuildCache();
45 // Handle various mouse events
46 virtual bool handleMousePress(QwtPlot* bindPlot, QMouseEvent* e);
47 virtual bool handleMouseMove(QwtPlot* bindPlot, QMouseEvent* e);
48 virtual bool handleMouseRelease(QwtPlot* bindPlot, QMouseEvent* e);
49 virtual bool handleWheelEvent(QwtPlot* bindPlot, QWheelEvent* e);
50 // Find the scale widget that should handle the event
51 QwtScaleWidget* findTargetOnScale(const QPoint& pos);
52};
53
54#endif // QWTPLOTSCALEEVENTDISPATCHER_H
Event filter for parasitic plots, handling axis interactions
Definition qwt_plot_scale_event_dispatcher.h:23
~QwtPlotScaleEventDispatcher() override
Destructor
A 2-D plotting widget
Definition qwt_plot.h:99
A Widget which contains a scale
Definition qwt_scale_widget.h:73