Meson: remove support code for qwt <6, we don't support it any more
This commit is contained in:
parent
0dbc9cba9e
commit
fdbe72e157
|
@ -81,20 +81,11 @@ namespace Bora {
|
||||||
: QWidget (parent)
|
: QWidget (parent)
|
||||||
, _viewer (NULL)
|
, _viewer (NULL)
|
||||||
, _plot (new QwtPlot ())
|
, _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.
|
, _picker (new QwtPlotPicker( QwtPlot::xBottom // X Axis id.
|
||||||
, QwtPlot::yLeft // Y Axis id.
|
, QwtPlot::yLeft // Y Axis id.
|
||||||
, QwtPicker::CrossRubberBand
|
, QwtPicker::CrossRubberBand
|
||||||
, QwtPicker::ActiveOnly
|
, QwtPicker::ActiveOnly
|
||||||
, _plot->canvas()) )
|
, _plot->canvas()) )
|
||||||
#endif
|
|
||||||
, _gridDisplay (new QGridLayout())
|
, _gridDisplay (new QGridLayout())
|
||||||
, _gridLabel () // Label line 2: text
|
, _gridLabel () // Label line 2: text
|
||||||
, _widths (NULL) // Coordinates X for STreeCurve
|
, _widths (NULL) // Coordinates X for STreeCurve
|
||||||
|
@ -106,9 +97,6 @@ namespace Bora {
|
||||||
, _paretoCurve (new QwtPlotCurve("Pareto")) // Black curve: pareto curve
|
, _paretoCurve (new QwtPlotCurve("Pareto")) // Black curve: pareto curve
|
||||||
, _selectedPoint (new QwtPlotCurve("Selected")) // Red dot : selected placement
|
, _selectedPoint (new QwtPlotCurve("Selected")) // Red dot : selected placement
|
||||||
{
|
{
|
||||||
#if QWT_VERSION >= 0x060000
|
|
||||||
_picker->setStateMachine(new QwtPickerClickPointMachine());
|
|
||||||
#endif
|
|
||||||
setStyleSheet ( "border: 0px" );
|
setStyleSheet ( "border: 0px" );
|
||||||
|
|
||||||
int ptSize = Graphics::isHighDpi() ? 2 : 2;
|
int ptSize = Graphics::isHighDpi() ? 2 : 2;
|
||||||
|
@ -145,11 +133,7 @@ namespace Bora {
|
||||||
symbol->setStyle( QwtSymbol::Triangle );
|
symbol->setStyle( QwtSymbol::Triangle );
|
||||||
symbol->setSize ( 6 );
|
symbol->setSize ( 6 );
|
||||||
symbol->setPen ( dotPen );
|
symbol->setPen ( dotPen );
|
||||||
#if QWT_VERSION < 0x060000
|
|
||||||
_STreeCurve->setSymbol( *symbol );
|
|
||||||
#else
|
|
||||||
_STreeCurve->setSymbol( symbol );
|
_STreeCurve->setSymbol( symbol );
|
||||||
#endif
|
|
||||||
|
|
||||||
QPen selectPen ( Qt::red );
|
QPen selectPen ( Qt::red );
|
||||||
selectPen.setWidth( ptSize+2 );
|
selectPen.setWidth( ptSize+2 );
|
||||||
|
@ -157,11 +141,7 @@ namespace Bora {
|
||||||
_selectedPoint->setPen ( selectPen );
|
_selectedPoint->setPen ( selectPen );
|
||||||
_selectedPoint->attach ( _plot );
|
_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&)) );
|
connect( _picker, SIGNAL(selected(const QPointF&)), this, SLOT(onPointSelect(const QPointF&)) );
|
||||||
#endif
|
|
||||||
|
|
||||||
QVBoxLayout* vLayout = new QVBoxLayout();
|
QVBoxLayout* vLayout = new QVBoxLayout();
|
||||||
vLayout->addWidget ( _plot );
|
vLayout->addWidget ( _plot );
|
||||||
|
@ -289,13 +269,8 @@ namespace Bora {
|
||||||
i++;
|
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() );
|
_STreeCurve->setSamples ( _widths , _heights , nodeSets->size() );
|
||||||
_paretoCurve->setSamples( _pareto.xs(), _pareto.ys(), _pareto.size() );
|
_paretoCurve->setSamples( _pareto.xs(), _pareto.ys(), _pareto.size() );
|
||||||
#endif
|
|
||||||
_STreeCurve->show();
|
_STreeCurve->show();
|
||||||
_paretoCurve->show();
|
_paretoCurve->show();
|
||||||
_plot->replot();
|
_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 )
|
void SlicingPlotWidget::onPointSelect ( const QPointF& point )
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// Clicking on SlicingTree's Pareto Graph:
|
// Clicking on SlicingTree's Pareto Graph:
|
||||||
// 1) Update slicing tree
|
// 1) Update slicing tree
|
||||||
|
@ -357,13 +328,8 @@ namespace Bora {
|
||||||
cdebug.log(539) << " Selection: [" << point.x() << " " << point.y() << "]" << endl;
|
cdebug.log(539) << " Selection: [" << point.x() << " " << point.y() << "]" << endl;
|
||||||
|
|
||||||
if ( (iclosest >= 0) and (iclosest < dataSize) ) {
|
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 x = _STreeCurve->sample( iclosest ).x();
|
||||||
double y = _STreeCurve->sample( iclosest ).y();
|
double y = _STreeCurve->sample( iclosest ).y();
|
||||||
#endif
|
|
||||||
|
|
||||||
ostringstream message;
|
ostringstream message;
|
||||||
message << "(" << DbU::getValueString(x) << "," << DbU::getValueString(y) << ")";
|
message << "(" << DbU::getValueString(x) << "," << DbU::getValueString(y) << ")";
|
||||||
|
@ -406,11 +372,7 @@ namespace Bora {
|
||||||
_widthSelected [0] = x;
|
_widthSelected [0] = x;
|
||||||
_heightSelected[0] = y;
|
_heightSelected[0] = y;
|
||||||
|
|
||||||
#if QWT_VERSION < 0x060000
|
|
||||||
_selectedPoint->setData ( _widthSelected, _heightSelected, 1 );
|
|
||||||
#else
|
|
||||||
_selectedPoint->setSamples ( _widthSelected, _heightSelected, 1 );
|
_selectedPoint->setSamples ( _widthSelected, _heightSelected, 1 );
|
||||||
#endif
|
|
||||||
_selectedPoint->show();
|
_selectedPoint->show();
|
||||||
_plot->replot();
|
_plot->replot();
|
||||||
|
|
||||||
|
|
|
@ -53,11 +53,7 @@ namespace Bora {
|
||||||
void setViewer ( CellViewer* viewer);
|
void setViewer ( CellViewer* viewer);
|
||||||
void setDatas ();
|
void setDatas ();
|
||||||
public slots:
|
public slots:
|
||||||
#if QWT_VERSION < 0x060000
|
|
||||||
void onPointSelect ( const QwtDoublePoint& point);
|
|
||||||
#else
|
|
||||||
void onPointSelect ( const QPointF& point);
|
void onPointSelect ( const QPointF& point);
|
||||||
#endif
|
|
||||||
void updateSelectedPoint ( double x, double y );
|
void updateSelectedPoint ( double x, double y );
|
||||||
signals:
|
signals:
|
||||||
void updatePlacement ( BoxSet* );
|
void updatePlacement ( BoxSet* );
|
||||||
|
|
Loading…
Reference in New Issue