Loading...
Searching...
No Matches
massspectraceplotcontext.cpp
Go to the documentation of this file.
// Copyright 2021 Filippo Rusconi
// GPLv3+
/////////////////////// StdLib includes
/////////////////////// Qt includes
#include <QString>
/////////////////////// Local includes
#include "massspectraceplotcontext.h"
namespace pappso
{
MassSpecTracePlotContext::MassSpecTracePlotContext()
{
}
MassSpecTracePlotContext::MassSpecTracePlotContext(
const MassSpecTracePlotContext &other)
: BasePlotContext(other),
m_lastZ(other.m_lastZ),
m_lastMz(other.m_lastMz),
m_lastTicIntensity(other.m_lastTicIntensity),
m_lastMr(other.m_lastMr),
m_lastResolvingPower(other.m_lastResolvingPower)
{
// qDebug() << "Constructing MassSpecTracePlotContext by copy:" << toString();
}
MassSpecTracePlotContext::~MassSpecTracePlotContext()
{
}
MassSpecTracePlotContext &
MassSpecTracePlotContext::operator=(const BasePlotContext &other)
{
if(this == &other)
return *this;
// First the BasePlotContext members
BasePlotContext::operator=(other);
return *this;
}
MassSpecTracePlotContext &
MassSpecTracePlotContext::operator=(const MassSpecTracePlotContext &other)
{
if(this == &other)
return *this;
// First the BasePlotContext members
BasePlotContext::operator=(other);
// Second the mass spec trace plot-specific members
m_lastZ = other.m_lastZ;
m_lastMz = other.m_lastMz;
m_lastTicIntensity = other.m_lastTicIntensity;
m_lastMr = other.m_lastMr;
m_lastResolvingPower = other.m_lastResolvingPower;
return *this;
}
QString
MassSpecTracePlotContext::toString() const
{
QString text("Base context:\n");
text += BasePlotContext::toString();
text += "\n";
text += "Mass spectrum trace plot context\n";
text += QString("last z: %1").arg(m_lastZ);
text += QString("last m/z: %1").arg(m_lastMz, 0, 'f', 6);
text += QString("last TIC intensity: %1").arg(m_lastTicIntensity, 0, 'g', 0);
text += QString("last Mr: %1").arg(m_lastMr, 0, 'f', 6);
text +=
QString("last resolving power: %1").arg(m_lastResolvingPower, 0, 'g', 0);
text += "\n";
return text;
}
} // namespace pappso
pappso::BasePlotContext
Definition baseplotcontext.h:37
pappso::BasePlotContext::operator=
BasePlotContext & operator=(const BasePlotContext &other)
Definition baseplotcontext.cpp:622
pappso::BasePlotContext::toString
QString toString() const
Definition baseplotcontext.cpp:714
pappso::MassSpecTracePlotContext
Definition massspectraceplotcontext.h:22
pappso::MassSpecTracePlotContext::MassSpecTracePlotContext
MassSpecTracePlotContext()
Definition massspectraceplotcontext.cpp:18
pappso::MassSpecTracePlotContext::m_lastMz
double m_lastMz
Definition massspectraceplotcontext.h:33
pappso::MassSpecTracePlotContext::m_lastResolvingPower
double m_lastResolvingPower
Definition massspectraceplotcontext.h:36
pappso::MassSpecTracePlotContext::toString
QString toString() const
Definition massspectraceplotcontext.cpp:75
pappso::MassSpecTracePlotContext::m_lastZ
int m_lastZ
Definition massspectraceplotcontext.h:32
pappso::MassSpecTracePlotContext::~MassSpecTracePlotContext
virtual ~MassSpecTracePlotContext()
Definition massspectraceplotcontext.cpp:36
pappso::MassSpecTracePlotContext::operator=
MassSpecTracePlotContext & operator=(const BasePlotContext &other)
Definition massspectraceplotcontext.cpp:41
pappso::MassSpecTracePlotContext::m_lastMr
double m_lastMr
Definition massspectraceplotcontext.h:35
pappso::MassSpecTracePlotContext::m_lastTicIntensity
double m_lastTicIntensity
Definition massspectraceplotcontext.h:34
massspectraceplotcontext.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39