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"}};
263 QPointF point(x_range_start, y_position);
264 double width = x_range_end - x_range_start;
358 std::make_shared<IntegrationScopeRect>(point, width, height);
419 "The m_integrationScopeRhombWidth of the fixed rhomboid side cannot be "
423 std::vector<QPointF> points;
431 points.push_back(point);
442 points.push_back(point);
448 points.push_back(point);
454 points.push_back(point);
466 points.push_back(point);
472 points.push_back(point);
478 points.push_back(point);
490 points.push_back(point);
496 points.push_back(point);
502 points.push_back(point);
514 points.push_back(point);
520 points.push_back(point);
526 points.push_back(point);
578 qFatal(
"The height of the fixed rhomboid side cannot be 0.");
581 std::vector<QPointF> points;
590 points.push_back(point);
601 points.push_back(point);
607 points.push_back(point);
613 points.push_back(point);
625 points.push_back(point);
631 points.push_back(point);
637 points.push_back(point);
649 points.push_back(point);
655 points.push_back(point);
661 points.push_back(point);
673 points.push_back(point);
679 points.push_back(point);
685 points.push_back(point);
770 "Both m_integrationScopeRhombWidth and m_integrationScopeRhombHeight of "
771 "rhomboid integration scope cannot be 0.");
876 QString text(
"Context:");
878 text += QString(
" data kind: %1").arg(
static_cast<int>(
m_dataKind));
880 text += QString(
" -- isMouseDragging: %1 -- wasMouseDragging: %2")
884 text += QString(
" -- startDragPoint : (%1, %2)")
888 text += QString(
" -- currentDragPoint : (%1, %2)")
892 text += QString(
" -- lastCursorHoveredPoint : (%1, %2)")
899 text +=
" -- Integration scope: ";
909 text += QString(
" -- wasClickOnXAxis: %1")
911 text += QString(
" -- wasClickOnYAxis: %1")
913 text += QString(
" -- isMeasuringDistance: %1")
916 text += QString(
" -- xRegionRangeStart: %1 -- xRegionRangeEnd: %2")
920 text += QString(
" -- yRegionRangeStart: %1 -- yRegionRangeEnd: %2")
924 text += QString(
" -- xDelta: %1 -- yDelta: %2").arg(
m_xDelta).arg(
m_yDelta);
939 text += QString(
" -- keyboardModifiers: ");
963 text += QString(
" -- lastPressedMouseButton: %1")
966 text += QString(
" -- lastReleasedMouseButton: %1")
969 text += QString(
" -- pressedMouseButtons: %1")
972 text += QString(
" -- mouseButtonsAtMousePress: %1")
975 text += QString(
" -- mouseButtonsAtMouseRelease: %1")
991 text +=
" -- dragging from left to right";
994 text +=
" -- dragging from right to left";
997 text +=
" -- dragging from top to bottom";
1000 text +=
" -- dragging from bottom to top";
1013 qFatal() <<
"Cannot register class: engine is null";
1018 QJSValue jsMetaObject =
1019 engine->newQMetaObject(&BasePlotContext::staticMetaObject);
1020 engine->globalObject().setProperty(
"BasePlotContext", jsMetaObject);
1022 QJSValue enumObject = engine->newObject();
1023 enumObject.setProperty(
"NOT_SET",
1025 enumObject.setProperty(
1027 enumObject.setProperty(
1029 enumObject.setProperty(
1031 enumObject.setProperty(
1035 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
IntegrationScopeBaseCstSPtr msp_integrationScope
DragDirections recordDragDirections()
Enums::DataKind m_dataKind
Q_INVOKABLE BasePlotContext * clone(QObject *parent=nullptr)
Qt::KeyboardModifiers m_keyboardModifiers
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)
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