diff --git a/GUI/View/Plotter/ColorMap.cpp b/GUI/View/Plotter/ColorMap.cpp index de052a4edf7518843fb8b4f99a4ec92a57335ff2..e6a19e8b5db65ac32f3ead00742c3551164c6780 100644 --- a/GUI/View/Plotter/ColorMap.cpp +++ b/GUI/View/Plotter/ColorMap.cpp @@ -222,20 +222,6 @@ void ColorMap::onYaxisRangeChanged(QCPRange range) gDoc->setModified(); } -//! Schedule replot for later execution by onTimeReplot() slot. - -void ColorMap::replot() -{ - m_update_timer->scheduleUpdate(); -} - -//! Replots ColorMap. - -void ColorMap::onTimeToReplot() -{ - m_qcp->replot(); -} - //! Connects/disconnects signals related to ColorMap's X,Y axes rectangle change. void ColorMap::setAxesRangeConnected(bool isConnected) diff --git a/GUI/View/Plotter/ColorMap.h b/GUI/View/Plotter/ColorMap.h index a3421487207337afa9782fcbb750521a9a2da913..de234d4b39f72ce38e36c4ed5d3b0039c3a040f3 100644 --- a/GUI/View/Plotter/ColorMap.h +++ b/GUI/View/Plotter/ColorMap.h @@ -57,8 +57,6 @@ private: void onDataRangeChanged(QCPRange range); void onXaxisRangeChanged(QCPRange range); void onYaxisRangeChanged(QCPRange range); - void replot(); - void onTimeToReplot(); void marginsChangedNotify(); void setAxesRangeConnected(bool isConnected); diff --git a/GUI/View/Plotter/ScientificPlot.cpp b/GUI/View/Plotter/ScientificPlot.cpp index c9e3eea89a5eba29347b45fb4cf1760e0ee33eed..60c43e2a32d901a6972ad610d358858817349e0f 100644 --- a/GUI/View/Plotter/ScientificPlot.cpp +++ b/GUI/View/Plotter/ScientificPlot.cpp @@ -77,3 +77,13 @@ qreal ScientificPlot::fromSceneY(qreal p) const { return m_qcp->yAxis->pixelToCoord(p); } + +void ScientificPlot::replot() +{ + m_update_timer->scheduleUpdate(); +} + +void ScientificPlot::onTimeToReplot() +{ + m_qcp->replot(); +} diff --git a/GUI/View/Plotter/ScientificPlot.h b/GUI/View/Plotter/ScientificPlot.h index d9a5ebe415566dba10d17281f4af0f8b5e0a1b61..ad9b077cd6c71e901b2e0d7a4c81aa770be79bbd 100644 --- a/GUI/View/Plotter/ScientificPlot.h +++ b/GUI/View/Plotter/ScientificPlot.h @@ -61,6 +61,9 @@ signals: void statusString(const QString& text); protected: + void replot(); + void onTimeToReplot(); + QCustomPlot* m_qcp; UpdateTimer* m_update_timer; diff --git a/GUI/View/Plotter/SpecularPlot.cpp b/GUI/View/Plotter/SpecularPlot.cpp index 59fc7a7b61ee69d16c9b1e708943f41fe7d9b0c6..aa8afbb36677cd996de3677723e55b66654ca520 100644 --- a/GUI/View/Plotter/SpecularPlot.cpp +++ b/GUI/View/Plotter/SpecularPlot.cpp @@ -119,11 +119,6 @@ void SpecularPlot::onYaxisRangeChanged(QCPRange range) const emit currentData1DItem()->updateOtherPlots(currentData1DItem()); } -void SpecularPlot::onTimeToReplot() -{ - m_qcp->replot(); -} - void SpecularPlot::connectItems() { // data @@ -281,11 +276,6 @@ void SpecularPlot::setDataFromItem(Data1DItem* item) } } -void SpecularPlot::replot() -{ - m_update_timer->scheduleUpdate(); -} - namespace { int bin(double x, const QCPGraph* graph) diff --git a/GUI/View/Plotter/SpecularPlot.h b/GUI/View/Plotter/SpecularPlot.h index ba47c8605ddbe3be5cc375e44d5dcfccbccc983d..355b627fba849746b3213da5f4828c91c1f3a44e 100644 --- a/GUI/View/Plotter/SpecularPlot.h +++ b/GUI/View/Plotter/SpecularPlot.h @@ -55,9 +55,6 @@ private: //! Propagate ymin, ymax back to Data2DItem void onYaxisRangeChanged(QCPRange range) const; - //! Replots SpecularPlot. - void onTimeToReplot(); - void connectItems(); //! creates and initializes the color map @@ -85,9 +82,6 @@ private: //! Sets the data values to SpecularPlot. void setDataFromItem(Data1DItem* item); - //! Schedule replot for later execution by onTimeReplot() slot. - void replot(); - QList<Data1DItem*> m_data_items; QMap<Data1DItem*, QCPGraph*> m_graph_map;