libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::MassSpecTracePlotContext Class Reference

#include <massspectraceplotcontext.h>

Inheritance diagram for pappso::MassSpecTracePlotContext:
pappso::BasePlotContext

Public Member Functions

Q_INVOKABLE MassSpecTracePlotContext (QObject *parent=nullptr)
 
virtual ~MassSpecTracePlotContext ()
 
Q_INVOKABLE MassSpecTracePlotContextclone (QObject *parent=nullptr)
 
Q_INVOKABLE void initialize (const BasePlotContext &other)
 
Q_INVOKABLE void initialize (const MassSpecTracePlotContext &other)
 
 MassSpecTracePlotContext (const MassSpecTracePlotContext &other)=delete
 
MassSpecTracePlotContextoperator= (const BasePlotContext &other)=delete
 
MassSpecTracePlotContextoperator= (const MassSpecTracePlotContext &other)=delete
 
void resetDeconvolutionData ()
 
Q_INVOKABLE QString toString () const
 
- Public Member Functions inherited from pappso::BasePlotContext
Q_INVOKABLE BasePlotContext (QObject *parent=nullptr)
 
virtual ~BasePlotContext ()
 
Q_INVOKABLE BasePlotContextclone (QObject *parent=nullptr)
 
Q_INVOKABLE void initialize (const BasePlotContext &other)
 
 BasePlotContext (const BasePlotContext &other)=delete
 
BasePlotContextoperator= (const BasePlotContext &other)=delete
 
void updateIntegrationScope ()
 
void updateIntegrationScopeRect ()
 
void updateIntegrationScopeRhomb ()
 
void updateIntegrationScopeRhombHorizontal ()
 
void updateIntegrationScopeRhombVertical ()
 
DragDirections recordDragDirections ()
 
Q_INVOKABLE QString toString () const
 
Q_INVOKABLE QString dragDirectionsToString () const
 

Static Public Member Functions

static void registerJsConstructor (QJSEngine *engine)
 
- Static Public Member Functions inherited from pappso::BasePlotContext
static void registerJsConstructor (QJSEngine *engine)
 

Public Attributes

quint16 m_lastZ = std::numeric_limits<quint16>::max()
 
double m_lastMz = qQNaN()
 
double m_lastTicIntensity = qQNaN()
 
double m_lastMr = qQNaN()
 
double m_lastResolvingPower = qQNaN()
 
- Public Attributes inherited from pappso::BasePlotContext
Enums::DataKind m_dataKind = Enums::DataKind::unset
 
bool m_isMouseDragging = false
 
bool m_wasMouseDragging = false
 
bool m_isKeyBoardDragging = false
 
bool m_isLeftPseudoButtonKeyPressed = false
 
bool m_isRightPseudoButtonKeyPressed = false
 
bool m_wasKeyBoardDragging = false
 
QPointF m_startDragPoint
 
QPointF m_currentDragPoint
 
QPointF m_lastCursorHoveredPoint
 
DragDirections m_dragDirections = DragDirections::NOT_SET
 
IntegrationScopeBaseCstSPtr msp_integrationScope = nullptr
 
SelectionPolygon m_selectionPolygon
 
double m_integrationScopeRhombWidth = 0
 
double m_integrationScopeRhombHeight = 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
 

Properties

int lastZ
 
double lastMz
 
double lastTicIntensity
 
double lastMr
 
double lastResolvingPower
 
- Properties inherited from pappso::BasePlotContext
bool isMouseDragging
 
bool wasMouseDragging
 
bool isKeyBoardDragging
 
bool isLeftPseudoButtonKeyPressed
 
bool isRightPseudoButtonKeyPressed
 
bool wasKeyBoardDragging
 
QPointF startDragPoint
 
QPointF currentDragPoint
 
QPointF lastCursorHoveredPoint
 
DragDirections dragDirections
 
double xRegionRangeStart
 
double xRegionRangeEnd
 
double yRegionRangeStart
 
double yRegionRangeEnd
 
double xDelta
 
double yDelta
 
double pressedKeyCode
 
double releasedKeyCode
 
Qt::KeyboardModifiers keyboardModifiers
 
Qt::MouseButtons lastPressedMouseButton
 
Qt::MouseButtons lastReleasedMouseButton
 
Qt::MouseButtons pressedMouseButtons
 
Qt::MouseButtons mouseButtonsAtMousePress
 
Qt::MouseButtons mouseButtonsAtMouseRelease
 

Detailed Description

Definition at line 32 of file massspectraceplotcontext.h.

Constructor & Destructor Documentation

◆ MassSpecTracePlotContext() [1/2]

pappso::MassSpecTracePlotContext::MassSpecTracePlotContext ( QObject *  parent = nullptr)

Definition at line 18 of file massspectraceplotcontext.cpp.

18 : BasePlotContext(parent)
19{
20}
Q_INVOKABLE BasePlotContext(QObject *parent=nullptr)

◆ ~MassSpecTracePlotContext()

pappso::MassSpecTracePlotContext::~MassSpecTracePlotContext ( )
virtual

Definition at line 22 of file massspectraceplotcontext.cpp.

23{
24}

