|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
Event filter for parasitic plots, handling axis interactions. More...
#include <qwt_plot_scale_event_dispatcher.h>
Classes | |
| class | PrivateData |
Public Slots | |
| void | updateCache () |
| Update cache. | |
| void | setEnable (bool on=true) |
| Set enabled state. | |
Public Member Functions | |
| QwtPlotScaleEventDispatcher (QwtPlot *plot, QObject *par=nullptr) | |
| Constructor. | |
| ~QwtPlotScaleEventDispatcher () override | |
| Destructor. | |
| bool | isEnable () const |
| Check if enabled. | |
Static Public Member Functions | |
| static QwtAxisId | findAxisIdByScaleWidget (const QwtPlot *plot, const QwtScaleWidget *scaleWidget) |
| Find axis ID corresponding to QwtScaleWidget. | |
Protected Member Functions | |
| 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) |
| QwtScaleWidget * | findTargetOnScale (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.
|
explicit |
Constructor.
| [in] | plot | Plot widget |
| [in] | par | Parent object |
Destructor
|
static |
Find axis ID corresponding to QwtScaleWidget.
| [in] | plot | QwtPlot pointer |
| [in] | scaleWidget | QwtScaleWidget to find |
| bool QwtPlotScaleEventDispatcher::isEnable | ( | ) | const |
Check if enabled.
|
slot |
Set enabled state.
| [in] | on | Enable/disable |
|
slot |
Update cache.
Update cache, rebuild if necessary.
Called when cache is dirty or needs refresh.