diff --git a/plotview.cpp b/plotview.cpp index 636cf5b..ca14828 100644 --- a/plotview.cpp +++ b/plotview.cpp @@ -114,18 +114,6 @@ void PlotView::invalidateEvent() horizontalScrollBar()->setMaximum(mainSampleSource->count()); } -void PlotView::selectionChanged(std::pair selectionTime, std::pair selectionFreq) -{ - this->selectionTime = selectionTime; - this->selectionFreq = selectionFreq; - selection = true; -} - -void PlotView::selectionCleared() -{ - selection = false; -} - void PlotView::setFFTSize(int size) { fftSize = size; diff --git a/plotview.h b/plotview.h index 7a7da49..1117ad2 100644 --- a/plotview.h +++ b/plotview.h @@ -43,8 +43,6 @@ public slots: void cursorsMoved(); void enableCursors(bool enable); void invalidateEvent(); - void selectionChanged(std::pair selectionTime, std::pair selectionFreq); - void selectionCleared(); void setFFTSize(int size); void setZoomLevel(int zoom); void setPowerMin(int power); @@ -63,7 +61,7 @@ private: std::vector> plots; std::pair viewRange; bool selection = false; - std::pair selectionTime; + range_t selectionTime; std::pair selectionFreq; int fftSize; diff --git a/util.h b/util.h index 94ee8fa..5b7a3a8 100644 --- a/util.h +++ b/util.h @@ -28,8 +28,8 @@ template const T& clamp (const T& value, const T& min, const T& max) template struct range_t { - const T minimum; - const T maximum; + T minimum; + T maximum; const T length() { return maximum - minimum;