Loading...
Searching...
No Matches
pappso::MassSpecTracePlotContext Class Reference

`#include <massspectraceplotcontext.h>`

Inheritance diagram for pappso::MassSpecTracePlotContext:

## Public Member Functions

| MassSpecTracePlotContext ()
| MassSpecTracePlotContext (const MassSpecTracePlotContext &other)
virtual | ~MassSpecTracePlotContext ()
MassSpecTracePlotContext & | operator= (const BasePlotContext &other)
MassSpecTracePlotContext & | operator= (const MassSpecTracePlotContext &other)
QString | toString () const
Public Member Functions inherited from pappso::BasePlotContext
| BasePlotContext ()
| BasePlotContext (const BasePlotContext &other)
virtual | ~BasePlotContext ()
BasePlotContext & | operator= (const BasePlotContext &other)
DragDirections | recordDragDirections ()
QString | toString () const

## Public Attributes

int | m_lastZ = -1
double | m_lastMz = std::numeric_limits<double>::min()
double | m_lastTicIntensity = std::numeric_limits<double>::min()
double | m_lastMr = std::numeric_limits<double>::min()
double | m_lastResolvingPower = std::numeric_limits<double>::min()
Public Attributes inherited from pappso::BasePlotContext
DataKind | m_dataKind = DataKind::unset
bool | m_isMouseDragging = false
bool | m_wasMouseDragging = false
bool | m_isKeyBoardDragging = false
bool | m_isLeftPseudoButtonKeyPressed = false
bool | m_isRightPseudoButtonKeyPressed = false
bool | m_wassKeyBoardDragging = false
QPointF | m_startDragPoint
QPointF | m_currentDragPoint
QPointF | m_lastCursorHoveredPoint
DragDirections | m_dragDirections = DragDirections::NOT_SET
SelectionPolygon | m_selectionPolygon
double | m_selectRectangleWidth = 0
QCPRange | m_xRange
QCPRange | m_yRange
bool | m_wasClickOnXAxis = false
bool | m_wasClickOnYAxis = false
bool | m_isMeasuringDistance = false
double | m_xRegionRangeStart = std::numeric_limits<double>::min()
double | m_xRegionRangeEnd = std::numeric_limits<double>::min()
double | m_yRegionRangeStart = std::numeric_limits<double>::min()
double | m_yRegionRangeEnd = std::numeric_limits<double>::min()
double | m_xDelta = 0
double | m_yDelta = 0
int | m_pressedKeyCode
int | m_releasedKeyCode
Qt::KeyboardModifiers | m_keyboardModifiers
Qt::MouseButtons | m_lastPressedMouseButton
Qt::MouseButtons | m_lastReleasedMouseButton
Qt::MouseButtons | m_pressedMouseButtons
Qt::MouseButtons | m_mouseButtonsAtMousePress
Qt::MouseButtons | m_mouseButtonsAtMouseRelease

## Detailed Description

Definition at line 21 of file massspectraceplotcontext.h.

## Constructor & Destructor Documentation

## MassSpecTracePlotContext() [1/2]

pappso::MassSpecTracePlotContext::MassSpecTracePlotContext | ( |  | ) |

Definition at line 18 of file massspectraceplotcontext.cpp.

{
}

## MassSpecTracePlotContext() [2/2]

pappso::MassSpecTracePlotContext::MassSpecTracePlotContext | ( | const MassSpecTracePlotContext & | other | ) |

Definition at line 23 of file massspectraceplotcontext.cpp.

: BasePlotContext(other),
m_lastZ(other.m_lastZ),
m_lastMz(other.m_lastMz),
m_lastTicIntensity(other.m_lastTicIntensity),
m_lastMr(other.m_lastMr),
m_lastResolvingPower(other.m_lastResolvingPower)
{
// qDebug() << "Constructing MassSpecTracePlotContext by copy.";
}
pappso::BasePlotContext::BasePlotContext
BasePlotContext()
Definition baseplotcontext.cpp:9
pappso::MassSpecTracePlotContext::m_lastMz
double m_lastMz
Definition massspectraceplotcontext.h:33
pappso::MassSpecTracePlotContext::m_lastResolvingPower
double m_lastResolvingPower
Definition massspectraceplotcontext.h:36
pappso::MassSpecTracePlotContext::m_lastZ
int m_lastZ
Definition massspectraceplotcontext.h:32
pappso::MassSpecTracePlotContext::m_lastMr
double m_lastMr
Definition massspectraceplotcontext.h:35
pappso::MassSpecTracePlotContext::m_lastTicIntensity
double m_lastTicIntensity
Definition massspectraceplotcontext.h:34

