Commit 24428dec authored by Olivier Langella's avatar Olivier Langella
Browse files

WIP : qwt6 transition

parent 803b3984
......@@ -86,10 +86,12 @@ void AlignmentWidget::errortLoadindMsrunAligned(QString error){
}
void AlignmentWidget::deleteMsrun(Msrun * msrun){
qDebug()<<"AlignmentWidget::deleteMsrun begin";
if(msrun!=0){
delete(msrun);
//delete(msrun);
msrun=0;
}
qDebug()<<"AlignmentWidget::deleteMsrun end";
}
void AlignmentWidget::completDataToMsrun(Msrun * msrun){
......@@ -132,6 +134,8 @@ void AlignmentWidget::deleteLoadingThread(){
}
void AlignmentWidget::triggerLoadingMsRunToAlign(Msrun * msrun) {
qDebug()<<"AlignmentWidget::triggerLoadingMsRunToAlign begin";
if (msrun != 0) {
//_text_edit_ref->setText(msrun->getXmlFileInfo().fileName());
this->_loadingMsruntoALignedLabel->startLoading("Loading");
......@@ -143,6 +147,7 @@ void AlignmentWidget::triggerLoadingMsRunToAlign(Msrun * msrun) {
"There is no MsRun to align.\n Please choose one!"));
return;
}
qDebug()<<"AlignmentWidget::triggerLoadingMsRunToAlign end";
}
void AlignmentWidget::triggerLoadingMsRunRef(Msrun * msrun) {
......
......@@ -183,6 +183,7 @@ void Ms2AlignmentWidget::startLoadindMsrunRef(int index) {
}
void Ms2AlignmentWidget::startLoadindMsrunAligned(int index) {
qDebug() << "Ms2AlignmentWidget::startLoadindMsrunAligned begin ";
if (this->isAlignmentRunning())
return;
qDebug() << "Load MsRun Align index : " << index;
......@@ -190,6 +191,8 @@ void Ms2AlignmentWidget::startLoadindMsrunAligned(int index) {
Msrun * msrun = _masschroqGuidata->getMsrunHashGroup()->getMsRun(id);
this->triggerLoadingMsRunToAlign(msrun);
qDebug() << "Ms2AlignmentWidget::startLoadindMsrunAligned end " ;
}
void Ms2AlignmentWidget::startLoadingMasschroqml() {
......
......@@ -22,7 +22,10 @@ PlotAligned::PlotAligned(QWidget *parent) :
setAxisTitle(QwtPlot::xBottom, "Retention time (s)");
setAxisTitle(QwtPlot::yLeft, "Delta RT (s)");
// enable zooming
_zoomer = 0;
_zoomer = nullptr;
_p_symbol_star = new QwtSymbol(QwtSymbol::Star1, QColor(Qt::black), QColor(Qt::black),
QSize(9, 9));
_p_curve_deltart = new QwtPlotCurve("Aligned RT");
_p_curve_ms2 = new QwtPlotCurve("Common identification");
......@@ -30,9 +33,9 @@ PlotAligned::PlotAligned(QWidget *parent) :
PlotAligned::~PlotAligned() {
this->clear();
if (_zoomer != 0) {
if (_zoomer != nullptr) {
delete _zoomer;
_zoomer = 0;
_zoomer = nullptr;
}
}
......@@ -81,9 +84,7 @@ void PlotAligned::viewAlignedMS2Peaks(const MonitorAlignmentPlot * monitorAlignm
//QwtPlotCurve * curve = new QwtPlotCurve("Common identification");
_p_curve_ms2->setStyle(QwtPlotCurve::Dots);
_p_curve_ms2->setRenderHint(QwtPlotItem::RenderAntialiased);
QwtSymbol symbol(QwtSymbol::Star1, QColor(Qt::black), QColor(Qt::black),
QSize(9, 9));
_p_curve_ms2->setSymbol(&symbol);
_p_curve_ms2->setSymbol(_p_symbol_star);
//_alignedPlots.push_back(curve);
const std::map<mcq_double,mcq_double>& mapDeltaPeaks = monitorAlignment->getMs2CommonPeak();
......@@ -151,7 +152,7 @@ void PlotAligned::initZoomer() {
// RightButton: zoom out by 1
// Ctrl+RighButton: zoom out to full size
if (_zoomer != 0)
if (_zoomer != nullptr)
delete _zoomer;
_zoomer = new QwtPlotZoomer(canvas());
......
......@@ -65,6 +65,7 @@ public slots :
private:
//std::vector<QwtPlotCurve *> _alignedPlots;
QwtSymbol * _p_symbol_star=nullptr;
QwtPlotZoomer * _zoomer;
QwtPlotCurve * _p_curve_deltart;
......
......@@ -39,6 +39,7 @@ Plot::~Plot() {
}
void Plot::viewNewPlot(const TreatmentBoxXicExtract * p_treatment) {
qDebug() << "Plot::viewNewPlot begin";
this->clear();
qDebug() << "Created new xic plot";
McqXicNoConstSp p_xic = p_treatment->getCurrentXic();
......@@ -67,6 +68,8 @@ void Plot::viewNewPlot(const TreatmentBoxXicExtract * p_treatment) {
title.append(QString().setNum(p_treatment->getQuantiItem()->getMz(),'f',4));
this->setTitle(title);
}
qDebug() << "Plot::viewNewPlot end";
}
void Plot::updatedCurrentPlot(const TreatmentBoxXicFilter * p_treatment) {
qDebug() << "Add/update xic plot";
......
......@@ -21,6 +21,7 @@ MsrunSimpleLoaderThread::~MsrunSimpleLoaderThread() {
}
void MsrunSimpleLoaderThread::loadMsrun(Msrun * msrun) {
qDebug() << "MsrunSimpleLoaderThread::loadMsrun begin";
setProgressValue(1);
_mutex.lock();
_current_msrun = msrun;
......@@ -35,9 +36,11 @@ void MsrunSimpleLoaderThread::loadMsrun(Msrun * msrun) {
_restart=true;
_condition.wakeOne();
}
qDebug() << "MsrunSimpleLoaderThread::loadMsrun end";
}
void MsrunSimpleLoaderThread::run() {
qDebug() << "MsrunSimpleLoaderThread::run begin";
Msrun * msrun = 0;
QString filename;
RawDataFormat format = RawDataFormat::mzxml;
......@@ -90,6 +93,7 @@ void MsrunSimpleLoaderThread::run() {
if (!this->getRestart() & !this->getAbord())
emit loadedMsrun(msrun);
qDebug() << "MsrunSimpleLoaderThread::run end";
// _mutex.lock();
// if (!_restart)
// _condition.wait(&_mutex);
......
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