libpappsomspp
Library for mass spectrometry
pappso::BasePlotContext Struct Reference

#include <baseplotwidget.h>

Public Member Functions

QString toString () const
 

Public Attributes

DataKind dataKind = DataKind::unset
 
bool isMouseDragging = false
 
bool wasMouseDragging = false
 
bool isKeyBoardDragging = false
 
bool isLeftPseudoButtonKeyPressed = false
 
bool isRightPseudoButtonKeyPressed = false
 
bool wassKeyBoardDragging = false
 
QPointF startDragPoint
 
QPointF currentDragPoint
 
QPointF lastCursorHoveredPoint
 
QCPRange xRange
 
QCPRange yRange
 
bool wasClickOnXAxis = false
 
bool wasClickOnYAxis = false
 
bool isMeasuringDistance = false
 
double xRegionRangeStart = std::numeric_limits<double>::min()
 
double xRegionRangeEnd = std::numeric_limits<double>::min()
 
double yRegionRangeStart = std::numeric_limits<double>::min()
 
double yRegionRangeEnd = std::numeric_limits<double>::min()
 
double xDelta = 0
 
double yDelta = 0
 
int pressedKeyCode
 
int releasedKeyCode
 
Qt::KeyboardModifiers keyboardModifiers
 
Qt::MouseButtons lastPressedMouseButton
 
Qt::MouseButtons lastReleasedMouseButton
 
Qt::MouseButtons pressedMouseButtons
 
Qt::MouseButtons mouseButtonsAtMousePress
 
Qt::MouseButtons mouseButtonsAtMouseRelease
 

Detailed Description

Definition at line 69 of file baseplotwidget.h.

Member Function Documentation

◆ toString()

QString pappso::BasePlotContext::toString ( ) const

Definition at line 50 of file baseplotwidget.cpp.

51 {
52  QString text("Context:");
53 
54  text += QString("data kind: %1").arg(static_cast<int>(dataKind));
55 
56  text += QString(" isMouseDragging: %1 -- wasMouseDragging: %2")
57  .arg(isMouseDragging ? "true" : "false")
58  .arg(wasMouseDragging ? "true" : "false");
59 
60  text += QString(" -- startDragPoint : (%1, %2)")
61  .arg(startDragPoint.x())
62  .arg(startDragPoint.y());
63 
64  text += QString(" -- currentDragPoint : (%1, %2)")
65  .arg(currentDragPoint.x())
66  .arg(currentDragPoint.y());
67 
68  text += QString(" -- lastCursorHoveredPoint : (%1, %2)")
69  .arg(lastCursorHoveredPoint.x())
70  .arg(lastCursorHoveredPoint.y());
71 
72  text += QString(" -- xRange: (%1, %2)").arg(xRange.lower).arg(xRange.upper);
73 
74  text += QString(" -- yRange: (%1, %2)").arg(yRange.lower).arg(yRange.upper);
75 
76  text +=
77  QString(" -- wasClickOnXAxis: %1").arg(wasClickOnXAxis ? "true" : "false");
78  text +=
79  QString(" -- wasClickOnYAxis: %1").arg(wasClickOnYAxis ? "true" : "false");
80  text += QString(" -- isMeasuringDistance: %1")
81  .arg(isMeasuringDistance ? "true" : "false");
82 
83  text += QString(" -- xRegionRangeStart: %1 -- xRegionRangeEnd: %2")
84  .arg(xRegionRangeStart)
85  .arg(xRegionRangeEnd);
86 
87  text += QString(" -- yRegionRangeStart: %1 -- yRegionRangeEnd: %2")
88  .arg(yRegionRangeStart)
89  .arg(yRegionRangeEnd);
90 
91  text += QString(" -- xDelta: %1 -- yDelta: %2").arg(xDelta).arg(yDelta);
92 
93  text += QString(" -- pressedKeyCode: %1").arg(pressedKeyCode);
94 
95  text += QString(" -- keyboardModifiers: %1").arg(keyboardModifiers);
96 
97  text += QString(" -- lastPressedMouseButton: %1").arg(lastPressedMouseButton);
98 
99  text +=
100  QString(" -- lastReleasedMouseButton: %1").arg(lastReleasedMouseButton);
101 
102  text += QString(" -- pressedMouseButtons: %1").arg(pressedMouseButtons);
103 
104  text +=
105  QString(" -- mouseButtonsAtMousePress: %1").arg(mouseButtonsAtMousePress);
106 
107  text += QString(" -- mouseButtonsAtMouseRelease: %1")
109 
110  return text;
111 }
Qt::KeyboardModifiers keyboardModifiers
Qt::MouseButtons mouseButtonsAtMousePress
Qt::MouseButtons lastReleasedMouseButton
Qt::MouseButtons lastPressedMouseButton
Qt::MouseButtons pressedMouseButtons
Qt::MouseButtons mouseButtonsAtMouseRelease

