libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
colormapplotconfig.cpp
Go to the documentation of this file.
1// Copyright Filippo Rusconi, GPLv3+
2
3/////////////////////// StdLib includes
4
5
6/////////////////////// Qt includes
7
8
9/////////////////////// Local includes
10#include "colormapplotconfig.h"
11
12
13namespace pappso
14{
15
19
21 DataKind y_axis_data_kind,
22
23 AxisScale x_axis_scale,
24 AxisScale y_axis_scale,
25 AxisScale z_axis_scale,
26
27 std::size_t key_cell_count,
28 std::size_t mz_cell_count,
29
30 double min_key_value,
31 double max_key_value,
32
33 double min_mz_value,
34 double max_mz_value,
35
36 double orig_min_z_value,
37 double orig_max_z_value)
38 : xAxisDataKind(x_axis_data_kind),
39 yAxisDataKind(y_axis_data_kind),
40
41 xAxisScale(x_axis_scale),
42 yAxisScale(y_axis_scale),
43 zAxisScale(z_axis_scale),
44
45 keyCellCount(key_cell_count),
46 mzCellCount(mz_cell_count),
47
48 minKeyValue(min_key_value),
49 maxKeyValue(max_key_value),
50
51 minMzValue(min_mz_value),
52 maxMzValue(max_mz_value),
53
54 // Initialize both orig and last to the same value.
55 origMinZValue(orig_min_z_value),
56 lastMinZValue(orig_min_z_value),
57
58 // Initialize both orig and last to the same value.
59 origMaxZValue(orig_max_z_value),
60 lastMaxZValue(orig_max_z_value)
61{
62}
63
64
89
90
93{
94 if(this == &other)
95 return *this;
96
99
100 xAxisScale = other.xAxisScale;
101 yAxisScale = other.yAxisScale;
102 zAxisScale = other.zAxisScale;
103
105 mzCellCount = other.mzCellCount;
106
107 minKeyValue = other.minKeyValue;
108 maxKeyValue = other.maxKeyValue;
109
110 minMzValue = other.minMzValue;
111 maxMzValue = other.maxMzValue;
112
115
118
119 return *this;
120}
121
122
123void
125{
126 origMinZValue = value;
127}
128
129void
131{
132 origMinZValue = value;
133 lastMinZValue = value;
134}
135
136
137void
139{
140 origMaxZValue = value;
141}
142
143void
145{
146 origMaxZValue = value;
147 lastMaxZValue = value;
148}
149
150
151QString
153{
154 QString text = QString("xAxisDataKind: %1 - yAxisDataKind: %2")
155 .arg(static_cast<int>(xAxisDataKind))
156 .arg(static_cast<int>(yAxisDataKind));
157
158 text += QString("xAxisScale: %1 - yAxisScale: %2 - zAxisScale: %3 - ")
159 .arg(static_cast<int>(xAxisScale))
160 .arg(static_cast<int>(yAxisScale))
161 .arg(static_cast<int>(zAxisScale));
162
163 text += QString("keyCellCount: %1 - mzCellCount: %2 - ")
164 .arg(mzCellCount)
165 .arg(minKeyValue);
166
167 text += QString(
168 "minKeyValue: %8 - maxKeyValue: %9 - minMzValue: %10 - maxMzValue: "
169 "%11 - lastMinZValue: %12 - lastMaxZValue: %13")
170 .arg(keyCellCount)
171 .arg(maxKeyValue)
172 .arg(minMzValue)
173 .arg(maxMzValue)
174 .arg(lastMinZValue)
175 .arg(lastMaxZValue);
176
177 return text;
178}
179
180} // namespace pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
AxisScale
Definition types.h:229
DataKind
Definition types.h:211
void setOrigAndLastMaxZValue(double value)
void setOrigAndLastMinZValue(double value)
ColorMapPlotConfig & operator=(const ColorMapPlotConfig &other)