Loading...
Searching...
No Matches
massspectrumcombiner.h
Go to the documentation of this file.
#pragma once
/////////////////////// stdlib includes
#include <vector>
#include <memory>
/////////////////////// Qt includes
#include <QDataStream>
/////////////////////// Local includes
#include "pappsomspp/export-import-config.h"
#include "../../types.h"
#include "../../trace/datapoint.h"
#include "massdatacombinerinterface.h"
#include "pappsomspp/core/js_qml/jsclassregistrar.h"
namespace pappso
{
class MassSpectrumCombiner;
typedef std::shared_ptr<const MassSpectrumCombiner> MassSpectrumCombinerCstSPtr;
typedef std::shared_ptr<MassSpectrumCombiner> MassSpectrumCombinerSPtr;
class PMSPP_LIB_DECL MassSpectrumCombiner: public QObject,
public MassDataCombinerInterface
{
Q_OBJECT
Q_PROPERTY(int size READ binCount NOTIFY binCountChanged)
public:
MassSpectrumCombiner(QObject *parent_p = nullptr);
MassSpectrumCombiner(int decimal_places, QObject *parent_p = nullptr);
MassSpectrumCombiner(std::vector<pappso_double> bins,
int decimalPlaces = -1,
QObject *parent_p = nullptr);
MassSpectrumCombiner(MassSpectrumCombinerCstSPtr other,
QObject *parent_p = nullptr);
MassSpectrumCombiner(const MassSpectrumCombiner &other,
QObject *parent_p = nullptr);
MassSpectrumCombiner(const MassSpectrumCombiner &&other,
QObject *parent_p = nullptr);
virtual ~MassSpectrumCombiner();
Q_INVOKABLE void setBins(std::vector<pappso_double> bins);
Q_INVOKABLE const std::vector<pappso_double> &getBins() const;
Q_INVOKABLE std::size_t binCount() const;
Q_INVOKABLE QString binsAsString() const;
// # pragma message "This pragma is inside"
static void registerJsConstructor(QJSEngine *engine);
signals:
void binCountChanged();
protected:
std::vector<pappso_double> m_bins;
std::vector<pappso_double>::iterator findBin(pappso_double mz);
};
PAPPSO_REGISTER_JS_CLASS(pappso, MassSpectrumCombiner)
} // namespace pappso
pappso::MassDataCombinerInterface::MassDataCombinerInterface
MassDataCombinerInterface(int decimal_places=-1)
Definition massdatacombinerinterface.cpp:19
pappso::MassSpectrumCombiner
Definition massspectrumcombiner.h:27
pappso::MassSpectrumCombiner::MassSpectrumCombiner
MassSpectrumCombiner(QObject *parent_p=nullptr)
Construct an uninitialized instance.
Definition massspectrumcombiner.cpp:19
pappso::MassSpectrumCombiner::m_bins
std::vector< pappso_double > m_bins
Definition massspectrumcombiner.h:60
pappso::MassSpectrumCombiner::setBins
Q_INVOKABLE void setBins(std::vector< pappso_double > bins)
Definition massspectrumcombiner.cpp:71
pappso::MassSpectrumCombiner::binCountChanged
void binCountChanged()
pappso::MassSpectrumCombiner::binCount
Q_INVOKABLE std::size_t binCount() const
Definition massspectrumcombiner.cpp:98
pappso::MassSpectrumCombiner::getBins
Q_INVOKABLE const std::vector< pappso_double > & getBins() const
Definition massspectrumcombiner.cpp:92
pappso::MassSpectrumCombiner::registerJsConstructor
static void registerJsConstructor(QJSEngine *engine)
Definition massspectrumcombiner.cpp:126
pappso::MassSpectrumCombiner::binsAsString
Q_INVOKABLE QString binsAsString() const
Definition massspectrumcombiner.cpp:113
pappso::MassSpectrumCombiner::size
int size
Definition massspectrumcombiner.h:30
pappso::MassSpectrumCombiner::findBin
std::vector< pappso_double >::iterator findBin(pappso_double mz)
Find the bin that will contain mz.
Definition massspectrumcombiner.cpp:105
pappso::MassSpectrumCombiner::MassSpectrumCombiner
MassSpectrumCombiner(const MassSpectrumCombiner &&other, QObject *parent_p=nullptr)
datapoint.h
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
jsclassregistrar.h
PAPPSO_REGISTER_JS_CLASS
#define PAPPSO_REGISTER_JS_CLASS(NS_IDENT, CLASS_NAME)
Definition jsclassregistrar.h:35
massdatacombinerinterface.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::MassSpectrumCombinerSPtr
std::shared_ptr< MassSpectrumCombiner > MassSpectrumCombinerSPtr
Definition massspectrumcombiner.h:23
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:60
pappso::MassSpectrumCombinerCstSPtr
std::shared_ptr< const MassSpectrumCombiner > MassSpectrumCombinerCstSPtr
Definition massspectrumcombiner.h:22
types.h