diff --git a/GUI/View/Plotter/RangeUtil.cpp b/GUI/View/Plotter/RangeUtil.cpp index fe65fed449d9fd4a0e0d101a72a94f06892fcac5..3e82f4eafcba7445c5c2670ea72d3beb6ba5ae7e 100644 --- a/GUI/View/Plotter/RangeUtil.cpp +++ b/GUI/View/Plotter/RangeUtil.cpp @@ -16,7 +16,7 @@ #include "GUI/Model/Axis/AmplitudeAxisItem.h" #include "GUI/Model/Data/Data1DItem.h" #include "GUI/Model/Data/Data2DItem.h" -#include <qcustomplot.h> +#include <utility> namespace { @@ -38,7 +38,7 @@ double commonMax(const QList<AmplitudeAxisItem*>& axes) return max; } -QCPRange commonRange(const QList<AmplitudeAxisItem*>& axes) +std::pair<double, double> commonRange(const QList<AmplitudeAxisItem*>& axes) { return {commonMin(axes), commonMax(axes)}; } @@ -63,14 +63,14 @@ QList<AmplitudeAxisItem*> valueAxesFromData2DItems(const QList<Data2DItem*>& ite void GUI::View::RangeUtil::setCommonRangeY(QList<Data1DItem*> items) { - QCPRange range = commonRange(valueAxesFromData1DItems(items)); + std::pair<double, double> range = commonRange(valueAxesFromData1DItems(items)); for (auto* item : items) - item->setYrange(range.lower, range.upper); + item->setYrange(range.first, range.second); } void GUI::View::RangeUtil::setCommonRangeZ(QList<Data2DItem*> items) { - QCPRange range = commonRange(valueAxesFromData2DItems(items)); + std::pair<double, double> range = commonRange(valueAxesFromData2DItems(items)); for (auto* item : items) - item->setZrange(range.lower, range.upper); + item->setZrange(range.first, range.second); }