◆ MassSpecTracePlotContext() [2/2]

pappso::MassSpecTracePlotContext::MassSpecTracePlotContext ( const MassSpecTracePlotContext other)
delete

Member Function Documentation

◆ clone()

MassSpecTracePlotContext * pappso::MassSpecTracePlotContext::clone ( QObject *  parent = nullptr)

Definition at line 27 of file massspectraceplotcontext.cpp.

28{
30
31 copy_p->initialize(*const_cast<const MassSpecTracePlotContext *>(this));
32
33 copy_p->m_lastZ = m_lastZ;
34 copy_p->m_lastMz = m_lastMz;
35 copy_p->m_lastTicIntensity = m_lastTicIntensity;
36 copy_p->m_lastMr = m_lastMr;
37 copy_p->m_lastResolvingPower = m_lastResolvingPower;
38
39 return copy_p;
40}
Q_INVOKABLE MassSpecTracePlotContext(QObject *parent=nullptr)

References initialize(), m_lastMr, m_lastMz, m_lastResolvingPower, m_lastTicIntensity, and m_lastZ.

◆ initialize() [1/2]

void pappso::MassSpecTracePlotContext::initialize ( const BasePlotContext other)

Definition at line 43 of file massspectraceplotcontext.cpp.

44{
46}
Q_INVOKABLE void initialize(const BasePlotContext &other)

References pappso::BasePlotContext::initialize().

Referenced by clone(), and pappso::MassSpecTracePlotWidget::refreshBaseContext().

◆ initialize() [2/2]

void pappso::MassSpecTracePlotContext::initialize ( const MassSpecTracePlotContext other)

Definition at line 49 of file massspectraceplotcontext.cpp.

50{
52
53 m_lastZ = other.m_lastZ;
54 m_lastMz = other.m_lastMz;
55 m_lastTicIntensity = other.m_lastTicIntensity;
56 m_lastMr = other.m_lastMr;
57 m_lastResolvingPower = other.m_lastResolvingPower;
58}

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ registerJsConstructor()

void pappso::MassSpecTracePlotContext::registerJsConstructor ( QJSEngine *  engine)
static

Definition at line 92 of file massspectraceplotcontext.cpp.

93{
94 if(!engine)
95 {
96 qWarning() << "Cannot register class: engine is null";
97 return;
98 }
99
100 // Register the meta object as a constructor
101 QJSValue jsMetaObject = engine->newQMetaObject(&MassSpecTracePlotContext::staticMetaObject);
102 engine->globalObject().setProperty("MassSpecTracePlotContext", jsMetaObject);
103}

◆ resetDeconvolutionData()

void pappso::MassSpecTracePlotContext::resetDeconvolutionData ( )

Definition at line 62 of file massspectraceplotcontext.cpp.

63{
64 m_lastZ = std::numeric_limits<quint16>::max();
65 m_lastMz = qQNaN();
66 m_lastMr = qQNaN();
67}

References m_lastMr, m_lastMz, and m_lastZ.

Referenced by pappso::MassSpecTracePlotWidget::mouseReleaseHandler().

◆ toString()

QString pappso::MassSpecTracePlotContext::toString ( ) const

Definition at line 70 of file massspectraceplotcontext.cpp.

71{
72 QString text("Base context:\n");
73
75
76 text += "\n";
77
78 text += "Mass spectrum trace plot context\n";
79
80 text += QString("last z: %1").arg(m_lastZ);
81 text += QString(" -- last m/z: %1").arg(m_lastMz, 0, 'f', 6);
82 text += QString(" -- last TIC intensity: %1").arg(m_lastTicIntensity, 0, 'f', 0);
83 text += QString(" -- last Mr: %1").arg(m_lastMr, 0, 'f', 6);
84 text += QString(" -- last resolving power: %1").arg(m_lastResolvingPower, 0, 'f', 0);
85
86 text += "\n";
87
88 return text;
89}
Q_INVOKABLE QString toString() const

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

Member Data Documentation

◆ m_lastMr

◆ m_lastMz

◆ m_lastResolvingPower

double pappso::MassSpecTracePlotContext::m_lastResolvingPower = qQNaN()

◆ m_lastTicIntensity

double pappso::MassSpecTracePlotContext::m_lastTicIntensity = qQNaN()

◆ m_lastZ

quint16 pappso::MassSpecTracePlotContext::m_lastZ = std::numeric_limits<quint16>::max()

Property Documentation

◆ lastMr

double pappso::MassSpecTracePlotContext::lastMr

Definition at line 38 of file massspectraceplotcontext.h.

◆ lastMz

double pappso::MassSpecTracePlotContext::lastMz

Definition at line 36 of file massspectraceplotcontext.h.

◆ lastResolvingPower

double pappso::MassSpecTracePlotContext::lastResolvingPower

Definition at line 39 of file massspectraceplotcontext.h.

◆ lastTicIntensity

double pappso::MassSpecTracePlotContext::lastTicIntensity

Definition at line 37 of file massspectraceplotcontext.h.

◆ lastZ

int pappso::MassSpecTracePlotContext::lastZ

Definition at line 35 of file massspectraceplotcontext.h.


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