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 <qcustomplot.h>
/////////////////////// Local includes
#include "../../exportinmportconfig.h"
#include "baseplotwidget.h"
#include "colormapplotconfig.h"
#include "../../trace/trace.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,
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 void transposeAxes();
// Change the scale of the intensity to log10 (color, z virtual axis)
virtual void zAxisScaleToLog10();
virtual void zAxisFilterLowPassPercentage(double threshold_percentage);
virtual void zAxisFilterHighPassPercentage(double threshold_percentage);
virtual void zAxisDataResetToOriginal();
DataKind xAxisDataKind() const;
DataKind yAxisDataKind() const;
AxisScale axisScale(Axis axis) const;
AxisScale xAxisScale() const;
AxisScale yAxisScale() const;
AxisScale zAxisScale() const;
virtual void setPlottingColor(QCPAbstractPlottable *plottable_p,
const QColor &new_color) override;
virtual QColor getPlottingColor(int index = 0) const override;
QString dataToString();
signals:
protected:
QCPColorMapData *mpa_origColorMapData = nullptr;
ColorMapPlotConfig m_colorMapPlotConfig;
ColorMapPlotConfig *mpa_origColorMapPlotConfig = nullptr;
};
} // namespace pappso
baseplotwidget.h
pappso::BaseColorMapPlotWidget
Definition: basecolormapplotwidget.h:62
pappso::BaseColorMapPlotWidget::m_colorMapPlotConfig
ColorMapPlotConfig m_colorMapPlotConfig
Definition: basecolormapplotwidget.h:110
pappso::BasePlotWidget
Definition: baseplotwidget.h:67
colormapplotconfig.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
pappso::Axis
Axis
Definition: types.h:180
pappso::AxisScale
AxisScale
Definition: types.h:189
pappso::BaseColorMapPlotWidgetCstSPtr
std::shared_ptr< const BaseColorMapPlotWidget > BaseColorMapPlotWidgetCstSPtr
Definition: basecolormapplotwidget.h:59
pappso::DataKind
DataKind
Definition: types.h:171
pappso::BaseColorMapPlotWidgetSPtr
std::shared_ptr< BaseColorMapPlotWidget > BaseColorMapPlotWidgetSPtr
Definition: basecolormapplotwidget.h:55
pappso::ColorMapPlotConfig
Definition: colormapplotconfig.h:23