13 {Qt::NoButton,
"NoButton"},
14 {Qt::LeftButton,
"LeftButton"},
15 {Qt::RightButton,
"RightButton"},
16 {Qt::MiddleButton,
"MiddleButton"}};
19 {Qt::NoButton,
"NoButton"},
20 {Qt::AllButtons,
"AllButtons"},
21 {Qt::LeftButton,
"LeftButton"},
22 {Qt::RightButton,
"RightButton"},
23 {Qt::MiddleButton,
"MiddleButton"},
24 {Qt::LeftButton | Qt::RightButton,
"LeftRightButtons"},
25 {Qt::LeftButton | Qt::MiddleButton,
"LeftMiddleButtons"},
26 {Qt::RightButton | Qt::MiddleButton,
"RightMiddleButtons"},
30 {Qt::NoModifier,
"No modifier"},
31 {Qt::ShiftModifier,
"A Shift key"},
32 {Qt::ControlModifier,
"A Ctrl key"},
33 {Qt::AltModifier,
"An Alt key"},
34 {Qt::MetaModifier,
"A Meta key"},
35 {Qt::KeypadModifier,
"A keypad button"},
36 {Qt::GroupSwitchModifier,
"A Mode_switch key"}};
269 QPointF point(x_range_start, y_position);
270 double width = x_range_end - x_range_start;
364 std::make_shared<IntegrationScopeRect>(point, width, height);
425 "The m_integrationScopeRhombWidth of the fixed rhomboid side cannot be "
429 std::vector<QPointF> points;
437 points.push_back(point);
448 points.push_back(point);
454 points.push_back(point);
460 points.push_back(point);
472 points.push_back(point);
478 points.push_back(point);
484 points.push_back(point);
496 points.push_back(point);
502 points.push_back(point);
508 points.push_back(point);
520 points.push_back(point);
526 points.push_back(point);
532 points.push_back(point);
584 qFatal(
"The height of the fixed rhomboid side cannot be 0.");
587 std::vector<QPointF> points;
596 points.push_back(point);
607 points.push_back(point);
613 points.push_back(point);
619 points.push_back(point);
631 points.push_back(point);
637 points.push_back(point);
643 points.push_back(point);
655 points.push_back(point);
661 points.push_back(point);
667 points.push_back(point);
679 points.push_back(point);
685 points.push_back(point);
691 points.push_back(point);
776 "Both m_integrationScopeRhombWidth and m_integrationScopeRhombHeight of "
777 "rhomboid integration scope cannot be 0.");
884 QString text(
"Context:");
886 text += QString(
" data kind: %1").arg(
static_cast<int>(
m_dataKind));
888 text += QString(
" -- isMouseDragging: %1 -- wasMouseDragging: %2")
892 text += QString(
" -- startDragPoint : (%1, %2)")
896 text += QString(
" -- currentDragPoint : (%1, %2)")
900 text += QString(
" -- lastCursorHoveredPoint : (%1, %2)")
907 text +=
" -- Integration scope: ";
917 text += QString(
" -- wasClickOnXAxis: %1")
919 text += QString(
" -- wasClickOnYAxis: %1")
921 text += QString(
" -- isMeasuringDistance: %1")
924 text += QString(
" -- xRegionRangeStart: %1 -- xRegionRangeEnd: %2")
928 text += QString(
" -- yRegionRangeStart: %1 -- yRegionRangeEnd: %2")
932 text += QString(
" -- xDelta: %1 -- yDelta: %2").arg(
m_xDelta).arg(
m_yDelta);
947 text += QString(
" -- keyboardModifiers: ");
971 text += QString(
" -- lastPressedMouseButton: %1")
974 text += QString(
" -- lastReleasedMouseButton: %1")
977 text += QString(
" -- pressedMouseButtons: %1")
980 text += QString(
" -- mouseButtonsAtMousePress: %1")
983 text += QString(
" -- mouseButtonsAtMouseRelease: %1")
999 text +=
" -- dragging from left to right";
1002 text +=
" -- dragging from right to left";
1005 text +=
" -- dragging from top to bottom";
1008 text +=
" -- dragging from bottom to top";
1021 qFatal() <<
"Cannot register class: engine is null";
1026 QJSValue jsMetaObject =
1027 engine->newQMetaObject(&BasePlotContext::staticMetaObject);
1028 engine->globalObject().setProperty(
"BasePlotContext", jsMetaObject);
1030 QJSValue enumObject = engine->newObject();
1031 enumObject.setProperty(
"NOT_SET",
1033 enumObject.setProperty(
1035 enumObject.setProperty(
1037 enumObject.setProperty(
1039 enumObject.setProperty(
1043 engine->globalObject().setProperty(
"DragDirections", enumObject);
double m_xRegionRangeStart
static void registerJsConstructor(QJSEngine *engine)
Qt::MouseButtons m_mouseButtonsAtMousePress
SelectionPolygon m_selectionPolygon
Q_INVOKABLE BasePlotContext(QObject *parent=nullptr)
virtual ~BasePlotContext()
Q_INVOKABLE QString dragDirectionsToString() const
double m_yRegionRangeStop
IntegrationScopeBaseCstSPtr msp_integrationScope
DragDirections recordDragDirections()
Enums::DataKind m_dataKind
Q_INVOKABLE BasePlotContext * clone(QObject *parent=nullptr)
Qt::KeyboardModifiers m_keyboardModifiers
double m_xRegionRangeStop
void updateIntegrationScope()
Qt::MouseButtons m_lastPressedMouseButton
void updateIntegrationScopeRhombVertical()
void updateIntegrationScopeRhombHorizontal()
bool m_isMeasuringDistance
DragDirections m_dragDirections
double m_integrationScopeRhombHeight
QPointF m_lastCursorHoveredPoint
QPointF m_currentDragPoint
Q_INVOKABLE void initialize(const BasePlotContext &other)
QString m_releasedKeyText
void updateIntegrationScopeRect()
double m_yRegionRangeStart
void updateIntegrationScopeRhomb()
bool m_isRightPseudoButtonKeyPressed
Qt::MouseButtons m_pressedMouseButtons
Qt::MouseButtons m_mouseButtonsAtMouseRelease
bool m_isLeftPseudoButtonKeyPressed
double m_integrationScopeRhombWidth
Qt::MouseButtons m_lastReleasedMouseButton
Q_INVOKABLE QString toString() const
bool m_wasKeyBoardDragging
bool m_isKeyBoardDragging
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::map< Qt::MouseButton, QString > qtMouseButtonMap
std::map< Qt::MouseButtons, QString > qtMouseButtonsMap
std::map< Qt::KeyboardModifier, QString > qtKeyboardModifierMap