## ~MassSpecTracePlotContext()

pappso::MassSpecTracePlotContext::~MassSpecTracePlotContext | ( |  | ) |

virtual

Definition at line 36 of file massspectraceplotcontext.cpp.

{
}

## Member Function Documentation

## operator=() [1/2]

MassSpecTracePlotContext & pappso::MassSpecTracePlotContext::operator= | ( | const BasePlotContext & | other | ) |

Definition at line 41 of file massspectraceplotcontext.cpp.

{
if(this == &other)
return *this;
// First the BasePlotContext members
m_dataKind = other.m_dataKind;
m_isMouseDragging = other.m_isMouseDragging;
m_wasMouseDragging = other.m_wasMouseDragging;
m_isKeyBoardDragging = other.m_isKeyBoardDragging;
m_isLeftPseudoButtonKeyPressed = other.m_isLeftPseudoButtonKeyPressed;
m_isRightPseudoButtonKeyPressed = other.m_isRightPseudoButtonKeyPressed;
m_wassKeyBoardDragging = other.m_wassKeyBoardDragging;
m_startDragPoint = other.m_startDragPoint;
m_currentDragPoint = other.m_currentDragPoint;
m_lastCursorHoveredPoint = other.m_lastCursorHoveredPoint;
m_selectionPolygon = other.m_selectionPolygon;
m_selectRectangleWidth = other.m_selectRectangleWidth;
// The effective range of the axes.
m_xRange = other.m_xRange;
m_yRange = other.m_yRange;
// Tell if the mouse move was started onto either axis, because that will
// condition if some calculations needs to be performed or not (for example,
// if the mouse cursor motion was started on an axis, there is no point to
// perform deconvolutions).
m_wasClickOnXAxis = other.m_wasClickOnXAxis;
m_wasClickOnYAxis = other.m_wasClickOnYAxis;
m_isMeasuringDistance = other.m_isMeasuringDistance;
// The user-selected region over the plot.
// Note that we cannot use QCPRange structures because these are normalized by
// QCustomPlot in such a manner that lower is actually < upper. But we need
// for a number of our calculations (specifically for the deconvolutions) to
// actually have the lower value be start drag point.x even if the drag
// direction was from right to left.
m_xRegionRangeStart = other.m_xRegionRangeStart;
m_xRegionRangeEnd = other.m_xRegionRangeEnd;
m_yRegionRangeStart = other.m_yRegionRangeStart;
m_yRegionRangeEnd = other.m_yRegionRangeEnd;
m_xDelta = other.m_xDelta;
m_yDelta = other.m_yDelta;
m_pressedKeyCode = other.m_pressedKeyCode;
m_releasedKeyCode = other.m_releasedKeyCode;
m_keyboardModifiers = other.m_keyboardModifiers;
m_lastPressedMouseButton = other.m_lastPressedMouseButton;
m_lastReleasedMouseButton = other.m_lastReleasedMouseButton;
m_pressedMouseButtons = other.m_pressedMouseButtons;
m_mouseButtonsAtMousePress = other.m_mouseButtonsAtMousePress;
m_mouseButtonsAtMouseRelease = other.m_mouseButtonsAtMouseRelease;
return *this;
}
pappso::BasePlotContext::m_xRegionRangeStart
double m_xRegionRangeStart
Definition baseplotcontext.h:81
pappso::BasePlotContext::m_startDragPoint
QPointF m_startDragPoint
Definition baseplotcontext.h:54
pappso::BasePlotContext::m_xDelta
double m_xDelta
Definition baseplotcontext.h:87
pappso::BasePlotContext::m_mouseButtonsAtMousePress
Qt::MouseButtons m_mouseButtonsAtMousePress
Definition baseplotcontext.h:100
pappso::BasePlotContext::m_selectionPolygon
SelectionPolygon m_selectionPolygon
Definition baseplotcontext.h:59
pappso::BasePlotContext::m_wasClickOnXAxis
bool m_wasClickOnXAxis
Definition baseplotcontext.h:70
pappso::BasePlotContext::m_keyboardModifiers
Qt::KeyboardModifiers m_keyboardModifiers
Definition baseplotcontext.h:93
pappso::BasePlotContext::m_pressedKeyCode
int m_pressedKeyCode
Definition baseplotcontext.h:90
pappso::BasePlotContext::m_lastPressedMouseButton
Qt::MouseButtons m_lastPressedMouseButton
Definition baseplotcontext.h:95
pappso::BasePlotContext::m_isMouseDragging
bool m_isMouseDragging
Definition baseplotcontext.h:46
pappso::BasePlotContext::m_xRange
QCPRange m_xRange
Definition baseplotcontext.h:63
pappso::BasePlotContext::m_isMeasuringDistance
bool m_isMeasuringDistance
Definition baseplotcontext.h:73
pappso::BasePlotContext::m_lastCursorHoveredPoint
QPointF m_lastCursorHoveredPoint
Definition baseplotcontext.h:56
pappso::BasePlotContext::m_currentDragPoint
QPointF m_currentDragPoint
Definition baseplotcontext.h:55
pappso::BasePlotContext::m_yDelta
double m_yDelta
Definition baseplotcontext.h:88
pappso::BasePlotContext::m_yRegionRangeStart
double m_yRegionRangeStart
Definition baseplotcontext.h:84
pappso::BasePlotContext::m_isRightPseudoButtonKeyPressed
bool m_isRightPseudoButtonKeyPressed
Definition baseplotcontext.h:51
pappso::BasePlotContext::m_pressedMouseButtons
Qt::MouseButtons m_pressedMouseButtons
Definition baseplotcontext.h:98
pappso::BasePlotContext::m_yRange
QCPRange m_yRange
Definition baseplotcontext.h:64
pappso::BasePlotContext::m_mouseButtonsAtMouseRelease
Qt::MouseButtons m_mouseButtonsAtMouseRelease
Definition baseplotcontext.h:101
pappso::BasePlotContext::m_releasedKeyCode
int m_releasedKeyCode
Definition baseplotcontext.h:91
pappso::BasePlotContext::m_isLeftPseudoButtonKeyPressed
bool m_isLeftPseudoButtonKeyPressed
Definition baseplotcontext.h:50
pappso::BasePlotContext::m_dataKind
DataKind m_dataKind
Definition baseplotcontext.h:44
pappso::BasePlotContext::m_lastReleasedMouseButton
Qt::MouseButtons m_lastReleasedMouseButton
Definition baseplotcontext.h:96
pappso::BasePlotContext::m_wasMouseDragging
bool m_wasMouseDragging
Definition baseplotcontext.h:47
pappso::BasePlotContext::m_wassKeyBoardDragging
bool m_wassKeyBoardDragging
Definition baseplotcontext.h:52
pappso::BasePlotContext::m_yRegionRangeEnd
double m_yRegionRangeEnd
Definition baseplotcontext.h:85
pappso::BasePlotContext::m_xRegionRangeEnd
double m_xRegionRangeEnd
Definition baseplotcontext.h:82
pappso::BasePlotContext::m_selectRectangleWidth
double m_selectRectangleWidth
Definition baseplotcontext.h:60
pappso::BasePlotContext::m_wasClickOnYAxis
bool m_wasClickOnYAxis
Definition baseplotcontext.h:71
pappso::BasePlotContext::m_isKeyBoardDragging
bool m_isKeyBoardDragging
Definition baseplotcontext.h:49

References pappso::BasePlotContext::m_currentDragPoint, pappso::BasePlotContext::m_dataKind, pappso::BasePlotContext::m_isKeyBoardDragging, pappso::BasePlotContext::m_isLeftPseudoButtonKeyPressed, pappso::BasePlotContext::m_isMeasuringDistance, pappso::BasePlotContext::m_isMouseDragging, pappso::BasePlotContext::m_isRightPseudoButtonKeyPressed, pappso::BasePlotContext::m_keyboardModifiers, pappso::BasePlotContext::m_lastCursorHoveredPoint, pappso::BasePlotContext::m_lastPressedMouseButton, pappso::BasePlotContext::m_lastReleasedMouseButton, pappso::BasePlotContext::m_mouseButtonsAtMousePress, pappso::BasePlotContext::m_mouseButtonsAtMouseRelease, pappso::BasePlotContext::m_pressedKeyCode, pappso::BasePlotContext::m_pressedMouseButtons, pappso::BasePlotContext::m_releasedKeyCode, pappso::BasePlotContext::m_selectionPolygon, pappso::BasePlotContext::m_selectRectangleWidth, pappso::BasePlotContext::m_startDragPoint, pappso::BasePlotContext::m_wasClickOnXAxis, pappso::BasePlotContext::m_wasClickOnYAxis, pappso::BasePlotContext::m_wasMouseDragging, pappso::BasePlotContext::m_wassKeyBoardDragging, pappso::BasePlotContext::m_xDelta, pappso::BasePlotContext::m_xRange, pappso::BasePlotContext::m_xRegionRangeEnd, pappso::BasePlotContext::m_xRegionRangeStart, pappso::BasePlotContext::m_yDelta, pappso::BasePlotContext::m_yRange, pappso::BasePlotContext::m_yRegionRangeEnd, and pappso::BasePlotContext::m_yRegionRangeStart.

## operator=() [2/2]

MassSpecTracePlotContext & pappso::MassSpecTracePlotContext::operator= | ( | const MassSpecTracePlotContext & | other | ) |

Definition at line 111 of file massspectraceplotcontext.cpp.

{
if(this == &other)
return *this;
// First the BasePlotContext members
m_dataKind = other.m_dataKind;
m_isMouseDragging = other.m_isMouseDragging;
m_wasMouseDragging = other.m_wasMouseDragging;
m_isKeyBoardDragging = other.m_isKeyBoardDragging;
m_isLeftPseudoButtonKeyPressed = other.m_isLeftPseudoButtonKeyPressed;
m_isRightPseudoButtonKeyPressed = other.m_isRightPseudoButtonKeyPressed;
m_wassKeyBoardDragging = other.m_wassKeyBoardDragging;
m_startDragPoint = other.m_startDragPoint;
m_currentDragPoint = other.m_currentDragPoint;
m_lastCursorHoveredPoint = other.m_lastCursorHoveredPoint;
m_selectionPolygon = other.m_selectionPolygon;
m_selectRectangleWidth = other.m_selectRectangleWidth;
// The effective range of the axes.
m_xRange = other.m_xRange;
m_yRange = other.m_yRange;
// Tell if the mouse move was started onto either axis, because that will
// condition if some calculations needs to be performed or not (for example,
// if the mouse cursor motion was started on an axis, there is no point to
// perform deconvolutions).
m_wasClickOnXAxis = other.m_wasClickOnXAxis;
m_wasClickOnYAxis = other.m_wasClickOnYAxis;
m_isMeasuringDistance = other.m_isMeasuringDistance;
// The user-selected region over the plot.
// Note that we cannot use QCPRange structures because these are normalized by
// QCustomPlot in such a manner that lower is actually < upper. But we need
// for a number of our calculations (specifically for the deconvolutions) to
// actually have the lower value be start drag point.x even if the drag
// direction was from right to left.
m_xRegionRangeStart = other.m_xRegionRangeStart;
m_xRegionRangeEnd = other.m_xRegionRangeEnd;
m_yRegionRangeStart = other.m_yRegionRangeStart;
m_yRegionRangeEnd = other.m_yRegionRangeEnd;
m_xDelta = other.m_xDelta;
m_yDelta = other.m_yDelta;
m_pressedKeyCode = other.m_pressedKeyCode;
m_releasedKeyCode = other.m_releasedKeyCode;
m_keyboardModifiers = other.m_keyboardModifiers;
m_lastPressedMouseButton = other.m_lastPressedMouseButton;
m_lastReleasedMouseButton = other.m_lastReleasedMouseButton;
m_pressedMouseButtons = other.m_pressedMouseButtons;
m_mouseButtonsAtMousePress = other.m_mouseButtonsAtMousePress;
m_mouseButtonsAtMouseRelease = other.m_mouseButtonsAtMouseRelease;
// Second the mass spec trace plot-specific members
m_lastZ = other.m_lastZ;
m_lastMz = other.m_lastMz;
m_lastTicIntensity = other.m_lastTicIntensity;
m_lastMr = other.m_lastMr;
m_lastResolvingPower = other.m_lastResolvingPower;
return *this;
}

