libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
massspectraceplotwidget.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 <qcustomplot.h>
42
43
44/////////////////////// pappsomspp includes
45
46
47/////////////////////// Local includes
49#include "basetraceplotwidget.h"
51
52
53namespace pappso
54{
55
56
58{
59 Q_OBJECT
60
61 public:
62 explicit MassSpecTracePlotWidget(QWidget *parent = 0);
63 explicit MassSpecTracePlotWidget(QWidget *parent,
64 const QString &x_axis_label,
65 const QString &y_axis_label);
66
68
69 /******* Mass spectrum-specific calculations *******/
70 /******* Mass spectrum-specific calculations *******/
71 void setChargeMinimalFractionalPart(double charge_fractional_part);
72 double getChargeMinimalFractionalPart() const;
73
74 void setChargeStateEnvelopePeakSpan(int interval);
75 int getChargeStateEnvelopePeakSpan() const;
76
77 bool deconvolute();
78 bool deconvoluteIsotopicCluster();
79 bool deconvoluteChargedState(int span = 1);
80 bool computeResolvingPower();
81 /******* Mass spectrum-specific calculations *******/
82
83
84 /******* Mouse and keyboard event handlers *******/
85 /******* Mouse and keyboard event handlers *******/
86 virtual void keyPressEvent(QKeyEvent *event) override;
87 virtual void keyReleaseEvent(QKeyEvent *event) override;
88
89 virtual void mouseMoveHandler(QMouseEvent *event) override;
90
91 virtual void mousePressHandler(QMouseEvent *event) override;
92 virtual void mouseReleaseHandler(QMouseEvent *event) override;
93
94 virtual void mouseMoveHandlerNotDraggingCursor() override;
95 virtual void mouseMoveHandlerDraggingCursor() override;
96 /******* Mouse and keyboard event handlers *******/
97
98 const MassSpecTracePlotContext &refreshBaseContext() const;
99
100 signals:
101
102 // Here we have signals that are specific of the mass spectrum-oriented
103 // version of the plot widget.
104
106
109
111
112 protected:
114
115 // This value is the tolerance on the fractional part of the charge value that
116 // is computed by the deconvolution. If the z value that is deconvoluted is,
117 // for example, 2.980, and m_chargeFractionalPartTolerance = 0.990, then no z
118 // value will be displayed: we are not reaching an integer near enough for the
119 // z value to be considered valid.
120 double m_chargeMinimalFractionalPart = 0.990;
121
122 // When performing deconvolutions based on the distance between peaks belong
123 // to the same charge state envelope, this value indicates the distance
124 // between the peaks that are used for the calculation. When the peaks are
125 // consecutive, the distance is 1. If there is one peak in between, the
126 // distance is 2.
127 int m_chargeStateEnvelopePeakSpan = 1;
128};
129
130
131} // namespace pappso
132
133
136
void resolvingPowerComputationSignal(const MassSpecTracePlotContext &context)
void keyPressEventSignal(const MassSpecTracePlotContext &context)
void massDeconvolutionSignal(const MassSpecTracePlotContext &context)
void mouseReleaseEventSignal(const MassSpecTracePlotContext &context)
#define PMSPP_LIB_DECL
Q_DECLARE_METATYPE(pappso::MassSpecTracePlotContext)
int massSpecTracePlotContextMetaTypeId
int massSpecTracePlotContextPtrMetaTypeId
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39