libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
massspectraceplotcontext.cpp
Go to the documentation of this file.
1// Copyright 2021 Filippo Rusconi
2// GPLv3+
3
4/////////////////////// StdLib includes
5
6
7/////////////////////// Qt includes
8#include <QString>
9
10
11/////////////////////// Local includes
13
14namespace pappso
15{
16
17
21
22
24 const MassSpecTracePlotContext &other)
25 : BasePlotContext(other),
26 m_lastZ(other.m_lastZ),
27 m_lastMz(other.m_lastMz),
28 m_lastTicIntensity(other.m_lastTicIntensity),
29 m_lastMr(other.m_lastMr),
30 m_lastResolvingPower(other.m_lastResolvingPower)
31{
32 // qDebug() << "Constructing MassSpecTracePlotContext by copy:" << toString();
33}
34
35
39
42{
43 if(this == &other)
44 return *this;
45
46 // First the BasePlotContext members
48
49 return *this;
50}
51
52
55{
56 if(this == &other)
57 return *this;
58
59 // First the BasePlotContext members
61
62 // Second the mass spec trace plot-specific members
63
64 m_lastZ = other.m_lastZ;
65 m_lastMz = other.m_lastMz;
67 m_lastMr = other.m_lastMr;
69
70 return *this;
71}
72
73
74QString
76{
77 QString text("Base context:\n");
78
80
81 text += "\n";
82
83 text += "Mass spectrum trace plot context\n";
84
85 text += QString("last z: %1").arg(m_lastZ);
86 text += QString("last m/z: %1").arg(m_lastMz, 0, 'f', 6);
87 text += QString("last TIC intensity: %1").arg(m_lastTicIntensity, 0, 'g', 0);
88 text += QString("last Mr: %1").arg(m_lastMr, 0, 'f', 6);
89 text +=
90 QString("last resolving power: %1").arg(m_lastResolvingPower, 0, 'g', 0);
91
92 text += "\n";
93
94 return text;
95}
96
97
98} // namespace pappso
BasePlotContext & operator=(const BasePlotContext &other)
MassSpecTracePlotContext & operator=(const BasePlotContext &other)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39