libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
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
13
namespace
pappso
14
{
15
16
ColorMapPlotConfig::ColorMapPlotConfig
()
17
{
18
}
19
20
ColorMapPlotConfig::ColorMapPlotConfig
(
Enums::DataKind
x_axis_data_kind,
21
Enums::DataKind
y_axis_data_kind,
22
23
Enums::AxisScale
x_axis_scale,
24
Enums::AxisScale
y_axis_scale,
25
Enums::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
65
ColorMapPlotConfig::ColorMapPlotConfig
(
const
ColorMapPlotConfig
&other)
66
{
67
xAxisDataKind
= other.
xAxisDataKind
;
68
yAxisDataKind
= other.
yAxisDataKind
;
69
70
xAxisScale
= other.
xAxisScale
;
71
yAxisScale
= other.
yAxisScale
;
72
zAxisScale
= other.
zAxisScale
;
73
74
keyCellCount
= other.
keyCellCount
;
75
mzCellCount
= other.
mzCellCount
;
76
77
minKeyValue
= other.
minKeyValue
;
78
maxKeyValue
= other.
maxKeyValue
;
79
80
minMzValue
= other.
minMzValue
;
81
maxMzValue
= other.
maxMzValue
;
82
83
origMinZValue
= other.
origMinZValue
;
84
lastMinZValue
= other.
lastMinZValue
;
85
86
origMaxZValue
= other.
origMaxZValue
;
87
lastMaxZValue
= other.
lastMaxZValue
;
88
}
89
90
91
ColorMapPlotConfig
&
92
ColorMapPlotConfig::operator=
(
const
ColorMapPlotConfig
&other)
93
{
94
if
(
this
== &other)
95
return
*
this
;
96
97
xAxisDataKind
= other.
xAxisDataKind
;
98
yAxisDataKind
= other.
yAxisDataKind
;
99
100
xAxisScale
= other.
xAxisScale
;
101
yAxisScale
= other.
yAxisScale
;
102
zAxisScale
= other.
zAxisScale
;
103
104
keyCellCount
= other.
keyCellCount
;
105
mzCellCount
= other.
mzCellCount
;
106
107
minKeyValue
= other.
minKeyValue
;
108
maxKeyValue
= other.
maxKeyValue
;
109
110
minMzValue
= other.
minMzValue
;
111
maxMzValue
= other.
maxMzValue
;
112
113
origMinZValue
= other.
origMinZValue
;
114
lastMinZValue
= other.
lastMinZValue
;
115
116
origMaxZValue
= other.
origMaxZValue
;
117
lastMaxZValue
= other.
lastMaxZValue
;
118
119
return
*
this
;
120
}
121
122
123
void
124
ColorMapPlotConfig::setOrigMinZValue
(
double
value)
125
{
126
origMinZValue
= value;
127
}
128
129
void
130
ColorMapPlotConfig::setOrigAndLastMinZValue
(
double
value)
131
{
132
origMinZValue
= value;
133
lastMinZValue
= value;
134
}
135
136
137
void
138
ColorMapPlotConfig::setOrigMaxZValue
(
double
value)
139
{
140
origMaxZValue
= value;
141
}
142
143
void
144
ColorMapPlotConfig::setOrigAndLastMaxZValue
(
double
value)
145
{
146
origMaxZValue
= value;
147
lastMaxZValue
= value;
148
}
149
150
151
QString
152
ColorMapPlotConfig::toString
()
const
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 - "
).arg(
mzCellCount
).arg(
minKeyValue
);
164
165
text += QString(
166
"minKeyValue: %8 - maxKeyValue: %9 - minMzValue: %10 - maxMzValue: "
167
"%11 - lastMinZValue: %12 - lastMaxZValue: %13"
)
168
.arg(
keyCellCount
)
169
.arg(
maxKeyValue
)
170
.arg(
minMzValue
)
171
.arg(
maxMzValue
)
172
.arg(
lastMinZValue
)
173
.arg(
lastMaxZValue
);
174
175
return
text;
176
}
177
178
}
// namespace pappso
colormapplotconfig.h
pappso::Enums::DataKind
DataKind
Definition
types.h:238
pappso::Enums::AxisScale
AxisScale
Definition
types.h:254
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::ColorMapPlotConfig
Definition
colormapplotconfig.h:23
pappso::ColorMapPlotConfig::maxMzValue
double maxMzValue
Definition
colormapplotconfig.h:41
pappso::ColorMapPlotConfig::xAxisScale
Enums::AxisScale xAxisScale
Definition
colormapplotconfig.h:27
pappso::ColorMapPlotConfig::setOrigAndLastMaxZValue
void setOrigAndLastMaxZValue(double value)
Definition
colormapplotconfig.cpp:144
pappso::ColorMapPlotConfig::setOrigAndLastMinZValue
void setOrigAndLastMinZValue(double value)
Definition
colormapplotconfig.cpp:130
pappso::ColorMapPlotConfig::origMaxZValue
double origMaxZValue
Definition
colormapplotconfig.h:46
pappso::ColorMapPlotConfig::xAxisDataKind
Enums::DataKind xAxisDataKind
Definition
colormapplotconfig.h:24
pappso::ColorMapPlotConfig::yAxisScale
Enums::AxisScale yAxisScale
Definition
colormapplotconfig.h:28
pappso::ColorMapPlotConfig::ColorMapPlotConfig
ColorMapPlotConfig()
Definition
colormapplotconfig.cpp:16
pappso::ColorMapPlotConfig::setOrigMinZValue
void setOrigMinZValue(double value)
Definition
colormapplotconfig.cpp:124
pappso::ColorMapPlotConfig::origMinZValue
double origMinZValue
Definition
colormapplotconfig.h:43
pappso::ColorMapPlotConfig::yAxisDataKind
Enums::DataKind yAxisDataKind
Definition
colormapplotconfig.h:25
pappso::ColorMapPlotConfig::maxKeyValue
double maxKeyValue
Definition
colormapplotconfig.h:38
pappso::ColorMapPlotConfig::lastMaxZValue
double lastMaxZValue
Definition
colormapplotconfig.h:47
pappso::ColorMapPlotConfig::mzCellCount
std::size_t mzCellCount
Definition
colormapplotconfig.h:32
pappso::ColorMapPlotConfig::lastMinZValue
double lastMinZValue
Definition
colormapplotconfig.h:44
pappso::ColorMapPlotConfig::operator=
ColorMapPlotConfig & operator=(const ColorMapPlotConfig &other)
Definition
colormapplotconfig.cpp:92
pappso::ColorMapPlotConfig::minKeyValue
double minKeyValue
Definition
colormapplotconfig.h:37
pappso::ColorMapPlotConfig::toString
QString toString() const
Definition
colormapplotconfig.cpp:152
pappso::ColorMapPlotConfig::zAxisScale
Enums::AxisScale zAxisScale
Definition
colormapplotconfig.h:29
pappso::ColorMapPlotConfig::setOrigMaxZValue
void setOrigMaxZValue(double value)
Definition
colormapplotconfig.cpp:138
pappso::ColorMapPlotConfig::minMzValue
double minMzValue
Definition
colormapplotconfig.h:40
pappso::ColorMapPlotConfig::keyCellCount
std::size_t keyCellCount
Definition
colormapplotconfig.h:31
pappsomspp
gui
plotwidget
colormapplotconfig.cpp
Generated on
for libpappsomspp by
1.17.0