Commit 14d87fb2 authored by Olivier Langella's avatar Olivier Langella
Browse files

qwt6 upgrade

parent 623fb270
......@@ -7,7 +7,6 @@
#include "plot_aligned.h"
#include <qwt_legend.h>
#include <qwt_symbol.h>
#include <qwt_data.h>
PlotAligned::PlotAligned(QWidget *parent) :
QwtPlot(parent) {
......@@ -59,7 +58,7 @@ void PlotAligned::viewAlignedMsRun(const Msrun * msrun) {
x1[i] = (*itOriginal);
i++;
}
_p_curve_deltart->setData(x1, y1, plotsize);
_p_curve_deltart->setSamples(x1, y1, plotsize);
_p_curve_deltart->attach(this);
......@@ -79,9 +78,9 @@ void PlotAligned::viewAlignedMS2Peaks(const MonitorAlignmentPlot * monitorAlignm
//QwtPlotCurve * curve = new QwtPlotCurve("Common identification");
_p_curve_ms2->setStyle(QwtPlotCurve::Dots);
_p_curve_ms2->setRenderHint(QwtPlotItem::RenderAntialiased);
const QwtSymbol symbol(QwtSymbol::Star1, QColor(Qt::black), QColor(Qt::black),
QwtSymbol symbol(QwtSymbol::Star1, QColor(Qt::black), QColor(Qt::black),
QSize(9, 9));
_p_curve_ms2->setSymbol(symbol);
_p_curve_ms2->setSymbol(&symbol);
//_alignedPlots.push_back(curve);
const std::map<mcq_double,mcq_double>& mapDeltaPeaks = monitorAlignment->getMs2CommonPeak();
......@@ -94,7 +93,7 @@ void PlotAligned::viewAlignedMS2Peaks(const MonitorAlignmentPlot * monitorAlignm
std::map<mcq_double,mcq_double>::const_iterator it;
//int i = 0;
for (it = mapDeltaPeaks.begin(); it != mapDeltaPeaks.end(); ++it) {
QwtDoublePoint one_point;
QPointF one_point;
one_point.setX(it->first);
one_point.setY(it->second);
_msms_data.push_back(one_point);
......@@ -102,7 +101,7 @@ void PlotAligned::viewAlignedMS2Peaks(const MonitorAlignmentPlot * monitorAlignm
//x1[i] = it->first;
//i++;
}
_p_curve_ms2->setData(_msms_data);
_p_curve_ms2->setSamples(_msms_data);
_p_curve_ms2->attach(this);
this->replot();
......@@ -121,9 +120,8 @@ void PlotAligned::clear() {
_p_curve_ms2->setData(_msms_data);
replot();
}*/
_p_curve_ms2->setData(QwtArray<QwtDoublePoint>());
_p_curve_deltart->setData(QwtArray<QwtDoublePoint>());
_p_curve_ms2->setSamples(QVector<QPointF>());
_p_curve_deltart->setSamples(QVector<QPointF>());
_p_curve_ms2->detach();
_p_curve_deltart->detach();
......@@ -163,4 +161,4 @@ void PlotAligned::initZoomer() {
_zoomer->setRubberBandPen(c);
_zoomer->setTrackerPen(c);
}
\ No newline at end of file
}
......@@ -31,7 +31,7 @@
#ifndef _PLOT_ALIGNED_H_
#define _PLOT_ALIGNED_H_ 1
#include <qwt_compat.h>
//#include <qwt_compat.h>
#include <qwt_plot.h>
#include <qwt_plot_zoomer.h>
#include <qwt_plot_curve.h>
......@@ -70,7 +70,7 @@ private:
QwtPlotCurve * _p_curve_deltart;
QwtPlotCurve * _p_curve_ms2;
QwtArray<QwtDoublePoint> _msms_data;
QVector<QPointF> _msms_data;
};
......
......@@ -51,10 +51,10 @@ void Plot::viewNewPlot(const TreatmentBoxXicExtract * p_treatment) {
std::pair<const TreatmentBox*, QwtPlotCurve *>(p_treatment,
curve));
unsigned int plotsize(p_xic->size());
int plotsize(p_xic->size());
mcq_double x1[plotsize], y1[plotsize];
p_xic->fillDataArray(x1, y1, plotsize);
curve->setData(x1, y1, plotsize);
curve->setSamples(x1, y1, plotsize);
curve->attach(this);
this->replot();
......@@ -88,7 +88,7 @@ void Plot::updatedCurrentPlot(const TreatmentBoxXicFilter * p_treatment) {
unsigned int plotsize(p_xic->size());
mcq_double x1[plotsize], y1[plotsize];
p_xic->fillDataArray(x1, y1, plotsize);
curve->setData(x1, y1, plotsize);
curve->setSamples(x1, y1, plotsize);
curve->attach(this);
this->replot();
......@@ -105,9 +105,9 @@ void Plot::updatedPeaks(const TreatmentBoxXicDetect * p_treatment) {
curve = new QwtPlotCurve("Detected Peaks");
curve->setStyle(QwtPlotCurve::Dots);
curve->setRenderHint(QwtPlotItem::RenderAntialiased);
const QwtSymbol symbol(QwtSymbol::Star1, getNewColors(),
QwtSymbol symbol(QwtSymbol::Star1, getNewColors(),
getNewColors(), QSize(9, 9));
curve->setSymbol(symbol);
curve->setSymbol(&symbol);
_xicPlots.insert(
std::pair<const TreatmentBox*, QwtPlotCurve *>(p_treatment,
curve));
......@@ -122,7 +122,7 @@ void Plot::updatedPeaks(const TreatmentBoxXicDetect * p_treatment) {
x1[i] = it->getMaxXicElement().rt;
i++;
}
curve->setData(x1, y1, plotsize);
curve->setSamples(x1, y1, plotsize);
curve->attach(this);
this->replot();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment