4#include "../dependencies/qcustomplot/qcustomplot.h"
5#include "../NeTrainSim/util/vector.h"
29 explicit CustomPlot(QWidget *parent =
nullptr);
75 virtual void wheelEvent(QWheelEvent *event)
override;
80 double m_xPress, m_yPress;
81 double m_curXRange, m_curYRange;
82 bool m_isScrollButtonClicked;
84 qint64 zoomResetTimeStamp;
85 int zoomResetClickCounter;
87 double panningSensitivity = 1.0;
106 std::pair<Vector<double>,
Vector<double>> getAllPointsPositions(QCPGraph &graph);
115 double calculateSensitivity();
125 QPointF getClosestPoint(QMouseEvent *event);
The CustomPlot class is a subclass of QCustomPlot, providing additional functionality and customizati...
Definition customplot.h:18
void resetZoom()
Slot function for handling zoom reset.
Definition customplot.cpp:131
void zoomReset()
Signal emitted when the zoom is reset.
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
Reimplemented mouseDoubleClickEvent from QCustomPlot.
Definition customplot.cpp:42
virtual void mouseMoveEvent(QMouseEvent *event) override
Reimplemented mouseMoveEvent from QCustomPlot.
Definition customplot.cpp:53
void pointRightSelected(QPointF point)
Signal emitted when a data point on the right side is selected.
virtual void wheelEvent(QWheelEvent *event) override
Reimplemented wheelEvent from QCustomPlot.
Definition customplot.cpp:88
void pointLeftSelected(QPointF point)
Signal emitted when a data point on the left side is selected.
virtual void mouseReleaseEvent(QMouseEvent *event) override
Reimplemented mouseReleaseEvent from QCustomPlot.
Definition customplot.cpp:77
virtual void mousePressEvent(QMouseEvent *event) override
Reimplemented mousePressEvent from QCustomPlot.
Definition customplot.cpp:12
A vector.
Definition vector.h:24