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
12
#include "
massspectraceplotcontext.h
"
13
14
namespace
pappso
15
{
16
17
18
MassSpecTracePlotContext::MassSpecTracePlotContext
()
19
{
20
}
21
22
23
MassSpecTracePlotContext::MassSpecTracePlotContext
(
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
36
MassSpecTracePlotContext::~MassSpecTracePlotContext
()
37
{
38
}
39
40
MassSpecTracePlotContext
&
41
MassSpecTracePlotContext::operator=
(
const
BasePlotContext
&other)
42
{
43
if
(
this
== &other)
44
return
*
this
;
45
46
// First the BasePlotContext members
47
BasePlotContext::operator=
(other);
48
49
return
*
this
;
50
}
51
52
53
MassSpecTracePlotContext
&
54
MassSpecTracePlotContext::operator=
(
const
MassSpecTracePlotContext
&other)
55
{
56
if
(
this
== &other)
57
return
*
this
;
58
59
// First the BasePlotContext members
60
BasePlotContext::operator=
(other);
61
62
// Second the mass spec trace plot-specific members
63
64
m_lastZ
= other.
m_lastZ
;
65
m_lastMz
= other.
m_lastMz
;
66
m_lastTicIntensity
= other.
m_lastTicIntensity
;
67
m_lastMr
= other.
m_lastMr
;
68
m_lastResolvingPower
= other.
m_lastResolvingPower
;
69
70
return
*
this
;
71
}
72
73
74
QString
75
MassSpecTracePlotContext::toString
()
const
76
{
77
QString text(
"Base context:\n"
);
78
79
text +=
BasePlotContext::toString
();
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
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
pappsomspp
widget
plotwidget
massspectraceplotcontext.cpp
Generated on Thu May 30 2024 09:36:18 for libpappsomspp by
1.9.8