43 qRegisterMetaType<pappso::BasePlotContext>(
"pappso::BasePlotContext");
45 qRegisterMetaType<pappso::BasePlotContext *>(
"pappso::BasePlotContext *");
52 qFatal(
"Programming error.");
55 m_pen.setStyle(Qt::SolidLine);
56 m_pen.setBrush(Qt::black);
76 qFatal(
"Programming error.");
110 const QString &x_axis_label,
111 const QString &y_axis_label)
116 if(parent ==
nullptr)
117 qFatal(
"Programming error.");
120 m_pen.setStyle(Qt::SolidLine);
121 m_pen.setBrush(Qt::black);
124 xAxis->setLabel(x_axis_label);
125 yAxis->setLabel(y_axis_label);
144 qFatal(
"Programming error.");
177 for(
int iter = 0; iter < layerCount(); ++iter)
180 QString(
"Layer index %1: %2\n").arg(iter).arg(layer(iter)->name());
189 if(layerable_p ==
nullptr)
190 qFatal(
"Programming error.");
192 QCPLayer *layer_p = layerable_p->layer();
194 return layer_p->name();
200 if(layerable_p ==
nullptr)
201 qFatal(
"Programming error.");
203 QCPLayer *layer_p = layerable_p->layer();
205 for(
int iter = 0; iter < layerCount(); ++iter)
207 if(layer(iter) == layer_p)
229 pen.setColor(QColor(
"steelblue"));
254 pen.setColor(QColor(
"green"));
265 pen.setColor(QColor(
"red"));
296 pen.setColor(
"steelblue");
361 "plotsLayer", layer(
"background"), QCustomPlot::LayerInsertMode::limAbove);
363 addLayer(
"labelsLayer", layer(
"background"), QCustomPlot::LayerInsertMode::limAbove);
368 setFocusPolicy(Qt::StrongFocus);
369 setInteractions(QCP::iRangeZoom | QCP::iSelectPlottables | QCP::iMultiSelect);
379 &QCustomPlot::mouseRelease,
387 &QCustomPlot::axisDoubleClick,
391 connect(
this, &QCustomPlot::beforeReplot,
this, [&]() { emit
beforeReplotSignal(); });
392 connect(
this, &QCustomPlot::afterLayout,
this, [&]() { emit
afterLayoutSignal(); });
393 connect(
this, &QCustomPlot::afterReplot,
this, [&]() { emit
afterReplotSignal(); });
412 const QColor &new_color)
414 if(plottable_p ==
nullptr)
415 qFatal(
"Pointer cannot be nullptr.");
420 pen = plottable_p->pen();
421 pen.setColor(new_color);
422 plottable_p->setPen(pen);
430 if(!new_color.isValid())
433 QCPGraph *graph_p = graph(index);
435 if(graph_p ==
nullptr)
436 qFatal(
"Programming error.");
444 if(plottable_p ==
nullptr)
445 qFatal(
"Programming error.");
447 return plottable_p->pen().color();
453 QCPGraph *graph_p = graph(index);
455 if(graph_p ==
nullptr)
456 qFatal(
"Programming error.");
464 xAxis->setLabel(label);
470 yAxis->setLabel(label);
568 qFatal(
"Programming error.");
612 m_context.m_pressedKeyCode =
event->key();
614 m_context.m_pressedKeyCodes.insert(event->key());
615 m_context.m_releasedKeyCodes.remove(event->key());
617 m_context.m_pressedKeyText =
event->text();
624 m_context.m_keyboardModifiers = QGuiApplication::queryKeyboardModifiers();
626 if(event->key() == Qt::Key_Left || event->key() == Qt::Key_Right ||
627 event->key() == Qt::Key_Up || event->key() == Qt::Key_Down)
648 m_context.m_releasedKeyCode =
event->key();
650 m_context.m_releasedKeyCodes.insert(event->key());
651 m_context.m_pressedKeyCodes.remove(event->key());
653 m_context.m_releasedKeyText =
event->text();
663 m_context.m_keyboardModifiers = QGuiApplication::queryKeyboardModifiers();
666 if(event->key() == Qt::Key_Backspace)
675 else if(event->key() == Qt::Key_Space)
679 else if(event->key() == Qt::Key_Delete)
692 int graph_count = plottableCount();
715 QList<QCPGraph *> selected_graph_list;
717 selected_graph_list = selectedGraphs();
719 if(!selected_graph_list.size())
728 for(
int iter = 0; iter < selected_graph_list.size(); ++iter)
735 this, selected_graph_list.at(iter),
m_context);
748 else if(event->key() == Qt::Key_T)
760 else if(event->key() == Qt::Key_Left || event->key() == Qt::Key_Right ||
761 event->key() == Qt::Key_Up || event->key() == Qt::Key_Down)
770 else if(event->key() == Qt::Key_S)
788 m_context.m_integrationScopeRhombWidth = 0;
789 m_context.m_integrationScopeRhombHeight = abs(
801 m_context.m_integrationScopeRhombWidth = abs(
803 m_context.m_integrationScopeRhombHeight = 0;
840 int pixel_increment = 0;
842 if(
m_context.m_keyboardModifiers == Qt::NoModifier)
844 else if(
m_context.m_keyboardModifiers == Qt::AltModifier)
845 pixel_increment = 50;
851 if(event->key() == Qt::Key_Left)
853 else if(event->key() == Qt::Key_Right)
855 else if(event->key() == Qt::Key_Up)
857 else if(event->key() == Qt::Key_Down)
872 [[maybe_unused]] QKeyEvent *event)
881 QPointF pixel_coordinates(
882 xAxis->coordToPixel(
m_context.m_lastCursorHoveredPoint.x()),
883 yAxis->coordToPixel(
m_context.m_lastCursorHoveredPoint.y()));
885 Qt::MouseButton button = Qt::NoButton;
886 QEvent::Type q_event_type = QEvent::MouseButtonPress;
892 button = Qt::LeftButton;
894 m_context.m_isLeftPseudoButtonKeyPressed =
895 !
m_context.m_isLeftPseudoButtonKeyPressed;
897 if(
m_context.m_isLeftPseudoButtonKeyPressed)
898 q_event_type = QEvent::MouseButtonPress;
900 q_event_type = QEvent::MouseButtonRelease;
906 button = Qt::RightButton;
908 m_context.m_isRightPseudoButtonKeyPressed =
909 !
m_context.m_isRightPseudoButtonKeyPressed;
911 if(
m_context.m_isRightPseudoButtonKeyPressed)
912 q_event_type = QEvent::MouseButtonPress;
914 q_event_type = QEvent::MouseButtonRelease;
922 QMouseEvent *mouse_event_p =
923 new QMouseEvent(q_event_type,
925 mapToGlobal(pixel_coordinates.toPoint()),
926 mapToGlobal(pixel_coordinates.toPoint()),
930 Qt::MouseEventSynthesizedByApplication);
932 if(q_event_type == QEvent::MouseButtonPress)
937 delete mouse_event_p;
964 QPointF mousePoint =
event->position();
968 m_context.m_lastCursorHoveredPoint.setX(xAxis->pixelToCoord(mousePoint.x()));
969 m_context.m_lastCursorHoveredPoint.setY(yAxis->pixelToCoord(mousePoint.y()));
979 if(
m_context.m_pressedMouseButtons & Qt::LeftButton ||
980 m_context.m_pressedMouseButtons & Qt::RightButton)
1031 xAxis->range().lower,
m_context.m_lastCursorHoveredPoint.y());
1033 xAxis->range().upper,
m_context.m_lastCursorHoveredPoint.y());
1044 m_context.m_lastCursorHoveredPoint.x(), yAxis->range().upper);
1046 m_context.m_lastCursorHoveredPoint.x(), yAxis->range().lower);
1067 m_context.m_keyboardModifiers = QGuiApplication::queryKeyboardModifiers();
1085 yAxis->range().upper);
1088 yAxis->range().lower);
1131 if(
m_context.m_mouseButtonsAtMousePress & Qt::LeftButton)
1135 else if(
m_context.m_mouseButtonsAtMousePress & Qt::RightButton)
1155 m_context.m_isMeasuringDistance =
false;
1164 if(
m_context.m_keyboardModifiers & Qt::ControlModifier)
1186 if(
m_context.m_pressedKeyCode == Qt::Key_Q)
1290 m_context.m_isMeasuringDistance =
false;
1337 QPointF mousePoint =
event->position();
1339 m_context.m_lastPressedMouseButton =
event->button();
1340 m_context.m_mouseButtonsAtMousePress =
event->buttons();
1344 m_context.m_pressedMouseButtons |=
event->button();
1419 m_context.m_startDragPoint.setX(xAxis->pixelToCoord(mousePoint.x()));
1420 m_context.m_startDragPoint.setY(yAxis->pixelToCoord(mousePoint.y()));
1430 m_context.m_lastCursorHoveredPoint.x(), yAxis->range().upper);
1432 m_context.m_lastCursorHoveredPoint.x(), yAxis->range().lower);
1451 m_context.m_lastReleasedMouseButton =
event->button();
1456 m_context.m_mouseButtonsAtMouseRelease =
event->buttons();
1460 m_context.m_pressedMouseButtons ^=
event->button();
1466 m_context.m_keyboardModifiers = QGuiApplication::keyboardModifiers();
1496 m_context.m_lastCursorHoveredPoint.y());
1498 m_context.m_lastCursorHoveredPoint.y());
1505 yAxis->range().upper);
1507 yAxis->range().lower);
1529 if(
m_context.m_lastReleasedMouseButton == Qt::LeftButton)
1533 else if(
m_context.m_lastReleasedMouseButton == Qt::RightButton)
1626 if(
m_context.m_keyboardModifiers & Qt::ControlModifier)
1664 double x_delta_pixel =
1665 fabs(xAxis->coordToPixel(
m_context.m_currentDragPoint.x()) -
1666 xAxis->coordToPixel(
m_context.m_startDragPoint.x()));
1668 if(x_delta_pixel > 3)
1683 m_context.m_xRange = QCPRange(xAxis->range());
1684 m_context.m_yRange = QCPRange(yAxis->range());
1700 [[maybe_unused]] QCPAxis::SelectablePart part,
1705 m_context.m_keyboardModifiers = QGuiApplication::queryKeyboardModifiers();
1707 if(
m_context.m_keyboardModifiers & Qt::ControlModifier)
1736 m_context.m_pressedMouseButtons ^=
event->button();
1748 QCPLayoutElement *layoutElement = layoutElementAt(mousePoint);
1751 layoutElement ==
dynamic_cast<QCPLayoutElement *
>(axisRect()))
1757 QCPAxis::SelectablePart selectablePart;
1759 selectablePart = xAxis->getPartAt(mousePoint);
1761 if(selectablePart == QCPAxis::spAxisLabel ||
1762 selectablePart == QCPAxis::spAxis ||
1763 selectablePart == QCPAxis::spTickLabels)
1773 QCPLayoutElement *layoutElement = layoutElementAt(mousePoint);
1776 layoutElement ==
dynamic_cast<QCPLayoutElement *
>(axisRect()))
1782 QCPAxis::SelectablePart selectablePart;
1784 selectablePart = yAxis->getPartAt(mousePoint);
1786 if(selectablePart == QCPAxis::spAxisLabel ||
1787 selectablePart == QCPAxis::spAxis ||
1788 selectablePart == QCPAxis::spTickLabels)
1813 double x_delta_pixel =
1814 fabs(xAxis->coordToPixel(
m_context.m_currentDragPoint.x()) -
1815 xAxis->coordToPixel(
m_context.m_startDragPoint.x()));
1817 double y_delta_pixel =
1818 fabs(yAxis->coordToPixel(
m_context.m_currentDragPoint.y()) -
1819 yAxis->coordToPixel(
m_context.m_startDragPoint.y()));
1821 if(x_delta_pixel > y_delta_pixel)
1822 return Qt::Horizontal;
1824 return Qt::Vertical;
1832 QPointF pixels_coordinates(xAxis->coordToPixel(graph_coordinates.x()),
1833 yAxis->coordToPixel(graph_coordinates.y()));
1842 QCursor::setPos(mapToGlobal(pixel_coordinates.toPoint()));
1850 QPointF pixel_coord(xAxis->coordToPixel(graph_coord.x()),
1851 yAxis->coordToPixel(graph_coord.y()));
1863 QPointF pixel_coordinates(
1864 xAxis->coordToPixel(
m_context.m_lastCursorHoveredPoint.x()) + pixel_count,
1865 yAxis->coordToPixel(
m_context.m_lastCursorHoveredPoint.y()));
1869 QPointF graph_coordinates(xAxis->pixelToCoord(pixel_coordinates.x()),
1870 yAxis->pixelToCoord(pixel_coordinates.y()));
1872 return graph_coordinates;
1881 QPointF pixel_coord(xAxis->coordToPixel(graph_coord.x()),
1882 yAxis->coordToPixel(graph_coord.y()));
1894 QPointF pixel_coordinates(
1895 xAxis->coordToPixel(
m_context.m_lastCursorHoveredPoint.x()),
1896 yAxis->coordToPixel(
m_context.m_lastCursorHoveredPoint.y()) + pixel_count);
1900 QPointF graph_coordinates(xAxis->pixelToCoord(pixel_coordinates.x()),
1901 yAxis->pixelToCoord(pixel_coordinates.y()));
1903 return graph_coordinates;
1914 QCPGraph *graph_p = graph(index);
1916 if(graph_p ==
nullptr)
1917 qFatal(
"Programming error.");
1919 return graph_p->getKeyRange(found_range);
1925 QCPGraph *graph_p = graph(index);
1927 if(graph_p ==
nullptr)
1928 qFatal(
"Programming error.");
1930 return graph_p->getValueRange(found_range);
1936 bool &found_range)
const
1945 found_range =
false;
1947 return QCPRange(0, 1);
1950 if(graphCount() == 1)
1951 return graph()->getKeyRange(found_range);
1953 bool found_at_least_one_range =
false;
1956 QCPRange result_range(QCPRange::minRange + 1, QCPRange::maxRange + 1);
1958 for(
int iter = 0; iter < graphCount(); ++iter)
1960 QCPRange temp_range;
1962 bool found_range_for_iter =
false;
1964 QCPGraph *graph_p = graph(iter);
1969 temp_range = graph_p->getKeyRange(found_range_for_iter);
1971 temp_range = graph_p->getValueRange(found_range_for_iter);
1973 qFatal(
"Cannot reach this point. Programming error.");
1978 if(!found_range_for_iter)
1984 if(!QCPRange::validRange(result_range))
1985 qFatal(
"The obtained range is invalid !");
1988 result_range = temp_range;
1991 found_at_least_one_range =
true;
1998 if(temp_range.lower > result_range.lower)
1999 result_range.lower = temp_range.lower;
2000 if(temp_range.upper < result_range.upper)
2001 result_range.upper = temp_range.upper;
2005 if(temp_range.lower < result_range.lower)
2006 result_range.lower = temp_range.lower;
2007 if(temp_range.upper > result_range.upper)
2008 result_range.upper = temp_range.upper;
2011 qFatal(
"Cannot reach this point. Programming error.");
2019 found_range = found_at_least_one_range;
2021 return result_range;
2060 double xLower = xAxis->range().lower;
2061 double xUpper = xAxis->range().upper;
2065 double yLower = yAxis->range().lower;
2066 double yUpper = yAxis->range().upper;
2086 xAxis->setRange(xLower, xUpper -
m_context.m_xDelta);
2096 yAxis->setRange(yLower, yUpper -
m_context.m_yDelta);
2121 xAxis->setRange(QCPRange(
m_context.m_xRegionRangeStart,
m_context.m_xRegionRangeStop));
2127 yAxis->setRange(xAxis->range().lower,
2151 xAxis->setRange(QCPRange(
m_context.m_xRegionRangeStart,
m_context.m_xRegionRangeStop));
2153 yAxis->setRange(QCPRange(
m_context.m_yRegionRangeStart,
m_context.m_yRegionRangeStop));
2169 "This function can only be called if the mouse click was on one of the "
2204 QCPRange yAxisRange,
2211 xAxis->setRange(xAxisRange.lower, xAxisRange.upper);
2216 yAxis->setRange(yAxisRange.lower, yAxisRange.upper);
2232 xAxis->setRange(lower, upper);
2242 yAxis->setRange(lower, upper);
2302 bool for_integration)
2322 m_context.m_isMeasuringDistance =
false;
2367 QPointF leftmost_point;
2368 if(!
m_context.msp_integrationScope->getLeftMostPoint(leftmost_point))
2369 qFatal(
"Could not get the left-most point.");
2372 if(!
m_context.msp_integrationScope->getWidth(width))
2373 qFatal(
"Could not get width.");
2376 double x_axis_center_position = leftmost_point.x() + width / 2;
2386 int pixels_away_from_line = 15;
2388 QPointF reference_point_for_y_axis_label_position;
2393 if(
static_cast<int>(
m_context.m_dragDirections) &
2402 pixels_away_from_line *= -1;
2404 if(!
m_context.msp_integrationScope->getTopMostPoint(
2405 reference_point_for_y_axis_label_position))
2406 qFatal(
"Failed to get top most point.");
2410 if(!
m_context.msp_integrationScope->getBottomMostPoint(
2411 reference_point_for_y_axis_label_position))
2412 qFatal(
"Failed to get bottom most point.");
2417 double y_axis_pixel_coordinate =
2418 yAxis->coordToPixel(reference_point_for_y_axis_label_position.y());
2422 double y_axis_modified_pixel_coordinate =
2423 y_axis_pixel_coordinate + pixels_away_from_line;
2426 QPointF pixel_coordinates;
2428 pixel_coordinates.setX(x_axis_center_position);
2429 pixel_coordinates.setY(y_axis_modified_pixel_coordinate);
2432 QPointF graph_coordinates(xAxis->pixelToCoord(pixel_coordinates.x()),
2433 yAxis->pixelToCoord(pixel_coordinates.y()));
2440 graph_coordinates.y());
2451 QString label_text = QString(
"full x span %1 -- x drag delta %2")
2452 .arg(width, 0,
'f', decimals)
2453 .arg(fabs(
m_context.m_xDelta), 0,
'f', decimals);
2481 if(!
m_context.msp_integrationScope->getHeight(height))
2482 qFatal(
"Could not get height.");
2499 QPointF bottom_most_point;
2500 if(!
m_context.msp_integrationScope->getBottomMostPoint(bottom_most_point))
2501 qFatal(
"Could not get the bottom-most bottom point.");
2503 double y_axis_center_position = bottom_most_point.y() + height / 2;
2513 int pixels_away_from_line = 15;
2514 double x_axis_coordinate;
2515 double x_axis_pixel_coordinate;
2517 if(
static_cast<int>(
m_context.m_dragDirections) &
2520 QPointF left_most_point;
2522 if(!
m_context.msp_integrationScope->getLeftMostPoint(left_most_point))
2523 qFatal(
"Failed to get left most point.");
2525 x_axis_coordinate = left_most_point.x();
2527 pixels_away_from_line *= -1;
2531 QPointF right_most_point;
2533 if(!
m_context.msp_integrationScope->getRightMostPoint(right_most_point))
2534 qFatal(
"Failed to get right most point.");
2536 x_axis_coordinate = right_most_point.x();
2538 x_axis_pixel_coordinate = xAxis->coordToPixel(x_axis_coordinate);
2540 double x_axis_modified_pixel_coordinate =
2541 x_axis_pixel_coordinate + pixels_away_from_line;
2544 QPointF pixel_coordinates;
2546 pixel_coordinates.setX(x_axis_modified_pixel_coordinate);
2547 pixel_coordinates.setY(y_axis_center_position);
2551 QPointF graph_coordinates(xAxis->pixelToCoord(pixel_coordinates.x()),
2552 yAxis->pixelToCoord(pixel_coordinates.y()));
2555 y_axis_center_position);
2559 QString label_text = QString(
"full y span %1 -- y drag delta %2")
2560 .arg(height, 0,
'f', decimals)
2561 .arg(fabs(
m_context.m_yDelta), 0,
'f', decimals);
2603 double plotHeight = yAxis->range().upper - yAxis->range().lower;
2608 double heightDiffRatio = (heightDiff / plotHeight) * 100;
2610 if(heightDiffRatio > 10)
2629 double x_range_start =
2631 double x_range_end =
2637 double y_position =
m_context.m_startDragPoint.y();
2643 QPointF(x_range_start, y_position));
2668 QPointF(x_range_start, y_position));
2699 QPointF bottom_left_point;
2700 if(!
m_context.msp_integrationScope->getPoint(bottom_left_point))
2701 qFatal(
"Failed to get point.");
2705 if(!
m_context.msp_integrationScope->getWidth(width))
2706 qFatal(
"Failed to get width.");
2710 if(!
m_context.msp_integrationScope->getHeight(height))
2711 qFatal(
"Failed to get height.");
2714 QPointF bottom_right_point(bottom_left_point.x() + width,
2715 bottom_left_point.y());
2718 QPointF top_right_point(bottom_left_point.x() + width,
2719 bottom_left_point.y() + height);
2722 QPointF top_left_point(bottom_left_point.x(), bottom_left_point.y() + height);
2793 scope_features =
m_context.msp_integrationScope->getLeftMostTopPoint(point_1);
2813 qFatal(
"The rhomboid should be horizontal!");
2817 if(!
m_context.msp_integrationScope->getLeftMostTopPoint(point_1))
2818 qFatal(
"Failed to getLeftMostTopPoint.");
2820 if(!
m_context.msp_integrationScope->getRightMostTopPoint(point_2))
2821 qFatal(
"Failed to getRightMostTopPoint.");
2844 if(!
m_context.msp_integrationScope->getRightMostBottomPoint(point_1))
2845 qFatal(
"Failed to getRightMostBottomPoint.");
2853 if(!
m_context.msp_integrationScope->getLeftMostBottomPoint(point_2))
2854 qFatal(
"Failed to getLeftMostBottomPoint.");
2862 if(!
m_context.msp_integrationScope->getLeftMostTopPoint(point_1))
2863 qFatal(
"Failed to getLeftMostTopPoint.");
2905 scope_features =
m_context.msp_integrationScope->getLeftMostTopPoint(point_1);
2925 qFatal(
"The rhomboid should be vertical!");
2930 if(!
m_context.msp_integrationScope->getLeftMostBottomPoint(point_2))
2931 qFatal(
"Failed to getLeftMostBottomPoint.");
2955 if(!
m_context.msp_integrationScope->getRightMostBottomPoint(point_1))
2956 qFatal(
"Failed to getRightMostBottomPoint.");
2965 if(!
m_context.msp_integrationScope->getRightMostTopPoint(point_2))
2966 qFatal(
"Failed to getRightMostTopPoint.");
2975 if(!
m_context.msp_integrationScope->getLeftMostTopPoint(point_1))
2976 qFatal(
"Failed to get the LeftMostTopPoint.");
3045 m_context.updateIntegrationScopeRhomb();
3063 if(
m_context.m_integrationScopeRhombWidth > 0)
3066 else if(
m_context.m_integrationScopeRhombHeight > 0)
3070 qFatal(
"Cannot be both the width or height of rhomboid scope be 0.");
3075 bool for_integration)
3101 if(!(
m_context.m_keyboardModifiers & Qt::AltModifier))
3107 else if(
m_context.m_keyboardModifiers & Qt::AltModifier)
3113 if(!
m_context.m_integrationScopeRhombHeight &&
3114 !
m_context.m_integrationScopeRhombWidth)
3130 std::vector<QPointF> points;
3138 if(
m_context.msp_integrationScope->getPoints(points))
3142 if(!
m_context.msp_integrationScope->getLeftMostPoint(point))
3143 qFatal(
"Failed to get LeftMost point.");
3144 m_context.m_xRegionRangeStart = point.x();
3146 if(!
m_context.msp_integrationScope->getRightMostPoint(point))
3147 qFatal(
"Failed to get RightMost point.");
3148 m_context.m_xRegionRangeStop = point.x();
3150 else if(
m_context.msp_integrationScope->getHeight(height))
3154 if(!
m_context.msp_integrationScope->getPoint(point))
3155 qFatal(
"Failed to get point.");
3156 m_context.m_xRegionRangeStart = point.x();
3160 if(!
m_context.msp_integrationScope->getWidth(width))
3161 qFatal(
"Failed to get width.");
3165 m_context.m_yRegionRangeStart = point.y();
3167 m_context.m_yRegionRangeStop = point.y() + height;
3173 if(!
m_context.msp_integrationScope->getPoint(point))
3174 qFatal(
"Failed to get point.");
3175 m_context.m_xRegionRangeStart = point.x();
3179 if(!
m_context.msp_integrationScope->getWidth(width))
3180 qFatal(
"Failed to get width.");
3210 std::const_pointer_cast<IntegrationScopeBase>(
m_context.msp_integrationScope)
3220 int current_selection_polygon =
3225 current_selection_polygon |=
3232 current_selection_polygon |=
3239 current_selection_polygon |=
3246 current_selection_polygon |=
3279 QCustomPlot::setFocus();
3290 if(focusedPlotWidget ==
nullptr)
3292 "baseplotwidget.cpp @ redrawPlotBackground(QWidget *focusedPlotWidget "
3294 "ERROR focusedPlotWidget cannot be nullptr.");
3296 if(
dynamic_cast<QWidget *
>(
this) != focusedPlotWidget)
3315 m_context.m_xRange = QCPRange(xAxis->range().lower, xAxis->range().upper);
3316 m_context.m_yRange = QCPRange(yAxis->range().lower, yAxis->range().upper);
static int zeroDecimalsInValue(pappso_double value)
Determine the number of zero decimals between the decimal point and the first non-zero decimal.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...