Loading...
Searching...
No Matches
basecolormapplotwidget.h
Go to the documentation of this file.
/* This code comes right from the msXpertSuite software project.
*
* msXpertSuite - mass spectrometry software suite
* -----------------------------------------------
* Copyright(C) 2009,...,2018 Filippo Rusconi
*
* http://www.msxpertsuite.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* END software license
*/
#pragma once
/////////////////////// StdLib includes
/////////////////////// Qt includes
#include <QObject>
#include <QString>
#include <QWidget>
#include <QBrush>
#include <QColor>
#include <QVector>
/////////////////////// QCustomPlot
#include <cstddef>
#include <qcustomplot.h>
/////////////////////// Local includes
#include "pappsomspp/export-import-config.h"
#include "baseplotwidget.h"
#include "colormapplotconfig.h"
#include "../../core/trace/trace.h"
#include "../../core/vendors/tims/timsframe.h"
namespace pappso
{
class BaseColorMapPlotWidget;
typedef std::shared_ptr<BaseColorMapPlotWidget> BaseColorMapPlotWidgetSPtr;
typedef std::shared_ptr<const BaseColorMapPlotWidget>
BaseColorMapPlotWidgetCstSPtr;
class PMSPP_LIB_DECL BaseColorMapPlotWidget : public BasePlotWidget
{
Q_OBJECT;
public:
explicit BaseColorMapPlotWidget(QWidget *parent);
explicit BaseColorMapPlotWidget(QWidget *parent,
const QString &x_axis_label,
const QString &y_axis_label);
virtual ~BaseColorMapPlotWidget();
virtual void
setColorMapPlotConfig(const ColorMapPlotConfig &color_map_config);
virtual const ColorMapPlotConfig &getColorMapPlotConfig();
const ColorMapPlotConfig *getOrigColorMapPlotConfig();
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 QCPColorMap *
addColorMap(const TimsFrame &tims_frame,
const ColorMapPlotConfig color_map_plot_config,
const QColor &color);
virtual void transposeAxes();
// Change the scale of the intensity to log10 (color, z virtual axis)
virtual void zAxisScaleToLog10();
virtual void zAxisFilterLowPassPercentage(double threshold_percentage);
/** @brief fix maximum value for the intensity
*/
virtual void zAxisFilterLowPassThreshold(double threshold);
virtual void zAxisFilterHighPassPercentage(double threshold_percentage);
virtual void zAxisDataResetToOriginal();
Enums::DataKind xAxisDataKind() const;
Enums::DataKind yAxisDataKind() const;
Enums::AxisScale axisScale(Enums::Axis axis) const;
Enums::AxisScale xAxisScale() const;
Enums::AxisScale yAxisScale() const;
Enums::AxisScale zAxisScale() const;
virtual void setPlottingColor(QCPAbstractPlottable *plottable_p,
const QColor &new_color) override;
virtual QColor getPlottingColor(int index = 0) const override;
void dataTo3ColString(QString &data_string);
void dataToMatrixString(QString &data_string, bool detailed = false);
void currentXaxisRangeIndices(int &lower, int &upper);
void currentYaxisRangeIndices(int &lower, int &upper);
signals:
protected:
QCPColorMapData *mpa_origColorMapData = nullptr;
ColorMapPlotConfig m_colorMapPlotConfig;
ColorMapPlotConfig *mpa_origColorMapPlotConfig = nullptr;
};
} // 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:249
pappso::Enums::AxisScale
AxisScale
Definition types.h:267
pappso::Enums::Axis
Axis
Definition types.h:258
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