libpappsomspp
Library for mass spectrometry
massspectraceplotwidget.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 
36 // For the proton mass
37 #include "../../types.h"
38 
40 #include "../../pappsoexception.h"
41 
42 
44  qRegisterMetaType<pappso::MassSpecTracePlotContext>(
45  "pappso::MassSpecTracePlotContext");
46 
48  qRegisterMetaType<pappso::MassSpecTracePlotContext *>(
49  "pappso::MassSpecTracePlotContext *");
50 
51 
52 namespace pappso
53 {
54 
55 
56 QString
58 {
59  QString text("Base context:\n");
60 
61  text += baseContext.toString();
62 
63  text += "\n";
64 
65  text += QString("last z: %1").arg(lastZ);
66  text += QString("last m/z: %1").arg(lastMz, 0, 'f', 6);
67  text += QString("last TIC intensity: %1").arg(lastTicIntensity, 0, 'g', 0);
68  text += QString("last Mr: %1").arg(lastMr, 0, 'f', 6);
69  text +=
70  QString("last resolving power: %1").arg(lastResolvingPower, 0, 'g', 0);
71 
72  text += "\n";
73 
74  return text;
75 }
76 
78  : BaseTracePlotWidget(parent)
79 {
80  // Set the base context to be of kind DataKind::mz;
81 
83 
84  // And then initialize ours with the base class' one.
86 
87  // qDebug() << "Data kind:" <<
88  // static_cast<int>(m_context.baseContext.dataKind);
89 }
90 
92  const QString &x_axis_label,
93  const QString &y_axis_label)
94  : BaseTracePlotWidget(parent, x_axis_label, y_axis_label)
95 {
96  // Set the base context to be of kind DataKind::mz;
97 
99 
100  // And then initialize ours with the base class' one.
102 
103  // qDebug() << "Data kind:" <<
104  // static_cast<int>(m_context.baseContext.dataKind);
105 }
106 
107 
109 {
110 }
111 
112 
113 //! Set the \c m_pressedKeyCode to the key code in \p event.
114 void
116 {
117  // qDebug() << "ENTER";
119 
120  // Before working on the various data belonging to the base context, we need
121  // to get it from the base class and refresh our local context with it.
123 
124  // qDebug() << "Going to emit keyPressEventSignal(m_context);";
125 
131 }
132 
133 
134 //! Handle specific key codes and trigger respective actions.
135 void
137 {
139 
140  // Before working on the various data belonging to the base context, we need
141  // to get it from the base class and refresh our local context with it.
143 }
144 
145 
146 //! Handle mouse movements, in particular record all the last visited points.
147 /*!
148 
149  This function is reponsible for storing at each time the last visited point
150  in the graph. Here, point is intended as any x/y coordinate in the plot
151  widget viewport, not a graph point.
152 
153  The stored values are then the basis for a large set of calculations
154  throughout all the plot widget.
155 
156  \param pointer to QMouseEvent from which to retrieve the coordinates of the
157  visited viewport points.
158  */
159 void
161 {
163 
164  // Before working on the various data belonging to the base context, we need
165  // to get it from the base class and refresh our local context with it.
167 }
168 
169 
170 void
172 {
174 
175  // Before working on the various data belonging to the base context, we need
176  // to get it from the base class and refresh our local context with it.
178 }
179 
180 
181 void
183 {
185 
186  // Before working on the various data belonging to the base context, we need
187  // to get it from the base class and refresh our local context with it.
189 
190  if(m_context.baseContext.mouseButtonsAtMousePress & Qt::LeftButton)
191  {
193  return;
194 
195  // qDebug() << "lastMovingMouseButtons:"
196  //<< m_context.baseContext.lastMovingMouseButtons;
197 
198  deconvolute();
200  }
201 }
202 
203 
204 //! Record the clicks of the mouse.
205 void
207 {
209 
210  // Before working on the various data belonging to the base context, we need
211  // to get it from the base class and refresh our local context with it.
213 }
214 
215 
216 //! React to the release of the mouse buttons.
217 void
219 {
221 
222  // Before working on the various data belonging to the base context, we need
223  // to get it from the base class and refresh our local context with it.
225 }
226 
227 
230 {
232 
233  return m_context;
234 }
235 
236 
237 void
239  double charge_fractional_part)
240 {
241  m_chargeMinimalFractionalPart = charge_fractional_part;
242 }
243 
244 
245 double
247 {
249 }
250 
251 
252 void
254 {
256 }
257 
258 
259 int
261 {
263 }
264 
265 
266 //! Deconvolute the mass peaks into charge and molecular mass.
267 bool
269 {
270 
271  // There are two situations: when the user is deconvoluting on the
272  // basis of the distance between two consecutive peaks of a same
273  // isotopic cluster or when the user deconvolutes on the basis of two
274  // different charged-stated peaks that belong to the same envelope.
275 
276  // We can tell the difference because in the first case the xDelta
277  // should be less than 1. In the other case, of course the difference
278  // is much greater than 1.
279 
280  // In order to do the deconvolutions, we need to know what is the tolerance
281  // on the fractional part of the deconvoluted charge value. This value is set
282  // in the parent window's double spin box.
283 
284  if(fabs(m_context.baseContext.xDelta) >= 0 &&
285  fabs(m_context.baseContext.xDelta) <= 1.1)
286  {
287  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
288  //<< "m_xDelta:" << m_context.baseContext.xDelta
289  //<< "trying isotope-based deconvolution.";
290 
292  }
293 
294  // If not deconvoluting on the basis of the isotopic cluster, then:
295 
297 }
298 
299 
300 //! Deconvolute the mass peaks into charge and molecular mass.
301 /*!
302 
303  This is one of two methods to deconvolute mass data into a charge value and
304  a Mr value. The method implemented in this function is based on the charge
305  state envelope offered by the mass spectrum (most often for polymers of a
306  reasonable size).
307 
308  \param span value representing the number of peaks of the charge state
309  envelope that are spanned by the user selection. Defaults to 1, that is, the
310  span encompasses two \e consecutive mass peaks of a given charge state
311  envelope.
312 
313  Set m_lastMz, m_lastZ and m_lastMass.
314 
315  \return true if the deconvolution could be performed, false otherwise.
316  */
317 bool
319 {
320  // We assume that we are dealing with two successive (if span is 1) mass
321  // peaks belonging to a given charge state family.
322 
323  // We call span the number of intervals in a given charge state envelope
324  // that separate the initial peak (lowerMz) from the last peak (upperMz).
325  // That parameter defaults to 1, that is the two peaks are immediately
326  // consecutive, that is, there is only one interval.
327 
328  // We use the m_contex.baseContext.xRegionRange structure that is unsorted.
329  // That is, lower is the start drag point.x and upper is the current drag
330  // point.x. If dragging occurs from left to right, start.x < cur.x.
331  // We use the unsorted values, because we need to know in which direction
332  // the user has drug the mouse, because we want to provide the Mr value
333  // for the peak currently under the mouse cursor, that is under
334  // currentDragPoint, that is the value in
335  // m_context.baseContext.xRegionRange.upper.
336 
337  double startMz = m_context.baseContext.xRegionRangeStart;
338  double curMz = m_context.baseContext.xRegionRangeEnd;
339 
340  // qDebug() << "startMz:" << startMz << "curMz:" << curMz;
341 
342  if(startMz == curMz)
343  {
344  m_context.lastZ = -1;
345  m_context.lastMz = std::numeric_limits<double>::min();
346  m_context.lastTicIntensity = std::numeric_limits<double>::min();
347  m_context.lastMr = std::numeric_limits<double>::min();
348 
349  return false;
350  }
351 
352  // We need to be aware that the status bar of the window that contains
353  // this plot widget shows the cursor position realtime, and that cursor
354  // position is the m_currentDragPoint.x value, that is, curMz. Thus, we need
355  // to make the calculations with the charge being the one of the polymer under
356  // the cursor position. This is tricky because it changes when the user
357  // switches drag senses: from left to right and right to left.
358  // The way z is calculated always makes it the charge of the highest mz
359  // value. So knowing this, depending on the drag direction we'll have to take
360  // curMz and apply to it either z charge (left to right drag) or (z+span)
361  // charge (right to left).
362 
363  // Make sure lower is actually lower, even if drag is from right to left.
364  // This is only to have a single charge calculation.
365  double lowerMz;
366  double upperMz;
367 
368  if(startMz < curMz)
369  {
370  lowerMz = startMz;
371  upperMz = curMz;
372  }
373  else
374  {
375  lowerMz = curMz;
376  upperMz = startMz;
377  }
378 
379  double chargeTemp = ((lowerMz * span) - span) / (upperMz - lowerMz);
380 
381  // Make a judicious roundup.
382 
383  double chargeIntPart;
384  double chargeFracPart = modf(chargeTemp, &chargeIntPart);
385 
386  // When calculating the charge of the ion, very rarely does it provide a
387  // perfect integer value. Most often (if deconvolution is for bona fide
388  // peaks belonging to the same charge state envelope) that value is with
389  // either a large fractional part or a very small fractional part. What we
390  // test here, it that fractional part. If it is greater than
391  // m_chargeMinimalFractionalPart, then we simply round up to the next integer
392  // value (that is, chargeIntPart = 27 and chargeFracPart 0.995, then we
393  // set charge to 28). If it is lesser or equal to (1 -
394  // m_chargeMinimalFractionalPart /* that is >= 0.01 */, then we let
395  // chargeIntPart unmodified (that is, chargeIntPart = 29 and
396  // chargeFracPart 0.01, then we set charge to 29). If chargeFracPart is in
397  // between (1 - m_chargeMinimalFractionalPart) and
398  // m_chargeMinimalFractionalPart, then we consider that the peaks do not
399  // belong to the same charge state envelope.
400 
401  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__
402  //<< "Charge:" << chargeIntPart
403  //<< "Charge fractional part: " << chargeFracPart;
404 
405 
406  if(chargeFracPart >=
407  (1 - m_chargeMinimalFractionalPart /* that is >= 0.01 */) &&
408  chargeFracPart <= m_chargeMinimalFractionalPart /* that is <= 0.99 */)
409  {
410  m_context.lastZ = -1;
411  m_context.lastMz = std::numeric_limits<double>::min();
412  m_context.lastTicIntensity = std::numeric_limits<double>::min();
413  m_context.lastMr = std::numeric_limits<double>::min();
414 
415  // qDebug() << __FILE__ << __LINE__
416  //<< "Not a charge state family peak,"
417  //<< "returning from deconvoluteChargeState";
418 
419  return false;
420  }
421 
422  if(chargeFracPart > m_chargeMinimalFractionalPart)
423  m_context.lastZ = chargeIntPart + 1;
424  else
425  m_context.lastZ = chargeIntPart;
426 
427  // Now, to actually compute the molecular mass based on the charge and on
428  // the currently displayed m/z value, we need to have some thinking:
429 
430  if(startMz < curMz)
431  {
432  // The drag was from left to right, that is curMz is greater than
433  // startMz. Fine, the z value is effectively the charge of the ion at
434  // curMz. Easy, no charge value modification here.
435  }
436  else
437  {
438  // The drag was from right to left, that is curMz is less than startMz.
439  // So we want to show the charge of the curMz, that is, z + span.
440  m_context.lastZ = m_context.lastZ + span;
441  }
442 
443  m_context.lastMz = curMz;
444  m_context.lastMr =
446 
447  // qDebug() << __FILE__ << __LINE__
448  //<< "startMz:" << QString("%1").arg(startMz, 0, 'f', 6)
449  //<< "m_lastMz (curMz):"
450  //<< QString("%1").arg(m_context.lastMz, 0, 'f', 6)
451  //<< "m_lastMass:" << QString("%1").arg(m_context.lastMr, 0, 'f', 6)
452  //<< "m_lastZ:" << QString("%1").arg(m_context.lastZ);
453 
454  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
455  //<< "returning true";
456 
457  // The m_context was refreshed with the base class context in the calling
458  // chain.
460 
461  return true;
462 }
463 
464 
465 //! Deconvolute the mass peaks into charge and molecular mass.
466 /*!
467 
468  This is one of two methods to deconvolute mass data into a charge value and
469  a Mr value. The method implemented in this function is based on the distance
470  that separates two immediately consecutive peaks of an isotopic cluster.
471  This method can be used as long as the instrument produced data with a
472  resolution sufficient to separate reasonably well the different peaks of an
473  isotopic cluster.
474 
475  Set m_lastMz, m_lastZ and m_lastMass.
476 
477  \return true if the deconvolution could be performed, false otherwise.
478  */
479 bool
481 {
482 
485  {
486  // qDebug() << __FILE__ << __LINE__
487  //<< "Same xRegionRange.upper and xRegionRange.lower:"
488  //<< "returning from deconvoluteIsotopicCluster";
489 
490  return false;
491  }
492 
493  double chargeTemp = 1 / fabs(m_context.baseContext.xDelta);
494 
495  // Make a judicious roundup.
496  double chargeIntPart;
497  double chargeFracPart = modf(chargeTemp, &chargeIntPart);
498 
499  // qDebug() << "m_xDelta:" << m_context.baseContext.xDelta
500  //<< "chargeTemp:" << QString("%1").arg(chargeTemp, 0, 'f', 6)
501  //<< "chargeIntPart:" << chargeIntPart
502  //<< "chargeFracPart:" << QString("%1").arg(chargeFracPart, 0, 'f', 6)
503  //<< "m_chargeMinimalFractionalPart:" << m_chargeMinimalFractionalPart;
504 
505  if(chargeFracPart >= (1 - m_chargeMinimalFractionalPart) &&
506  chargeFracPart <= m_chargeMinimalFractionalPart)
507  {
508  m_context.lastZ = -1;
509  m_context.lastMz = std::numeric_limits<double>::min();
510  m_context.lastTicIntensity = std::numeric_limits<double>::min();
511  m_context.lastMr = std::numeric_limits<double>::min();
512 
513  // qDebug() << "Not in a isotopic cluster peak:"
514  //<< "returning from deconvoluteIsotopicCluster";
515 
516  return false;
517  }
518 
519  if(chargeFracPart > m_chargeMinimalFractionalPart)
520  {
521  m_context.lastZ = chargeIntPart + 1;
522 
523  // qDebug() << "chargeFracPart > m_chargeMinimalFractionalPart -> m_lastZ
524  // = "
525  //<< m_context.lastZ;
526  }
527  else
528  {
529  m_context.lastZ = chargeIntPart;
530 
531  // qDebug()
532  //<< "chargeFracPart <= m_chargeMinimalFractionalPart -> m_lastZ = "
533  //<< m_context.lastZ;
534  }
535 
536  // Now that we have the charge in the form of an int, we can compute the
537  // Mr of the lightest isotopic cluster peak (the one that has the lowest x
538  // value). That value is stored in m_xRangeLower.
539 
540  // We need to sort the xRegionRange before being certain that lower is indeed
541  // the left value of the drag span.
542 
545 
546  m_context.lastMr =
548 
549  // qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "()"
550  //<< "returning true";
551 
552  // The m_context was refreshed with the base class context in the calling
553  // chain.
555 
556  return true;
557 }
558 
559 
560 bool
562 {
563 
564  // m_xRangeLower and m_xRangeUpper and m_xDelta (in fabs() form) have been set
565  // during mouve movement handling. Note that the range values *are
566  // sorted*.
567 
569  {
570  m_context.lastResolvingPower = std::numeric_limits<double>::min();
571 
572  return false;
573  }
574 
575  // Resolving power is m/z / Delta(m/z), for singly-charged species.
576 
578  (std::min<double>(m_context.baseContext.xRegionRangeStart,
580  (m_context.baseContext.xDelta / 2)) /
582 
583  // The m_context was refreshed with the base class context in the calling
584  // chain.
586 
587  return true;
588 }
589 
590 
591 } // namespace pappso
pappso::MassSpecTracePlotContext::lastTicIntensity
double lastTicIntensity
Definition: massspectraceplotwidget.h:62
pappso::BasePlotContext::xRegionRangeStart
double xRegionRangeStart
Definition: baseplotwidget.h:104
pappso::BasePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event)
Definition: baseplotwidget.cpp:1072
pappso::MassSpecTracePlotWidget::deconvoluteIsotopicCluster
bool deconvoluteIsotopicCluster()
Deconvolute the mass peaks into charge and molecular mass.
Definition: massspectraceplotwidget.cpp:480
pappso::MassSpecTracePlotContext::lastZ
int lastZ
Definition: massspectraceplotwidget.h:60
pappso::BaseTracePlotWidget
Definition: basetraceplotwidget.h:60
pappso::BasePlotContext::dataKind
DataKind dataKind
Definition: baseplotwidget.h:71
pappso::MassSpecTracePlotWidget::getChargeStateEnvelopePeakSpan
int getChargeStateEnvelopePeakSpan() const
Definition: massspectraceplotwidget.cpp:260
pappso::BasePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition: baseplotwidget.cpp:774
pappso::BasePlotContext::currentDragPoint
QPointF currentDragPoint
Definition: baseplotwidget.h:82
pappso::MassSpecTracePlotWidget::deconvoluteChargedState
bool deconvoluteChargedState(int span=1)
Deconvolute the mass peaks into charge and molecular mass.
Definition: massspectraceplotwidget.cpp:318
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
Definition: aa.cpp:39
pappso::MassSpecTracePlotWidget::getChargeMinimalFractionalPart
double getChargeMinimalFractionalPart() const
Definition: massspectraceplotwidget.cpp:246
pappso::MassSpecTracePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor() override
Definition: massspectraceplotwidget.cpp:171
pappso::DataKind::mz
@ mz
m/z
pappso::DataPoint
Definition: datapoint.h:21
pappso::MassSpecTracePlotWidget::keyPressEventSignal
void keyPressEventSignal(const MassSpecTracePlotContext &context)
pappso::BasePlotContext::isMeasuringDistance
bool isMeasuringDistance
Definition: baseplotwidget.h:96
pappso::MPROTON
const pappso_double MPROTON(1.007276466879)
pappso::MassSpecTracePlotWidget::testKeyPressEventSignal
void testKeyPressEventSignal(pappso::MassSpecTracePlotContext context)
pappso::BasePlotContext::mouseButtonsAtMousePress
Qt::MouseButtons mouseButtonsAtMousePress
Definition: baseplotwidget.h:123
pappso::BasePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor()
Definition: baseplotwidget.cpp:1155
massSpecTracePlotContextMetaTypeId
int massSpecTracePlotContextMetaTypeId
Definition: massspectraceplotwidget.cpp:43
pappso::MassSpecTracePlotWidget::MassSpecTracePlotWidget
MassSpecTracePlotWidget(QWidget *parent=0)
Definition: massspectraceplotwidget.cpp:77
pappso::MassSpecTracePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event) override
React to the release of the mouse buttons.
Definition: massspectraceplotwidget.cpp:218
pappso::MassSpecTracePlotContext::lastMr
double lastMr
Definition: massspectraceplotwidget.h:63
pappso::MassSpecTracePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event) override
Set the m_pressedKeyCode to the key code in event.
Definition: massspectraceplotwidget.cpp:115
pappso::BasePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event)
Definition: baseplotwidget.cpp:879
pappso::BasePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
KEYBOARD-related EVENTS.
Definition: baseplotwidget.cpp:492
pappso::MassSpecTracePlotWidget::resolvingPowerComputationSignal
void resolvingPowerComputationSignal(const MassSpecTracePlotContext &context)
pappso::MassSpecTracePlotContext
Definition: massspectraceplotwidget.h:57
pappso::MassSpecTracePlotContext::baseContext
BasePlotContext baseContext
Definition: massspectraceplotwidget.h:58
pappso::BasePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor()
Definition: baseplotwidget.cpp:1109
pappso::BasePlotContext::toString
QString toString() const
Definition: baseplotwidget.cpp:50
massspectraceplotwidget.h
pappso::MassSpecTracePlotWidget::computeResolvingPower
bool computeResolvingPower()
Definition: massspectraceplotwidget.cpp:561
pappso::MassSpecTracePlotWidget::m_context
MassSpecTracePlotContext m_context
Definition: massspectraceplotwidget.h:130
pappso::MassSpecTracePlotWidget::setChargeMinimalFractionalPart
void setChargeMinimalFractionalPart(double charge_fractional_part)
Definition: massspectraceplotwidget.cpp:238
pappso::MassSpecTracePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor() override
Definition: massspectraceplotwidget.cpp:182
pappso::MassSpecTracePlotWidget::~MassSpecTracePlotWidget
virtual ~MassSpecTracePlotWidget()
Definition: massspectraceplotwidget.cpp:108
pappso::MassSpecTracePlotContext::lastResolvingPower
double lastResolvingPower
Definition: massspectraceplotwidget.h:64
pappso::MassSpecTracePlotWidget::m_chargeStateEnvelopePeakSpan
int m_chargeStateEnvelopePeakSpan
Definition: massspectraceplotwidget.h:144
pappso::MassSpecTracePlotContext::lastMz
double lastMz
Definition: massspectraceplotwidget.h:61
pappso::BasePlotContext::xRegionRangeEnd
double xRegionRangeEnd
Definition: baseplotwidget.h:105
pappso::MassSpecTracePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event) override
Record the clicks of the mouse.
Definition: massspectraceplotwidget.cpp:206
pappso::MassSpecTracePlotWidget::m_chargeMinimalFractionalPart
double m_chargeMinimalFractionalPart
Definition: massspectraceplotwidget.h:137
pappso::BasePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event)
Handle specific key codes and trigger respective actions.
Definition: baseplotwidget.cpp:521
massSpecTracePlotContextPtrMetaTypeId
int massSpecTracePlotContextPtrMetaTypeId
Definition: massspectraceplotwidget.cpp:47
pappso::MassSpecTracePlotWidget::newKeyPressEventSignal
void newKeyPressEventSignal(pappso::DataPoint context)
pappso::MassSpecTracePlotWidget::deconvolute
bool deconvolute()
Deconvolute the mass peaks into charge and molecular mass.
Definition: massspectraceplotwidget.cpp:268
pappso::MassSpecTracePlotWidget::setChargeStateEnvelopePeakSpan
void setChargeStateEnvelopePeakSpan(int interval)
Definition: massspectraceplotwidget.cpp:253
pappso::MassSpecTracePlotWidget::refreshBaseContext
const MassSpecTracePlotContext & refreshBaseContext() const
Definition: massspectraceplotwidget.cpp:229
pappso::MassSpecTracePlotContext::toString
QString toString() const
Definition: massspectraceplotwidget.cpp:57
pappso::MassSpecTracePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event) override
Handle mouse movements, in particular record all the last visited points.
Definition: massspectraceplotwidget.cpp:160
pappso::MassSpecTracePlotWidget::massDeconvolutionSignal
void massDeconvolutionSignal(const MassSpecTracePlotContext &context)
pappso::BasePlotContext::xDelta
double xDelta
Definition: baseplotwidget.h:110
pappso::BasePlotWidget::m_context
BasePlotContext m_context
Definition: baseplotwidget.h:312
pappso::MassSpecTracePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event) override
Handle specific key codes and trigger respective actions.
Definition: massspectraceplotwidget.cpp:136