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"}};
273 QPointF point(x_range_start, y_position);
274 double width = x_range_end - x_range_start;
368 std::make_shared<IntegrationScopeRect>(point, width, height);
429 "The m_integrationScopeRhombWidth of the fixed rhomboid side cannot be "
433 std::vector<QPointF> points;
441 points.push_back(point);
452 points.push_back(point);
458 points.push_back(point);
464 points.push_back(point);
476 points.push_back(point);
482 points.push_back(point);
488 points.push_back(point);
500 points.push_back(point);
506 points.push_back(point);
512 points.push_back(point);
524 points.push_back(point);
530 points.push_back(point);
536 points.push_back(point);
588 qFatal(
"The height of the fixed rhomboid side cannot be 0.");
591 std::vector<QPointF> points;
600 points.push_back(point);
611 points.push_back(point);
617 points.push_back(point);
623 points.push_back(point);
635 points.push_back(point);
641 points.push_back(point);
647 points.push_back(point);
659 points.push_back(point);
665 points.push_back(point);
671 points.push_back(point);
683 points.push_back(point);
689 points.push_back(point);
695 points.push_back(point);
780 "Both m_integrationScopeRhombWidth and m_integrationScopeRhombHeight of "
781 "rhomboid integration scope cannot be 0.");
888 QString text(
"Context:");
890 text += QString(
" data kind: %1").arg(
static_cast<int>(
m_dataKind));
892 text += QString(
" -- isMouseDragging: %1 -- wasMouseDragging: %2")
896 text += QString(
" -- startDragPoint : (%1, %2)")
900 text += QString(
" -- currentDragPoint : (%1, %2)")
904 text += QString(
" -- lastCursorHoveredPoint : (%1, %2)")
911 text +=
" -- Integration scope: ";
921 text += QString(
" -- wasClickOnXAxis: %1")
923 text += QString(
" -- wasClickOnYAxis: %1")
925 text += QString(
" -- isMeasuringDistance: %1")
928 text += QString(
" -- xRegionRangeStart: %1 -- xRegionRangeEnd: %2")
932 text += QString(
" -- yRegionRangeStart: %1 -- yRegionRangeEnd: %2")
936 text += QString(
" -- xDelta: %1 -- yDelta: %2").arg(
m_xDelta).arg(
m_yDelta);
943 text += QString(
" -- pressedKeyCodes key: %1").arg(key);
951 text += QString(
" -- releasedKeyCodes key: %1").arg(key);
965 text += QString(
" -- keyboardModifiers: ");
989 text += QString(
" -- lastPressedMouseButton: %1")
992 text += QString(
" -- lastReleasedMouseButton: %1")
995 text += QString(
" -- pressedMouseButtons: %1")
998 text += QString(
" -- mouseButtonsAtMousePress: %1")
1001 text += QString(
" -- mouseButtonsAtMouseRelease: %1")
1017 text +=
" -- dragging from left to right";
1020 text +=
" -- dragging from right to left";
1023 text +=
" -- dragging from top to bottom";
1026 text +=
" -- dragging from bottom to top";
1039 qFatal() <<
"Cannot register class: engine is null";
1044 QJSValue jsMetaObject =
1045 engine->newQMetaObject(&BasePlotContext::staticMetaObject);
1046 engine->globalObject().setProperty(
"BasePlotContext", jsMetaObject);
1048 QJSValue enumObject = engine->newObject();
1049 enumObject.setProperty(
"NOT_SET",
1051 enumObject.setProperty(
1053 enumObject.setProperty(
1055 enumObject.setProperty(
1057 enumObject.setProperty(
1061 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
QSet< int > m_releasedKeyCodes
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
QSet< int > m_pressedKeyCodes
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