References currentDragPoint, dataKind, isMeasuringDistance, isMouseDragging, keyboardModifiers, lastCursorHoveredPoint, lastPressedMouseButton, lastReleasedMouseButton, mouseButtonsAtMousePress, mouseButtonsAtMouseRelease, pressedKeyCode, pressedMouseButtons, startDragPoint, wasClickOnXAxis, wasClickOnYAxis, wasMouseDragging, xDelta, xRange, xRegionRangeEnd, xRegionRangeStart, yDelta, yRange, yRegionRangeEnd, and yRegionRangeStart.

Referenced by pappso::MassSpecTracePlotContext::toString().

Member Data Documentation

◆ currentDragPoint

◆ dataKind

◆ isKeyBoardDragging

bool pappso::BasePlotContext::isKeyBoardDragging = false

Definition at line 76 of file baseplotwidget.h.

◆ isLeftPseudoButtonKeyPressed

bool pappso::BasePlotContext::isLeftPseudoButtonKeyPressed = false

◆ isMeasuringDistance

◆ isMouseDragging

◆ isRightPseudoButtonKeyPressed

bool pappso::BasePlotContext::isRightPseudoButtonKeyPressed = false

◆ keyboardModifiers

◆ lastCursorHoveredPoint

◆ lastPressedMouseButton

Qt::MouseButtons pappso::BasePlotContext::lastPressedMouseButton

Definition at line 118 of file baseplotwidget.h.

Referenced by pappso::BasePlotWidget::mousePressHandler(), and toString().

◆ lastReleasedMouseButton

Qt::MouseButtons pappso::BasePlotContext::lastReleasedMouseButton

Definition at line 119 of file baseplotwidget.h.

Referenced by pappso::BasePlotWidget::mouseReleaseHandler(), and toString().

◆ mouseButtonsAtMousePress

◆ mouseButtonsAtMouseRelease

Qt::MouseButtons pappso::BasePlotContext::mouseButtonsAtMouseRelease

Definition at line 124 of file baseplotwidget.h.

Referenced by pappso::BasePlotWidget::mouseReleaseHandler(), and toString().

◆ pressedKeyCode

◆ pressedMouseButtons

◆ releasedKeyCode

int pappso::BasePlotContext::releasedKeyCode

Definition at line 114 of file baseplotwidget.h.

Referenced by pappso::BasePlotWidget::keyReleaseEvent().

◆ startDragPoint

◆ wasClickOnXAxis

◆ wasClickOnYAxis

◆ wasMouseDragging

bool pappso::BasePlotContext::wasMouseDragging = false

Definition at line 74 of file baseplotwidget.h.

Referenced by pappso::BasePlotWidget::mouseReleaseHandler(), and toString().

◆ wassKeyBoardDragging

bool pappso::BasePlotContext::wassKeyBoardDragging = false

Definition at line 79 of file baseplotwidget.h.

◆ xDelta

◆ xRange

QCPRange pappso::BasePlotContext::xRange

◆ xRegionRangeEnd

◆ xRegionRangeStart

◆ yDelta

double pappso::BasePlotContext::yDelta = 0

◆ yRange

QCPRange pappso::BasePlotContext::yRange

◆ yRegionRangeEnd

◆ yRegionRangeStart


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