Meson: remove support code for qwt <6, we don't support it any more

This commit is contained in:
Rob Taylor 2023-09-15 23:48:50 +02:00 committed by Rob Taylor
parent 0dbc9cba9e
commit fdbe72e157
2 changed files with 0 additions and 42 deletions

View File

@ -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();

View File

@ -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* );