References pappso::BasePlotContext::m_currentDragPoint, pappso::BasePlotContext::m_dataKind, pappso::BasePlotContext::m_isKeyBoardDragging, pappso::BasePlotContext::m_isLeftPseudoButtonKeyPressed, pappso::BasePlotContext::m_isMeasuringDistance, pappso::BasePlotContext::m_isMouseDragging, pappso::BasePlotContext::m_isRightPseudoButtonKeyPressed, pappso::BasePlotContext::m_keyboardModifiers, pappso::BasePlotContext::m_lastCursorHoveredPoint, m_lastMr, m_lastMz, pappso::BasePlotContext::m_lastPressedMouseButton, pappso::BasePlotContext::m_lastReleasedMouseButton, m_lastResolvingPower, m_lastTicIntensity, m_lastZ, pappso::BasePlotContext::m_mouseButtonsAtMousePress, pappso::BasePlotContext::m_mouseButtonsAtMouseRelease, pappso::BasePlotContext::m_pressedKeyCode, pappso::BasePlotContext::m_pressedMouseButtons, pappso::BasePlotContext::m_releasedKeyCode, pappso::BasePlotContext::m_selectionPolygon, pappso::BasePlotContext::m_selectRectangleWidth, pappso::BasePlotContext::m_startDragPoint, pappso::BasePlotContext::m_wasClickOnXAxis, pappso::BasePlotContext::m_wasClickOnYAxis, pappso::BasePlotContext::m_wasMouseDragging, pappso::BasePlotContext::m_wassKeyBoardDragging, pappso::BasePlotContext::m_xDelta, pappso::BasePlotContext::m_xRange, pappso::BasePlotContext::m_xRegionRangeEnd, pappso::BasePlotContext::m_xRegionRangeStart, pappso::BasePlotContext::m_yDelta, pappso::BasePlotContext::m_yRange, pappso::BasePlotContext::m_yRegionRangeEnd, and pappso::BasePlotContext::m_yRegionRangeStart.

## toString()

QString pappso::MassSpecTracePlotContext::toString | ( |  | ) | const

Definition at line 189 of file massspectraceplotcontext.cpp.

{
QString text("Base context:\n");
text += BasePlotContext::toString();
text += "\n";
text += "Mass spectrum trace plot context\n";
text += QString("last z: %1").arg(m_lastZ);
text += QString("last m/z: %1").arg(m_lastMz, 0, 'f', 6);
text += QString("last TIC intensity: %1").arg(m_lastTicIntensity, 0, 'g', 0);
text += QString("last Mr: %1").arg(m_lastMr, 0, 'f', 6);
text +=
QString("last resolving power: %1").arg(m_lastResolvingPower, 0, 'g', 0);
text += "\n";
return text;
}
pappso::BasePlotContext::toString
QString toString() const
Definition baseplotcontext.cpp:175

References m_lastMr, m_lastMz, m_lastResolvingPower, m_lastTicIntensity, m_lastZ, and pappso::BasePlotContext::toString().

## Member Data Documentation

## m_lastMr

double pappso::MassSpecTracePlotContext::m_lastMr = std::numeric_limits<double>::min()

Definition at line 35 of file massspectraceplotcontext.h.

Referenced by pappso::MassSpecTracePlotWidget::deconvoluteChargedState(), pappso::MassSpecTracePlotWidget::deconvoluteIsotopicCluster(), operator=(), and toString().

## m_lastMz

double pappso::MassSpecTracePlotContext::m_lastMz = std::numeric_limits<double>::min()

Definition at line 33 of file massspectraceplotcontext.h.

Referenced by pappso::MassSpecTracePlotWidget::deconvoluteChargedState(), pappso::MassSpecTracePlotWidget::deconvoluteIsotopicCluster(), operator=(), and toString().

## m_lastResolvingPower

double pappso::MassSpecTracePlotContext::m_lastResolvingPower = std::numeric_limits<double>::min()

Definition at line 36 of file massspectraceplotcontext.h.

Referenced by pappso::MassSpecTracePlotWidget::computeResolvingPower(), operator=(), and toString().

## m_lastTicIntensity

double pappso::MassSpecTracePlotContext::m_lastTicIntensity = std::numeric_limits<double>::min()

Definition at line 34 of file massspectraceplotcontext.h.

Referenced by pappso::MassSpecTracePlotWidget::deconvoluteChargedState(), pappso::MassSpecTracePlotWidget::deconvoluteIsotopicCluster(), operator=(), and toString().

## m_lastZ

int pappso::MassSpecTracePlotContext::m_lastZ = -1

Definition at line 32 of file massspectraceplotcontext.h.

Referenced by pappso::MassSpecTracePlotWidget::deconvoluteChargedState(), pappso::MassSpecTracePlotWidget::deconvoluteIsotopicCluster(), operator=(), and toString().

The documentation for this class was generated from the following files:

- pappsomspp/widget/plotwidget/massspectraceplotcontext.h
- pappsomspp/widget/plotwidget/massspectraceplotcontext.cpp