libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
basecolormapplotwidget.h
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
#pragma once
27
28
/////////////////////// StdLib includes
29
30
31
/////////////////////// Qt includes
32
#include <QObject>
33
#include <QString>
34
#include <QWidget>
35
#include <QBrush>
36
#include <QColor>
37
#include <QVector>
38
39
40
/////////////////////// QCustomPlot
41
#include <cstddef>
42
#include <qcustomplot.h>
43
44
45
/////////////////////// Local includes
46
#include "
pappsomspp/export-import-config.h
"
47
#include "
baseplotwidget.h
"
48
#include "
colormapplotconfig.h
"
49
#include "
../../core/trace/trace.h
"
50
#include "
../../core/vendors/tims/timsframe.h
"
51
52
53
namespace
pappso
54
{
55
56
57
class
BaseColorMapPlotWidget
;
58
59
typedef
std::shared_ptr<BaseColorMapPlotWidget>
BaseColorMapPlotWidgetSPtr
;
60
typedef
std::shared_ptr<const BaseColorMapPlotWidget>
61
BaseColorMapPlotWidgetCstSPtr
;
62
63
class
PMSPP_LIB_DECL
BaseColorMapPlotWidget
:
public
BasePlotWidget
64
{
65
Q_OBJECT;
66
67
public
:
68
explicit
BaseColorMapPlotWidget
(QWidget *parent);
69
explicit
BaseColorMapPlotWidget
(QWidget *parent,
70
const
QString &x_axis_label,
71
const
QString &y_axis_label);
72
73
virtual
~BaseColorMapPlotWidget
();
74
75
virtual
void
76
setColorMapPlotConfig
(
const
ColorMapPlotConfig
&color_map_config);
77
virtual
const
ColorMapPlotConfig
&
getColorMapPlotConfig
();
78
const
ColorMapPlotConfig
*
getOrigColorMapPlotConfig
();
79
80
virtual
QCPColorMap *
addColorMap
(
81
std::shared_ptr<std::map<double, MapTrace>> double_map_trace_map_sp,
82
const
ColorMapPlotConfig
color_map_plot_config,
83
const
QColor &color);
84
85
virtual
QCPColorMap *
86
addColorMap
(
const
TimsFrame
&tims_frame,
87
const
ColorMapPlotConfig
color_map_plot_config,
88
const
QColor &color);
89
90
virtual
void
transposeAxes
();
91
92
// Change the scale of the intensity to log10 (color, z virtual axis)
93
virtual
void
zAxisScaleToLog10
();
94
virtual
void
zAxisFilterLowPassPercentage
(
double
threshold_percentage);
95
96
/** @brief fix maximum value for the intensity
97
*/
98
virtual
void
zAxisFilterLowPassThreshold
(
double
threshold);
99
100
virtual
void
zAxisFilterHighPassPercentage
(
double
threshold_percentage);
101
102
virtual
void
zAxisDataResetToOriginal
();
103
104
Enums::DataKind
xAxisDataKind
()
const
;
105
Enums::DataKind
yAxisDataKind
()
const
;
106
107
Enums::AxisScale
axisScale
(
Enums::Axis
axis)
const
;
108
Enums::AxisScale
xAxisScale
()
const
;
109
Enums::AxisScale
yAxisScale
()
const
;
110
Enums::AxisScale
zAxisScale
()
const
;
111
112
virtual
void
setPlottingColor
(QCPAbstractPlottable *plottable_p,
113
const
QColor &new_color)
override
;
114
virtual
QColor
getPlottingColor
(
int
index = 0)
const override
;
115
116
void
dataTo3ColString
(QString &data_string);
117
void
dataToMatrixString
(QString &data_string,
bool
detailed =
false
);
118
119
void
currentXaxisRangeIndices
(
int
&lower,
int
&upper);
120
void
currentYaxisRangeIndices
(
int
&lower,
int
&upper);
121
122
signals:
123
124
protected
:
125
QCPColorMapData *
mpa_origColorMapData
=
nullptr
;
126
127
ColorMapPlotConfig
m_colorMapPlotConfig
;
128
ColorMapPlotConfig
*
mpa_origColorMapPlotConfig
=
nullptr
;
129
};
130
131
132
}
// namespace pappso
baseplotwidget.h
pappso::BaseColorMapPlotWidget
Definition
basecolormapplotwidget.h:64
pappso::BaseColorMapPlotWidget::dataToMatrixString
void dataToMatrixString(QString &data_string, bool detailed=false)
Definition
basecolormapplotwidget.cpp:1251
pappso::BaseColorMapPlotWidget::currentYaxisRangeIndices
void currentYaxisRangeIndices(int &lower, int &upper)
Definition
basecolormapplotwidget.cpp:1138
pappso::BaseColorMapPlotWidget::getPlottingColor
virtual QColor getPlottingColor(int index=0) const override
Definition
basecolormapplotwidget.cpp:1071
pappso::BaseColorMapPlotWidget::mpa_origColorMapPlotConfig
ColorMapPlotConfig * mpa_origColorMapPlotConfig
Definition
basecolormapplotwidget.h:128
pappso::BaseColorMapPlotWidget::m_colorMapPlotConfig
ColorMapPlotConfig m_colorMapPlotConfig
Definition
basecolormapplotwidget.h:127
pappso::BaseColorMapPlotWidget::BaseColorMapPlotWidget
BaseColorMapPlotWidget(QWidget *parent)
Definition
basecolormapplotwidget.cpp:71
pappso::BaseColorMapPlotWidget::dataTo3ColString
void dataTo3ColString(QString &data_string)
Definition
basecolormapplotwidget.cpp:1196
pappso::BaseColorMapPlotWidget::xAxisDataKind
Enums::DataKind xAxisDataKind() const
Definition
basecolormapplotwidget.cpp:987
pappso::BaseColorMapPlotWidget::yAxisDataKind
Enums::DataKind yAxisDataKind() const
Definition
basecolormapplotwidget.cpp:994
pappso::BaseColorMapPlotWidget::zAxisFilterLowPassThreshold
virtual void zAxisFilterLowPassThreshold(double threshold)
fix maximum value for the intensity
Definition
basecolormapplotwidget.cpp:745
pappso::BaseColorMapPlotWidget::getOrigColorMapPlotConfig
const ColorMapPlotConfig * getOrigColorMapPlotConfig()
Definition
basecolormapplotwidget.cpp:120
pappso::BaseColorMapPlotWidget::currentXaxisRangeIndices
void currentXaxisRangeIndices(int &lower, int &upper)
Definition
basecolormapplotwidget.cpp:1081
pappso::BaseColorMapPlotWidget::yAxisScale
Enums::AxisScale yAxisScale() const
Definition
basecolormapplotwidget.cpp:1026
pappso::BaseColorMapPlotWidget::setColorMapPlotConfig
virtual void setColorMapPlotConfig(const ColorMapPlotConfig &color_map_config)
Definition
basecolormapplotwidget.cpp:113
pappso::BaseColorMapPlotWidget::zAxisScaleToLog10
virtual void zAxisScaleToLog10()
Definition
basecolormapplotwidget.cpp:520
pappso::BaseColorMapPlotWidget::setPlottingColor
virtual void setPlottingColor(QCPAbstractPlottable *plottable_p, const QColor &new_color) override
Definition
basecolormapplotwidget.cpp:1040
pappso::BaseColorMapPlotWidget::xAxisScale
Enums::AxisScale xAxisScale() const
Definition
basecolormapplotwidget.cpp:1019
pappso::BaseColorMapPlotWidget::getColorMapPlotConfig
virtual const ColorMapPlotConfig & getColorMapPlotConfig()
Definition
basecolormapplotwidget.cpp:127
pappso::BaseColorMapPlotWidget::mpa_origColorMapData
QCPColorMapData * mpa_origColorMapData
Definition
basecolormapplotwidget.h:125
pappso::BaseColorMapPlotWidget::addColorMap
virtual QCPColorMap * addColorMap(std::shared_ptr< std::map< double, MapTrace > > double_map_trace_map_sp, const ColorMapPlotConfig color_map_plot_config, const QColor &color)
Definition
basecolormapplotwidget.cpp:134
pappso::BaseColorMapPlotWidget::zAxisScale
Enums::AxisScale zAxisScale() const
Definition
basecolormapplotwidget.cpp:1033
pappso::BaseColorMapPlotWidget::axisScale
Enums::AxisScale axisScale(Enums::Axis axis) const
Definition
basecolormapplotwidget.cpp:1001
pappso::BaseColorMapPlotWidget::zAxisFilterHighPassPercentage
virtual void zAxisFilterHighPassPercentage(double threshold_percentage)
Definition
basecolormapplotwidget.cpp:842
pappso::BaseColorMapPlotWidget::zAxisDataResetToOriginal
virtual void zAxisDataResetToOriginal()
Definition
basecolormapplotwidget.cpp:951
pappso::BaseColorMapPlotWidget::transposeAxes
virtual void transposeAxes()
Definition
basecolormapplotwidget.cpp:449
pappso::BaseColorMapPlotWidget::zAxisFilterLowPassPercentage
virtual void zAxisFilterLowPassPercentage(double threshold_percentage)
Definition
basecolormapplotwidget.cpp:637
pappso::BasePlotWidget::BasePlotWidget
BasePlotWidget(QWidget *parent)
Definition
baseplotwidget.cpp:49
pappso::TimsFrame
Definition
timsframe.h:54
colormapplotconfig.h
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso::Enums::DataKind
DataKind
Definition
types.h:238
pappso::Enums::AxisScale
AxisScale
Definition
types.h:254
pappso::Enums::Axis
Axis
Definition
types.h:246
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::BaseColorMapPlotWidgetCstSPtr
std::shared_ptr< const BaseColorMapPlotWidget > BaseColorMapPlotWidgetCstSPtr
Definition
basecolormapplotwidget.h:61
pappso::BaseColorMapPlotWidgetSPtr
std::shared_ptr< BaseColorMapPlotWidget > BaseColorMapPlotWidgetSPtr
Definition
basecolormapplotwidget.h:59
pappso::ColorMapPlotConfig
Definition
colormapplotconfig.h:23
timsframe.h
trace.h
pappsomspp
gui
plotwidget
basecolormapplotwidget.h
Generated on
for libpappsomspp by
1.17.0