From fdbe72e157da54d7b337e6c2f1ac464dc5f5b44f Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Fri, 15 Sep 2023 23:48:50 +0200 Subject: [PATCH] Meson: remove support code for qwt <6, we don't support it any more --- bora/src/SlicingPlotWidget.cpp | 38 ------------------------------- bora/src/bora/SlicingPlotWidget.h | 4 ---- 2 files changed, 42 deletions(-) diff --git a/bora/src/SlicingPlotWidget.cpp b/bora/src/SlicingPlotWidget.cpp index 77272237..7a4aea22 100644 --- a/bora/src/SlicingPlotWidget.cpp +++ b/bora/src/SlicingPlotWidget.cpp @@ -81,20 +81,11 @@ namespace Bora { : QWidget (parent) , _viewer (NULL) , _plot (new QwtPlot ()) -#if QWT_VERSION < 0x060000 - , _picker (new QwtPlotPicker( QwtPlot::xBottom // X Axis id. - , QwtPlot::yLeft // Y Axis id. - , QwtPicker::PointSelection - , QwtPicker::CrossRubberBand - , QwtPicker::ActiveOnly - , _plot->canvas()) ) -#else , _picker (new QwtPlotPicker( QwtPlot::xBottom // X Axis id. , QwtPlot::yLeft // Y Axis id. , QwtPicker::CrossRubberBand , QwtPicker::ActiveOnly , _plot->canvas()) ) -#endif , _gridDisplay (new QGridLayout()) , _gridLabel () // Label line 2: text , _widths (NULL) // Coordinates X for STreeCurve @@ -106,9 +97,6 @@ namespace Bora { , _paretoCurve (new QwtPlotCurve("Pareto")) // Black curve: pareto curve , _selectedPoint (new QwtPlotCurve("Selected")) // Red dot : selected placement { -#if QWT_VERSION >= 0x060000 - _picker->setStateMachine(new QwtPickerClickPointMachine()); -#endif setStyleSheet ( "border: 0px" ); int ptSize = Graphics::isHighDpi() ? 2 : 2; @@ -145,11 +133,7 @@ namespace Bora { symbol->setStyle( QwtSymbol::Triangle ); symbol->setSize ( 6 ); symbol->setPen ( dotPen ); -#if QWT_VERSION < 0x060000 - _STreeCurve->setSymbol( *symbol ); -#else _STreeCurve->setSymbol( symbol ); -#endif QPen selectPen ( Qt::red ); selectPen.setWidth( ptSize+2 ); @@ -157,11 +141,7 @@ namespace Bora { _selectedPoint->setPen ( selectPen ); _selectedPoint->attach ( _plot ); -#if QWT_VERSION < 0x060000 - connect( _picker, SIGNAL(selected(const QwtDoublePoint&)), this, SLOT(onPointSelect(const QwtDoublePoint&)) ); -#else connect( _picker, SIGNAL(selected(const QPointF&)), this, SLOT(onPointSelect(const QPointF&)) ); -#endif QVBoxLayout* vLayout = new QVBoxLayout(); vLayout->addWidget ( _plot ); @@ -289,13 +269,8 @@ namespace Bora { i++; } -#if QWT_VERSION < 0x060000 - _STreeCurve->setData ( _widths , _heights , nodeSets->size() ); - _paretoCurve->setData( _pareto.xs(), _pareto.ys(), _pareto.size() ); -#else _STreeCurve->setSamples ( _widths , _heights , nodeSets->size() ); _paretoCurve->setSamples( _pareto.xs(), _pareto.ys(), _pareto.size() ); -#endif _STreeCurve->show(); _paretoCurve->show(); _plot->replot(); @@ -336,11 +311,7 @@ namespace Bora { } -#if QWT_VERSION < 0x060000 - void SlicingPlotWidget::onPointSelect ( const QwtDoublePoint& point ) -#else void SlicingPlotWidget::onPointSelect ( const QPointF& point ) -#endif { // Clicking on SlicingTree's Pareto Graph: // 1) Update slicing tree @@ -357,13 +328,8 @@ namespace Bora { cdebug.log(539) << " Selection: [" << point.x() << " " << point.y() << "]" << endl; if ( (iclosest >= 0) and (iclosest < dataSize) ) { -#if QWT_VERSION < 0x060000 - double x = _STreeCurve->x( iclosest ); - double y = _STreeCurve->y( iclosest ); -#else double x = _STreeCurve->sample( iclosest ).x(); double y = _STreeCurve->sample( iclosest ).y(); -#endif ostringstream message; message << "(" << DbU::getValueString(x) << "," << DbU::getValueString(y) << ")"; @@ -406,11 +372,7 @@ namespace Bora { _widthSelected [0] = x; _heightSelected[0] = y; -#if QWT_VERSION < 0x060000 - _selectedPoint->setData ( _widthSelected, _heightSelected, 1 ); -#else _selectedPoint->setSamples ( _widthSelected, _heightSelected, 1 ); -#endif _selectedPoint->show(); _plot->replot(); diff --git a/bora/src/bora/SlicingPlotWidget.h b/bora/src/bora/SlicingPlotWidget.h index 6a390789..eababddf 100644 --- a/bora/src/bora/SlicingPlotWidget.h +++ b/bora/src/bora/SlicingPlotWidget.h @@ -53,11 +53,7 @@ namespace Bora { void setViewer ( CellViewer* viewer); void setDatas (); public slots: -#if QWT_VERSION < 0x060000 - void onPointSelect ( const QwtDoublePoint& point); -#else void onPointSelect ( const QPointF& point); -#endif void updateSelectedPoint ( double x, double y ); signals: void updatePlacement ( BoxSet* );