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
 
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
 

Static Public Member Functions

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

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
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
 

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)

References pappso::BasePlotContext::BasePlotContext().

Referenced by MassSpecTracePlotContext(), clone(), initialize(), operator=(), and operator=().

◆ ~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 MassSpecTracePlotContext(), 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::BasePlotContext(), and pappso::BasePlotContext::initialize().

Referenced by clone().

◆ 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 MassSpecTracePlotContext(), 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 83 of file massspectraceplotcontext.cpp.

84{
85 if(!engine)
86 {
87 qWarning() << "Cannot register class: engine is null";
88 return;
89 }
90
91 // Register the meta object as a constructor
92 QJSValue jsMetaObject = engine->newQMetaObject(&MassSpecTracePlotContext::staticMetaObject);
93 engine->globalObject().setProperty("MassSpecTracePlotContext", jsMetaObject);
94}

◆ toString()

QString pappso::MassSpecTracePlotContext::toString ( ) const

Definition at line 61 of file massspectraceplotcontext.cpp.

62{
63 QString text("Base context:\n");
64
66
67 text += "\n";
68
69 text += "Mass spectrum trace plot context\n";
70
71 text += QString("last z: %1").arg(m_lastZ);
72 text += QString("last m/z: %1").arg(m_lastMz, 0, 'f', 6);
73 text += QString("last TIC intensity: %1").arg(m_lastTicIntensity, 0, 'g', 0);
74 text += QString("last Mr: %1").arg(m_lastMr, 0, 'f', 6);
75 text += QString("last resolving power: %1").arg(m_lastResolvingPower, 0, 'g', 0);
76
77 text += "\n";
78
79 return text;
80}
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

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

Definition at line 59 of file massspectraceplotcontext.h.

Referenced by clone(), initialize(), and toString().

◆ m_lastMz

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

Definition at line 57 of file massspectraceplotcontext.h.

Referenced by clone(), initialize(), and toString().

◆ m_lastResolvingPower

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

Definition at line 60 of file massspectraceplotcontext.h.

Referenced by clone(), initialize(), and toString().

◆ m_lastTicIntensity

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

Definition at line 58 of file massspectraceplotcontext.h.

Referenced by clone(), initialize(), and toString().

◆ m_lastZ

int pappso::MassSpecTracePlotContext::m_lastZ = -1

Definition at line 56 of file massspectraceplotcontext.h.

Referenced by clone(), initialize(), and toString().

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: