Skip to content
Snippets Groups Projects
Commit 3b174d36 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm private fct

parent 6bb8e47b
No related branches found
No related tags found
1 merge request!2113rm PlotEventInfo
...@@ -46,7 +46,9 @@ void PlotEventHelper::setMouseTrackingEnabled(bool enable) ...@@ -46,7 +46,9 @@ void PlotEventHelper::setMouseTrackingEnabled(bool enable)
void PlotEventHelper::onCustomMouseMove(QMouseEvent* event) void PlotEventHelper::onCustomMouseMove(QMouseEvent* event)
{ {
auto currentPos = currentPlotDescriptor(event); double x = m_plot->customPlot()->xAxis->pixelToCoord(event->pos().x());
double y = m_plot->customPlot()->yAxis->pixelToCoord(event->pos().y());
PlotEventInfo currentPos = m_plot->eventInfo(x, y);
if (currentPos.inAxesRange()) { if (currentPos.inAxesRange()) {
m_plot->statusString(currentPos.infoString()); m_plot->statusString(currentPos.infoString());
...@@ -62,12 +64,3 @@ void PlotEventHelper::onCustomMouseMove(QMouseEvent* event) ...@@ -62,12 +64,3 @@ void PlotEventHelper::onCustomMouseMove(QMouseEvent* event)
m_prevPos = currentPos; m_prevPos = currentPos;
} }
//! Constructs current position of the data.
PlotEventInfo PlotEventHelper::currentPlotDescriptor(QMouseEvent* event) const
{
double x = m_plot->customPlot()->xAxis->pixelToCoord(event->pos().x());
double y = m_plot->customPlot()->yAxis->pixelToCoord(event->pos().y());
return m_plot->eventInfo(x, y);
}
...@@ -43,8 +43,6 @@ public slots: ...@@ -43,8 +43,6 @@ public slots:
void onCustomMouseMove(QMouseEvent* event); void onCustomMouseMove(QMouseEvent* event);
private: private:
PlotEventInfo currentPlotDescriptor(QMouseEvent* event) const;
ScientificPlot* m_plot; ScientificPlot* m_plot;
PlotEventInfo m_prevPos; PlotEventInfo m_prevPos;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment