libpappsomspp
Library for mass spectrometry
basecolormapplotwidget.cpp
Go to the documentation of this file.
1 /* This code comes right from the msXpertSuite software project.
2  *
3  * msXpertSuite - mass spectrometry software suite
4  * -----------------------------------------------
5  * Copyright(C) 2009,...,2018 Filippo Rusconi
6  *
7  * http://www.msxpertsuite.org
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  *
22  * END software license
23  */
24 
25 
26 /////////////////////// StdLib includes
27 #include <vector>
28 
29 
30 /////////////////////// Qt includes
31 #include <QVector>
32 
33 
34 /////////////////////// Local includes
35 #include "basecolormapplotwidget.h"
36 #include "../../trace/maptrace.h"
37 #include "../../pappsoexception.h"
38 
39 
40 namespace pappso
41 {
42 
43 
45  const QString &x_axis_label,
46  const QString &y_axis_label)
47  : BasePlotWidget(parent, x_axis_label, y_axis_label)
48 {
49  // Do not call createAllAncillaryItems() in this base class because all the
50  // items will have been created *before* the addition of plots and then the
51  // rendering order will hide them to the viewer, since the rendering order is
52  // according to the order in which the items have been created.
53  //
54  // The fact that the ancillary items are created before trace plots is not a
55  // problem because the trace plots are sparse and do not effectively hide the
56  // data.
57  //
58  // But, in the color map plot widgets, we cannot afford to create the
59  // ancillary items *before* the plot itself because then, the rendering of the
60  // plot (created after) would screen off the ancillary items (created before).
61  //
62  // So, the createAllAncillaryItems() function needs to be called in the
63  // derived classes at the most appropriate moment in the setting up of the
64  // widget.
65  //
66  // In the present case, the function needs to be called right after addition
67  // of the color map plot.
68 }
69 
70 
71 //! Destruct \c this BaseColorMapPlotWidget instance.
72 /*!
73 
74  The destruction involves clearing the history, deleting all the axis range
75  history items for x and y axes.
76 
77 */
79 {
80  if(mpa_backupColorMapData != nullptr)
82  if(mpa_backupColorMapData != nullptr)
84 }
85 
86 
87 void
89  const ColorMapPlotConfig &color_map_config)
90 {
91  m_colorMapPlotConfig = color_map_config;
92 }
93 
94 
95 const ColorMapPlotConfig &
97 {
98  return m_colorMapPlotConfig;
99 }
100 
101 
102 QCPColorMap *
104  std::shared_ptr<std::map<double, MapTrace>> double_map_trace_map_sp,
105  const ColorMapPlotConfig color_map_plot_config,
106  const QColor &color)
107 {
108  // qDebug() << "Adding color map with config:" <<
109  // color_map_plot_config.toString();
110 
111  if(!color.isValid())
112  throw PappsoException(
113  QString("The color to be used for the plot graph is invalid."));
114 
115  QCPColorMap *color_map_p = new QCPColorMap(xAxis, yAxis);
116 
117  color_map_p->setLayer("plotsLayer");
118 
119  // Do not forget to copy the config!
120  m_colorMapPlotConfig = color_map_plot_config;
121 
122  // Immediately create a copy for backup.
123  mpa_backupColorMapPlotConfig = new ColorMapPlotConfig(color_map_plot_config);
124 
125 #if 0
126  // This is the code on the QCustomPlot documentation and it works fine.
127  QCPColorMap *color_map_p = new QCPColorMap(xAxis, yAxis);
128 
129  color_map_p->data()->setSize(50, 50);
130  color_map_p->data()->setRange(QCPRange(0, 2), QCPRange(0, 2));
131  for(int x = 0; x < 50; ++x)
132  for(int y = 0; y < 50; ++y)
133  color_map_p->data()->setCell(x, y, qCos(x / 10.0) + qSin(y / 10.0));
134  color_map_p->setGradient(QCPColorGradient::gpPolar);
135  color_map_p->rescaleDataRange(true);
136  rescaleAxes();
137  replot();
138 #endif
139 
140  // Only now can afford to call createAllAncillaryItems() in this derived class
141  // because the color map has been created already. The rendering order will
142  // thus not hide the ancillary items, since they have been created after the
143  // color map plot (since the rendering order is according to the
144  // order in which the items have been created). See contructor note.
146 
147  // Connect the signal of selection change so that we can re-emit it for the
148  // widget that is using *this widget.
149 
150  connect(color_map_p,
151  static_cast<void (QCPAbstractPlottable::*)(bool)>(
152  &QCPAbstractPlottable::selectionChanged),
153  [this, color_map_p]() {
154  emit plottableSelectionChangedSignal(color_map_p,
155  color_map_p->selected());
156  });
157 
158  // qDebug() << "Configuring the color map with this config:"
159  //<< color_map_plot_config.toString();
160 
161  color_map_p->data()->setSize(color_map_plot_config.keyCellCount,
162  color_map_plot_config.mzCellCount);
163 
164  color_map_p->data()->setRange(QCPRange(color_map_plot_config.minKeyValue,
165  color_map_plot_config.maxKeyValue),
166  QCPRange(color_map_plot_config.minMzValue,
167  color_map_plot_config.maxMzValue));
168  color_map_p->data()->fill(0.0);
169 
170  // We have now to fill the color map.
171 
172  for(auto &&pair : *double_map_trace_map_sp)
173  {
174 
175  // The first value is the key and the second value is the MapTrace into
176  // which we need to iterated and for each point (double mz, double
177  // intensity) create a map cell.
178 
179  double dt_or_rt_key = pair.first;
180  MapTrace map_trace = pair.second;
181 
182  for(auto &&data_point_pair : map_trace)
183  {
184  double mz = data_point_pair.first;
185  double intensity = data_point_pair.second;
186 
187  // We are filling dynamically the color map. If a cell had already
188  // something in, then we need to take that into account. This is
189  // because we let QCustomPlot handle the fuzzy transition between
190  // color map plot cells.
191 
192  double prev_intensity = color_map_p->data()->data(dt_or_rt_key, mz);
193  double new_intensity = prev_intensity + intensity;
194 
195  // Record the max cell intensity value (maxZValue). We will need that
196  // later.
198  std::max(m_colorMapPlotConfig.maxZValue, new_intensity);
199 
200  // qDebug() << "Setting tri-point:" << dt_or_rt_key << "," << mz <<
201  // ","
202  //<< new_intensity;
203 
204  color_map_p->data()->setData(dt_or_rt_key, mz, new_intensity);
205  }
206  }
207 
208  // At this point we have finished filling-up the color map.
209 
210  // The gpThermal is certainly one of the best.
211 
212  color_map_p->setGradient(QCPColorGradient::gpThermal);
213 
214  color_map_p->rescaleDataRange(true);
215 
216  color_map_p->rescaleAxes();
218 
219  // The pen of the color map itself is of no use. Instead the user will see the
220  // color of the axes' labels.
221 
222  QPen pen = xAxis->basePen();
223  pen.setColor(color);
224 
225  xAxis->setBasePen(pen);
226  xAxis->setLabelColor(color);
227  xAxis->setTickLabelColor(color);
228 
229  yAxis->setBasePen(pen);
230  yAxis->setLabelColor(color);
231  yAxis->setTickLabelColor(color);
232 
233  // And now set the color map's pen to the same color, even if we do not use
234  // it, we need it for coloring the plots that might be integrated from this
235  // color map.
236 
237  color_map_p->setPen(pen);
238 
239  // Copy the color map's data into a backup copy.
240 
241  mpa_backupColorMapData = new QCPColorMapData(*(color_map_p->data()));
242 
243  replot();
244 
245  return color_map_p;
246 }
247 
248 
249 void
251 {
252  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" ;
253 
254  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
255 
256  QCPColorMapData *origData = color_map_p->data();
257 
258  int keySize = origData->keySize();
259  int valueSize = origData->valueSize();
260 
261  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
262  //<< "Orig data size:" << keySize << valueSize;
263 
264  QCPRange keyRange = origData->keyRange();
265  QCPRange valueRange = origData->valueRange();
266 
267  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
268  //<< "Value at cell 80,650:" << origData->cell(80,650);
269 
270  // Transposed map.
271  QCPColorMapData *newData =
272  new QCPColorMapData(valueSize, keySize, valueRange, keyRange);
273 
274  for(int iter = 0; iter < keySize; ++iter)
275  {
276  for(int jter = 0; jter < valueSize; ++jter)
277  {
278  double cellData = origData->cell(iter, jter);
279 
280  newData->setCell(jter, iter, cellData);
281  }
282  }
283 
284  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
285  //<< "New data size:" << newData->keySize() << newData->valueSize();
286 
287  // At this point the transposition has been done.
288 
289  color_map_p->data()->clear();
290  color_map_p->rescaleDataRange(true);
291 
292  // Now we need to invert the labels and data kinds.
293 
296  m_colorMapPlotConfig.yAxisDataKind = temp_data_kind;
297 
298  QString temp_axis_label = xAxis->label();
299  xAxis->setLabel(yAxis->label());
300  yAxis->setLabel(temp_axis_label);
301 
302  // Will take ownership of the newData.
303  color_map_p->setData(newData);
304 
305  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
306  //<< "Value at cell 80,650:" << newData->cell(80,650)
307  //<< "Value at cell 650, 80:" << newData->cell(650,80);
308 
309  // QCPAxis *p_keyAxis = mp_colorMap->keyAxis();
310  // QCPAxis *p_valueAxis = mp_colorMap->valueAxis();
311 
312  // mp_colorMap->setKeyAxis(p_valueAxis);
313  // mp_colorMap->setValueAxis(p_keyAxis);
314 
315  color_map_p->rescaleAxes();
316 
317  replot();
318 }
319 
320 
321 void
323 {
324  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()" ;
325 
327  {
328  qDebug() << "Asking to change z axis scale to log10 while it is already "
329  "like so.";
330 
331  return;
332  }
333 
334  // qDebug() << "m_colorMapPlotConfig:" << m_colorMapPlotConfig.toString();
335 
336  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
337 
338  QCPColorMapData *map_data = color_map_p->data();
339 
340  int keySize = map_data->keySize();
341  int valueSize = map_data->valueSize();
342 
343  QCPRange keyRange = map_data->keyRange();
344  QCPRange valueRange = map_data->valueRange();
345 
346  // Make a copy of the current config so that we can modify
347  // the xxxZvalue values.
348  ColorMapPlotConfig new_color_map_plot_config(m_colorMapPlotConfig);
349 
350  // But we need to reset these two values to be able to update them using
351  // std::min() and std::max() below.
352  new_color_map_plot_config.minZValue = std::numeric_limits<double>::max();
353  new_color_map_plot_config.maxZValue = std::numeric_limits<double>::min();
354 
355  // qDebug() << "new_color_map_plot_config"
356  //<< new_color_map_plot_config.toString();
357 
358  // Log-ified heat map.
359  QCPColorMapData *new_map_data =
360  new QCPColorMapData(keySize, valueSize, keyRange, valueRange);
361 
362  // qDebug() << "Starting iteration in the color map.";
363 
364  for(int iter = 0; iter < keySize; ++iter)
365  {
366  for(int jter = 0; jter < valueSize; ++jter)
367  {
368  double cell_data = map_data->cell(iter, jter);
369 
370  double new_cell_data = 0;
371 
372  if(!cell_data)
373  // The log10 would be -inf, but then we'd have a huge data range and
374  // the color map would look totally blue... that is like 0 intensity
375  // all over.
376  new_cell_data = -1;
377  else
378  new_cell_data = std::log10(cell_data);
379 
380  // Store the new values here.
381  new_color_map_plot_config.minZValue =
382  //(new_cell_data < new_color_map_plot_config.minZValue
383  //? new_cell_data
384  //: new_color_map_plot_config.minZValue);
385  std::min(new_color_map_plot_config.minZValue, new_cell_data);
386 
387  new_color_map_plot_config.maxZValue =
388  //(new_cell_data > new_color_map_plot_config.maxZValue
389  //? new_cell_data
390  //: new_color_map_plot_config.maxZValue);
391  std::max(new_color_map_plot_config.maxZValue, new_cell_data);
392 
393  // qDebug() << "cell_data:" << cell_data
394  //<< "new_cell_data:" << new_cell_data
395  //<< "new_color_map_plot_config.minZValue:"
396  //<< new_color_map_plot_config.minZValue
397  //<< "new_color_map_plot_config.maxZValue:"
398  //<< new_color_map_plot_config.maxZValue;
399 
400  new_map_data->setCell(iter, jter, new_cell_data);
401  }
402  }
403 
404  // qDebug() << "Finished iteration in the color map.";
405 
406  color_map_p->data()->clear();
407 
408  // Will take ownership of the new_map_data.
409  color_map_p->setData(new_map_data);
410 
411  color_map_p->data()->recalculateDataBounds();
412  color_map_p->rescaleDataRange(true);
413 
414  // At this point the new color map data have taken their place, we can update
415  // the config. This, way any new filtering can take advantage of the new
416  // values and compute the threshold correctly.
417  m_colorMapPlotConfig = new_color_map_plot_config;
418 
419  // Now we need to document the change.
421 
422  // qDebug() << "new_color_map_plot_config"
423  //<< new_color_map_plot_config.toString();
424 
425  // qDebug() << "m_colorMapPlotConfig:" << m_colorMapPlotConfig.toString();
426 
427  // We should not do this, as the user might have zoomed to a region of
428  // interest.
429  // color_map_p->rescaleAxes();
430 
431  replot();
432 }
433 
434 
435 void
437  double threshold_percentage)
438 {
439  // We want to zAxisFilter the cell data by eliminating the contents of all the
440  // cells that have an intensity value less than threshold.
441 
442  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
443 
444  QCPColorMapData *map_data = color_map_p->data();
445 
446  int keySize = map_data->keySize();
447  int valueSize = map_data->valueSize();
448 
449  QCPRange keyRange = map_data->keyRange();
450  QCPRange valueRange = map_data->valueRange();
451 
452  double threshold =
453  m_colorMapPlotConfig.maxZValue * (threshold_percentage / 100);
454 
455  qDebug() << "maxZValue:" << m_colorMapPlotConfig.maxZValue
456  << "threshold:" << threshold;
457 
458  // Make a copy of the current config so that we can modify
459  // the xxxZvalue values.
460  ColorMapPlotConfig new_color_map_plot_config(m_colorMapPlotConfig);
461 
462  // But we need to reset these two values to be able to update them using
463  // std::min() and std::max() below.
464  new_color_map_plot_config.minZValue = std::numeric_limits<double>::max();
465  new_color_map_plot_config.maxZValue = std::numeric_limits<double>::min();
466 
467  // Filtered
468  QCPColorMapData *new_map_data =
469  new QCPColorMapData(keySize, valueSize, keyRange, valueRange);
470 
471  for(int iter = 0; iter < keySize; ++iter)
472  {
473  for(int jter = 0; jter < valueSize; ++jter)
474  {
475  double cell_data = map_data->cell(iter, jter);
476 
477  double new_cell_data = 0;
478 
479  if(cell_data > threshold)
480  new_cell_data = threshold;
481  else
482  new_cell_data = cell_data;
483 
484  // Store the new values here.
485  new_color_map_plot_config.minZValue =
486  //(new_cell_data < new_color_map_plot_config.minZValue
487  //? new_cell_data
488  //: new_color_map_plot_config.minZValue);
489  std::min(new_color_map_plot_config.minZValue, new_cell_data);
490 
491  new_color_map_plot_config.maxZValue =
492  //(new_cell_data > new_color_map_plot_config.maxZValue
493  //? new_cell_data
494  //: new_color_map_plot_config.maxZValue);
495  std::max(new_color_map_plot_config.maxZValue, new_cell_data);
496 
497  // qDebug() << "cell_data:" << cell_data
498  //<< "new_cell_data:" << new_cell_data
499  //<< "new_color_map_plot_config.minZValue:"
500  //<< new_color_map_plot_config.minZValue
501  //<< "new_color_map_plot_config.maxZValue:"
502  //<< new_color_map_plot_config.maxZValue;
503 
504  new_map_data->setCell(iter, jter, new_cell_data);
505  }
506  }
507 
508  color_map_p->data()->clear();
509 
510  // Will take ownership of the new_map_data.
511  color_map_p->setData(new_map_data);
512 
513  color_map_p->data()->recalculateDataBounds();
514  color_map_p->rescaleDataRange(true);
515 
516  // At this point the new color map data have taken their place, we can update
517  // the config. This, way any new filtering can take advantage of the new
518  // values and compute the threshold correctly.
519  m_colorMapPlotConfig = new_color_map_plot_config;
520 
521  // We should not do this, as the user might have zoomed to a region of
522  // interest.
523  // color_map_p->rescaleAxes();
524 
525  replot();
526 }
527 
528 
529 void
531  double threshold_percentage)
532 {
533  // We want to zAxisFilter the cell data by eliminating the contents of all the
534  // cells that have an intensity value higher than threshold.
535 
536  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
537 
538  QCPColorMapData *map_data = color_map_p->data();
539 
540  int keySize = map_data->keySize();
541  int valueSize = map_data->valueSize();
542 
543  QCPRange keyRange = map_data->keyRange();
544  QCPRange valueRange = map_data->valueRange();
545 
546  double threshold =
547  m_colorMapPlotConfig.maxZValue * (threshold_percentage / 100);
548 
549  qDebug() << "maxZValue:" << m_colorMapPlotConfig.maxZValue
550  << "threshold:" << threshold;
551 
552  // Make a copy of the current config so that we can modify
553  // the xxxZvalue values.
554  ColorMapPlotConfig new_color_map_plot_config(m_colorMapPlotConfig);
555 
556  // But we need to reset these two values to be able to update them using
557  // std::min() and std::max() below.
558  new_color_map_plot_config.minZValue = std::numeric_limits<double>::max();
559  new_color_map_plot_config.maxZValue = std::numeric_limits<double>::min();
560 
561  qDebug() << "new_color_map_plot_config"
562  << new_color_map_plot_config.toString();
563 
564  // Filtered
565  QCPColorMapData *new_map_data =
566  new QCPColorMapData(keySize, valueSize, keyRange, valueRange);
567 
568  for(int iter = 0; iter < keySize; ++iter)
569  {
570  for(int jter = 0; jter < valueSize; ++jter)
571  {
572  double cell_data = map_data->cell(iter, jter);
573 
574  double new_cell_data = 0;
575 
576  if(cell_data < threshold)
577  new_cell_data = threshold;
578  else
579  new_cell_data = cell_data;
580 
581  // Store the new values here.
582  new_color_map_plot_config.minZValue =
583  //(new_cell_data < new_color_map_plot_config.minZValue
584  //? new_cell_data
585  //: new_color_map_plot_config.minZValue);
586  std::min(new_color_map_plot_config.minZValue, new_cell_data);
587 
588  new_color_map_plot_config.maxZValue =
589  //(new_cell_data > new_color_map_plot_config.maxZValue
590  //? new_cell_data
591  //: new_color_map_plot_config.maxZValue);
592  std::max(new_color_map_plot_config.maxZValue, new_cell_data);
593 
594  // qDebug() << "cell_data:" << cell_data
595  //<< "new_cell_data:" << new_cell_data
596  //<< "new_color_map_plot_config.minZValue:"
597  //<< new_color_map_plot_config.minZValue
598  //<< "new_color_map_plot_config.maxZValue:"
599  //<< new_color_map_plot_config.maxZValue;
600 
601  new_map_data->setCell(iter, jter, new_cell_data);
602  }
603  }
604 
605  color_map_p->data()->clear();
606 
607  // Will take ownership of the new_map_data.
608  color_map_p->setData(new_map_data);
609 
610  color_map_p->data()->recalculateDataBounds();
611  color_map_p->rescaleDataRange(true);
612 
613  qDebug() << "new_color_map_plot_config"
614  << new_color_map_plot_config.toString();
615 
616 
617  // At this point the new color map data have taken their place, we can update
618  // the config. This, way any new filtering can take advantage of the new
619  // values and compute the threshold correctly.
620  m_colorMapPlotConfig = new_color_map_plot_config;
621 
622  qDebug() << "m_colorMapPlotConfig:" << m_colorMapPlotConfig.toString();
623 
624  // We should not do this, as the user might have zoomed to a region of
625  // interest.
626  // color_map_p->rescaleAxes();
627 
628  replot();
629 }
630 
631 
632 void
634 {
635  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
636  color_map_p->data()->clear();
637 
638  if(mpa_backupColorMapData == nullptr)
639  throw(PappsoException(
640  "Not possible that the mpa_backupColorMapData pointer is null."));
641 
642  // We do no want that the color_map_p takes ownership of the data, because
643  // these must remain there always, so pass true, to say that we want to copy
644  // the data not transfer the pointer.
645  color_map_p->setData(mpa_backupColorMapData, true);
646 
647  color_map_p->data()->recalculateDataBounds();
648  color_map_p->rescaleDataRange(true);
649 
650  // We should not do this, as the user might have zoomed to a region of
651  // interest.
652  // color_map_p->rescaleAxes();
653 
654  // Reset the current plot config to what it was originally.
656 
657  replot();
658 }
659 
660 
661 DataKind
663 {
665 }
666 
667 
668 DataKind
670 {
672 }
673 
674 
675 AxisScale
677 {
678  if(axis == Axis::x)
680  else if(axis == Axis::y)
682  else if(axis == Axis::z)
684  else
685  throw PappsoException(
686  QString("basecolormapplotwidget.cpp: The axis cannot be different than "
687  "x, y or z."));
688 
689  return AxisScale::unset;
690 }
691 
692 
693 AxisScale
695 {
697 }
698 
699 
700 AxisScale
702 {
704 }
705 
706 
707 AxisScale
709 {
711 }
712 
713 
714 void
715 BaseColorMapPlotWidget::setPlottingColor(QCPAbstractPlottable *plottable_p,
716  const QColor &new_color)
717 {
718  Q_UNUSED(plottable_p);
719 
720  // The pen of the color map itself is of no use. Instead the user will see the
721  // color of the axes' labels.
722 
723  QPen pen = xAxis->basePen();
724  pen.setColor(new_color);
725 
726  xAxis->setBasePen(pen);
727  xAxis->setLabelColor(new_color);
728  xAxis->setTickLabelColor(new_color);
729 
730  yAxis->setBasePen(pen);
731  yAxis->setLabelColor(new_color);
732  yAxis->setTickLabelColor(new_color);
733 
734  // And now set the color map's pen to the same color, even if we do not use
735  // it, we need it for coloring the plots that might be integrated from this
736  // color map.
737 
738  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
739 
740  color_map_p->setPen(pen);
741 
742  replot();
743 }
744 
745 
746 QColor
748 {
749  Q_UNUSED(index);
750 
751  QPen pen = xAxis->basePen();
752  return pen.color();
753 }
754 
755 
756 QString
758 {
759  // We want to export the data to a string in the x y z format, with
760  // x=key (cell's x coordinate)
761  // y=value (cell's y coordinate)
762  // z=intensity (cell value)
763 
764  QCPColorMap *color_map_p = static_cast<QCPColorMap *>(plottable(0));
765 
766  QCPColorMapData *map_data = color_map_p->data();
767 
768  int keySize = map_data->keySize();
769  int valueSize = map_data->valueSize();
770 
771  QString text;
772 
773  for(int iter = 0; iter < keySize; ++iter)
774  {
775  for(int jter = 0; jter < valueSize; ++jter)
776  {
777  text += QString("%1 %2 %3\n")
778  .arg(iter, 0, 'f', 6, ' ')
779  .arg(jter, 0, 'f', 6, ' ')
780  .arg(map_data->cell(iter, jter), 0, 'f', 6, ' ');
781  }
782  }
783 
784  return text;
785 }
786 
787 
788 } // namespace pappso
virtual QCPColorMap * addColorMap(std::shared_ptr< std::map< double, MapTrace >> double_map_trace_map_sp, const ColorMapPlotConfig color_map_plot_config, const QColor &color)
virtual QColor getPlottingColor(int index=0) const override
ColorMapPlotConfig * mpa_backupColorMapPlotConfig
BaseColorMapPlotWidget(QWidget *parent, const QString &x_axis_label, const QString &y_axis_label)
virtual void setColorMapPlotConfig(const ColorMapPlotConfig &color_map_config)
virtual void setPlottingColor(QCPAbstractPlottable *plottable_p, const QColor &new_color) override
AxisScale axisScale(Axis axis) const
virtual const ColorMapPlotConfig & getColorMapPlotConfig()
virtual void zAxisFilterHighPassPercentage(double threshold_percentage)
virtual ~BaseColorMapPlotWidget()
Destruct this BaseColorMapPlotWidget instance.
virtual void zAxisFilterLowPassPercentage(double threshold_percentage)
virtual void createAllAncillaryItems()
virtual void resetAxesRangeHistory()
void plottableSelectionChangedSignal(QCPAbstractPlottable *plottable_p, bool selected)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
Axis
Definition: types.h:180
AxisScale
Definition: types.h:189
DataKind
Definition: types.h:171