Commit 4a96afaa authored by Langella Olivier's avatar Langella Olivier
Browse files

use MsRunStatisticsHandler as base class

parent d28717ed
...@@ -28,14 +28,8 @@ ...@@ -28,14 +28,8 @@
#include "msidlistworkerthread.h" #include "msidlistworkerthread.h"
#include <gui/lists/ms_identification_run_list_view/msidentificationtablemodel.h> #include <gui/lists/ms_identification_run_list_view/msidentificationtablemodel.h>
MsRunStatisticsHandler::MsRunStatisticsHandler():pappso::SpectrumCollectionHandlerInterface()
{
qDebug() << "OOOOOO test";
}
bool bool
MsRunStatisticsHandler::shouldStop() MsIdentificationTableMsRunStatisticsHandler::shouldStop()
{ {
qDebug() << "RRRRRR test"; qDebug() << "RRRRRR test";
QMutexLocker locker(&m_mutex); QMutexLocker locker(&m_mutex);
...@@ -43,7 +37,7 @@ MsRunStatisticsHandler::shouldStop() ...@@ -43,7 +37,7 @@ MsRunStatisticsHandler::shouldStop()
} }
void void
MsRunStatisticsHandler::requireStop(bool stop) MsIdentificationTableMsRunStatisticsHandler::requireStop(bool stop)
{ {
QMutexLocker locker(&m_mutex); QMutexLocker locker(&m_mutex);
m_stopRequired = stop; m_stopRequired = stop;
...@@ -99,7 +93,7 @@ MsIdListWorkerStatus::getStatus( ...@@ -99,7 +93,7 @@ MsIdListWorkerStatus::getStatus(
delete mpa_currentHandler; delete mpa_currentHandler;
} }
qDebug(); qDebug();
mpa_currentHandler = new MsRunStatisticsHandler(); mpa_currentHandler = new MsIdentificationTableMsRunStatisticsHandler();
qDebug() << "DDDDDDDDDDDDDD" << mpa_currentHandler->shouldStop(); qDebug() << "DDDDDDDDDDDDDD" << mpa_currentHandler->shouldStop();
emit computeMsNumber(identificationDataSource); emit computeMsNumber(identificationDataSource);
......
...@@ -25,30 +25,24 @@ ...@@ -25,30 +25,24 @@
#pragma once #pragma once
#include <QObject> #include <QObject>
#include <pappsomspp/msrun/msrunreader.h>
#include "../../../../utils/msrunstatisticshandler.h"
#include "core/msrun.h" #include "core/msrun.h"
#include "core/identification_sources/identificationdatasource.h" #include "core/identification_sources/identificationdatasource.h"
class MsRunStatisticsHandler : public pappso::SpectrumCollectionHandlerInterface class MsIdentificationTableMsRunStatisticsHandler :public MsRunStatisticsHandler
{ {
public: public:
MsRunStatisticsHandler() ;
virtual ~MsRunStatisticsHandler() {};
virtual void setQualifiedMassSpectrum(
const pappso::QualifiedMassSpectrum &qspectrum) override;
virtual bool needPeakList() const override;
unsigned long getMsLevelCount(unsigned int ms_level) const; unsigned long getMsLevelCount(unsigned int ms_level) const;
pappso::pappso_double getMsLevelTic(unsigned int ms_level) const; pappso::pappso_double getMsLevelTic(unsigned int ms_level) const;
unsigned long getTotalCount() const; unsigned long getTotalCount() const;
virtual bool bool shouldStop() override;
shouldStop() override ;
void void requireStop(bool stop);
requireStop(bool stop);
private: private:
std::vector<unsigned long> _count_ms_level_spectrum; std::vector<unsigned long> _count_ms_level_spectrum;
......
Markdown is supported
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