| 
    libpappsomspp
    
   Library for mass spectrometry 
   | 
 
#include <basetraceplotwidget.h>
  
Public Member Functions | |
| BaseTracePlotWidget (QWidget *parent=0) | |
| BaseTracePlotWidget (QWidget *parent, const QString &x_axis_label, const QString &y_axis_label) | |
| virtual | ~BaseTracePlotWidget () | 
Destruct this BaseTracePlotWidget instance.   | |
| virtual void | setGraphData (int graph_index, const std::vector< double > &keys, const std::vector< double > &values) | 
| virtual void | setGraphData (QCPGraph *graph_p, const std::vector< double > &keys, const std::vector< double > &values) | 
| virtual void | clearGraphData (int graph_index) | 
| virtual void | axisDoubleClickHandler (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event) override | 
| virtual void | axisRescale () override | 
| RANGE-related functions.   | |
| virtual void | axisReframe () override | 
| virtual void | axisZoom () override | 
| virtual void | axisPan () override | 
| virtual QCPGraph * | addTrace (const pappso::Trace &trace, const QColor &color) | 
| virtual bool | findIntegrationLowerRangeForKey (int index, double key, QCPRange &range) | 
| Find a minimal integration range starting at an existing data point.   | |
| std::vector< double > | getValuesX (int index) const | 
| std::vector< double > | getValuesY (int index) const | 
| QCPRange | getValueRangeOnKeyRange (QCPAbstractPlottable *plottable_p, bool &ok) | 
| QCPRange | getValueRangeOnKeyRange (int index, bool &ok) | 
| double | getYatX (double x, QCPGraph *graph_p) | 
| double | getYatX (double x, int index=0) | 
| pappso::Trace | toTrace (int index) const | 
| pappso::Trace | toTrace (const QCPGraph *graph_p) const | 
| pappso::Trace | toTrace (const QCPRange &x_axis_range, int index) const | 
| pappso::Trace | toTrace (const QCPRange &x_axis_range, const QCPGraph *graph_p) const | 
  Public Member Functions inherited from pappso::BasePlotWidget | |
| BasePlotWidget (QWidget *parent) | |
| BasePlotWidget (QWidget *parent, const QString &x_axis_label, const QString &y_axis_label) | |
| virtual | ~BasePlotWidget () | 
Destruct this BasePlotWidget instance.   | |
| virtual bool | setupWidget () | 
| virtual void | setPen (const QPen &pen) | 
| virtual const QPen & | getPen () const | 
| virtual void | setPlottingColor (QCPAbstractPlottable *plottable_p, const QColor &new_color) | 
| virtual void | setPlottingColor (int index, const QColor &new_color) | 
| virtual QColor | getPlottingColor (QCPAbstractPlottable *plottable_p) const | 
| virtual QColor | getPlottingColor (int index=0) const | 
| virtual void | setAxisLabelX (const QString &label) | 
| virtual void | setAxisLabelY (const QString &label) | 
| virtual void | resetAxesRangeHistory () | 
| virtual void | updateAxesRangeHistory () | 
| Create new axis range history items and append them to the history.   | |
| virtual void | restorePreviousAxesRangeHistory () | 
| Go up one history element in the axis history.   | |
| virtual void | restoreAxesRangeHistory (std::size_t index) | 
Get the axis histories at index index and update the plot ranges.   | |
| virtual void | keyPressEvent (QKeyEvent *event) | 
| KEYBOARD-related EVENTS.   | |
| virtual void | keyReleaseEvent (QKeyEvent *event) | 
| Handle specific key codes and trigger respective actions.   | |
| virtual void | spaceKeyReleaseEvent (QKeyEvent *event) | 
| virtual void | directionKeyPressEvent (QKeyEvent *event) | 
| virtual void | directionKeyReleaseEvent (QKeyEvent *event) | 
| virtual void | mousePseudoButtonKeyPressEvent (QKeyEvent *event) | 
| virtual void | mousePseudoButtonKeyReleaseEvent (QKeyEvent *event) | 
| virtual void | mousePressHandler (QMouseEvent *event) | 
| KEYBOARD-related EVENTS.   | |
| virtual void | mouseReleaseHandler (QMouseEvent *event) | 
| virtual void | mouseReleaseHandlerLeftButton () | 
| virtual void | mouseReleaseHandlerRightButton () | 
| virtual void | mouseWheelHandler (QWheelEvent *event) | 
| virtual void | mouseMoveHandler (QMouseEvent *event) | 
| KEYBOARD-related EVENTS.   | |
| virtual void | mouseMoveHandlerNotDraggingCursor () | 
| virtual void | mouseMoveHandlerDraggingCursor () | 
| virtual void | mouseMoveHandlerLeftButtonDraggingCursor () | 
| virtual void | mouseMoveHandlerRightButtonDraggingCursor () | 
| bool | isClickOntoXAxis (const QPointF &mousePoint) | 
| bool | isClickOntoYAxis (const QPointF &mousePoint) | 
| int | dragDirection () | 
| MOUSE-related EVENTS.   | |
| virtual void | moveMouseCursorGraphCoordToGlobal (QPointF plot_coordinates) | 
| virtual void | moveMouseCursorPixelCoordToGlobal (QPointF local_coordinates) | 
| virtual void | horizontalMoveMouseCursorCountPixels (int pixel_count) | 
| virtual QPointF | horizontalGetGraphCoordNewPointCountPixels (int pixel_count) | 
| virtual void | verticalMoveMouseCursorCountPixels (int pixel_count) | 
| virtual QPointF | verticalGetGraphCoordNewPointCountPixels (int pixel_count) | 
| virtual QCPRange | getRangeX (bool &found_range, int index) const | 
| MOUSE MOVEMENTS mouse/keyboard-triggered.   | |
| virtual QCPRange | getRangeY (bool &found_range, int index) const | 
| QCPRange | getRange (Enums::Axis axis, RangeType range_type, bool &found_range) const | 
| virtual QCPRange | getInnermostRangeX (bool &found_range) const | 
| virtual QCPRange | getOutermostRangeX (bool &found_range) const | 
| virtual QCPRange | getInnermostRangeY (bool &found_range) const | 
| virtual QCPRange | getOutermostRangeY (bool &found_range) const | 
| void | yMinMaxOnXAxisCurrentRange (double &min, double &max, QCPAbstractPlottable *plottable_p=nullptr) | 
| void | yMinMaxOnXAxisCurrentRange (double &min, double &max, int index) | 
| virtual void | replotWithAxesRanges (QCPRange xAxisRange, QCPRange yAxisRange, Enums::Axis axis) | 
| virtual void | replotWithAxisRangeX (double lower, double upper) | 
| virtual void | replotWithAxisRangeY (double lower, double upper) | 
| virtual void | hideAllPlotItems () | 
| PLOTTING / REPLOTTING functions.   | |
| virtual void | showTracers () | 
| Show the traces (vertical and horizontal).   | |
| virtual void | hideTracers () | 
| Hide the traces (vertical and horizontal).   | |
| virtual void | drawXScopeSpanFeatures () | 
| virtual void | drawYScopeSpanFeatures () | 
| virtual void | calculateDragDeltas () | 
| virtual bool | isVerticalDisplacementAboveThreshold () | 
| virtual void | drawSelectionRectangleAndPrepareZoom (bool as_line_segment=false, bool for_integration=false) | 
| virtual void | updateIntegrationScopeDrawing (bool as_line_segment=false, bool for_integration=false) | 
| virtual void | resetSelectionRectangle () | 
| virtual void | hideSelectionRectangle (bool reset_values=false) | 
| virtual bool | isSelectionRectangleVisible () | 
| virtual SelectionDrawingLines | whatIsVisibleOfTheSelectionRectangle () | 
| virtual void | setFocus () | 
| PLOT ITEMS : TRACER TEXT ITEMS...   | |
| virtual void | redrawPlotBackground (QWidget *focusedPlotWidget) | 
Redraw the background of the focusedPlotWidget plot widget.   | |
| virtual void | updateContextXandYAxisRanges () | 
| virtual const BasePlotContext & | getContext () const | 
Additional Inherited Members | |
  Signals inherited from pappso::BasePlotWidget | |
| void | setFocusSignal () | 
| void | lastCursorHoveredPointSignal (const QPointF &pointf) | 
| void | plotRangesChangedSignal (const BasePlotContext &context) | 
| void | xAxisMeasurementSignal (const BasePlotContext &context, bool with_delta) | 
| void | keyPressEventSignal (const BasePlotContext &context) | 
| void | keyReleaseEventSignal (const BasePlotContext &context) | 
| void | mousePressEventSignal (const BasePlotContext &context) | 
| void | mouseReleaseEventSignal (const BasePlotContext &context) | 
| void | mouseWheelEventSignal (const BasePlotContext &context) | 
| void | plottableSelectionChangedSignal (QCPAbstractPlottable *plottable_p, bool selected) | 
| void | integrationRequestedSignal (const BasePlotContext &context) | 
| void | plottableDestructionRequestedSignal (BasePlotWidget *base_plot_widget_p, QCPAbstractPlottable *plottable_p, const BasePlotContext &context) | 
  Protected Member Functions inherited from pappso::BasePlotWidget | |
| virtual void | createAllAncillaryItems () | 
| virtual void | updateIntegrationScope (bool for_integration=false) | 
| virtual void | updateIntegrationScopeRect (bool for_integration=false) | 
| virtual void | updateIntegrationScopeHorizontalRhomb (bool for_integration=false) | 
| virtual void | updateIntegrationScopeVerticalRhomb (bool for_integration=false) | 
| virtual void | updateIntegrationScopeRhomb (bool for_integration=false) | 
| virtual QString | allLayerNamesToString () const | 
| virtual QString | layerableLayerName (QCPLayerable *layerable_p) const | 
| virtual int | layerableLayerIndex (QCPLayerable *layerable_p) const | 
  Protected Attributes inherited from pappso::BasePlotWidget | |
| QString | m_name = "NOT_SET" | 
| Name of the plot widget.   | |
| QString | m_desc = "NOT_SET" | 
| Description of the plot widget.   | |
| QString | m_fileName | 
| The name of the data file from which the mass data were read.   | |
| QString | m_axisLabelX | 
| QString | m_axisLabelY | 
| BasePlotContext | m_context | 
| int | m_leftMousePseudoButtonKey = Qt::Key_Less | 
| int | m_rightMousePseudoButtonKey = Qt::Key_Greater | 
| QCPItemLine * | mp_selectionRectangeLine1 = nullptr | 
| Rectangle defining the borders of zoomed-in/out data.   | |
| QCPItemLine * | mp_selectionRectangeLine2 = nullptr | 
| QCPItemLine * | mp_selectionRectangeLine3 = nullptr | 
| QCPItemLine * | mp_selectionRectangeLine4 = nullptr | 
| QCPItemText * | mp_xDeltaTextItem = nullptr | 
| Text describing the x-axis delta value during a drag operation.   | |
| QCPItemText * | mp_yDeltaTextItem = nullptr | 
| bool | m_shouldTracersBeVisible = true | 
| Tells if the tracers should be visible.   | |
| QCPItemLine * | mp_hPosTracerItem = nullptr | 
| Horizontal position tracer.   | |
| QCPItemLine * | mp_vPosTracerItem = nullptr | 
| Vertical position tracer.   | |
| QCPItemLine * | mp_vStartTracerItem = nullptr | 
| Vertical selection start tracer (typically in green).   | |
| QCPItemLine * | mp_vEndTracerItem = nullptr | 
| Vertical selection end tracer (typically in red).   | |
| std::size_t | m_lastAxisRangeHistoryIndex = 0 | 
| Index of the last axis range history item.   | |
| std::vector< QCPRange * > | m_xAxisRangeHistory | 
| List of x axis ranges occurring during the panning zooming actions.   | |
| std::vector< QCPRange * > | m_yAxisRangeHistory | 
| List of y axis ranges occurring during the panning zooming actions.   | |
| int | m_mouseMoveHandlerSkipAmount = 10 | 
| How many mouse move events must be skipped */.   | |
| int | m_mouseMoveHandlerSkipCount = 0 | 
| Counter to handle the "fat data" mouse move event handling.   | |
| QColor | m_unfocusedColor = QColor("lightgray") | 
| Color used for the background of unfocused plot.   | |
| QBrush | m_unfocusedBrush = QBrush(m_unfocusedColor) | 
| Color used for the background of unfocused plot.   | |
| QColor | m_focusedColor = QColor(Qt::transparent) | 
| Color used for the background of focused plot.   | |
| QBrush | m_focusedBrush = QBrush(m_focusedColor) | 
| Color used for the background of focused plot.   | |
| QPen | m_pen | 
| Pen used to draw the graph and textual elements in the plot widget.   | |
Definition at line 59 of file basetraceplotwidget.h.
      
  | 
  explicit | 
Definition at line 44 of file basetraceplotwidget.cpp.
References pappso::BasePlotWidget::BasePlotWidget(), and pappso::BasePlotWidget::createAllAncillaryItems().
Referenced by pappso::DriftSpecTracePlotWidget::DriftSpecTracePlotWidget(), pappso::MassSpecTracePlotWidget::MassSpecTracePlotWidget(), pappso::MassSpecTracePlotWidget::MassSpecTracePlotWidget(), and pappso::TicXicChromTracePlotWidget::TicXicChromTracePlotWidget().
      
  | 
  explicit | 
Definition at line 68 of file basetraceplotwidget.cpp.
References pappso::BasePlotWidget::BasePlotWidget(), and pappso::BasePlotWidget::createAllAncillaryItems().
      
  | 
  virtual | 
Destruct this BaseTracePlotWidget instance. 
The destruction involves clearing the history, deleting all the axis range history items for x and y axes.
Definition at line 101 of file basetraceplotwidget.cpp.
      
  | 
  virtual | 
Definition at line 184 of file basetraceplotwidget.cpp.
References pappso::BasePlotWidget::plottableSelectionChangedSignal(), pappso::BasePlotWidget::resetAxesRangeHistory(), pappso::Trace::xValues(), and pappso::Trace::yValues().
      
  | 
  overridevirtual | 
Reimplemented from pappso::BasePlotWidget.
Definition at line 530 of file basetraceplotwidget.cpp.
References getValueRangeOnKeyRange(), pappso::BasePlotWidget::m_context, pappso::BasePlotWidget::plotRangesChangedSignal(), pappso::BasePlotWidget::resetAxesRangeHistory(), pappso::BasePlotWidget::updateAxesRangeHistory(), and pappso::BasePlotWidget::updateContextXandYAxisRanges().
      
  | 
  overridevirtual | 
Reimplemented from pappso::BasePlotWidget.
Definition at line 803 of file basetraceplotwidget.cpp.
References getValueRangeOnKeyRange(), pappso::BasePlotWidget::m_context, pappso::BasePlotWidget::plotRangesChangedSignal(), and pappso::BasePlotWidget::updateContextXandYAxisRanges().
      
  | 
  overridevirtual | 
Reimplemented from pappso::BasePlotWidget.
Definition at line 720 of file basetraceplotwidget.cpp.
References getValueRangeOnKeyRange(), pappso::BasePlotWidget::m_context, pappso::BasePlotWidget::plotRangesChangedSignal(), pappso::BasePlotWidget::updateAxesRangeHistory(), and pappso::BasePlotWidget::updateContextXandYAxisRanges().
      
  | 
  overridevirtual | 
RANGE-related functions.
PLOTTING / REPLOTTING functions
Reimplemented from pappso::BasePlotWidget.
Definition at line 600 of file basetraceplotwidget.cpp.
References getValueRangeOnKeyRange(), pappso::BasePlotWidget::m_context, pappso::BasePlotWidget::plotRangesChangedSignal(), and pappso::BasePlotWidget::updateContextXandYAxisRanges().
      
  | 
  overridevirtual | 
Reimplemented from pappso::BasePlotWidget.
Definition at line 768 of file basetraceplotwidget.cpp.
References getValueRangeOnKeyRange(), pappso::BasePlotWidget::m_context, pappso::BasePlotWidget::plotRangesChangedSignal(), pappso::BasePlotWidget::updateAxesRangeHistory(), and pappso::BasePlotWidget::updateContextXandYAxisRanges().
      
  | 
  virtual | 
Definition at line 168 of file basetraceplotwidget.cpp.
References pappso::BasePlotWidget::resetAxesRangeHistory().
      
  | 
  virtual | 
Find a minimal integration range starting at an existing data point.
If the user clicks onto a plot at a location that is not a true data point, get a data range that begins at the preceding data point and that ends at the clicked location point.
Definition at line 289 of file basetraceplotwidget.cpp.
| QCPRange pappso::BaseTracePlotWidget::getValueRangeOnKeyRange | ( | int | index, | 
| bool & | ok ) | 
Definition at line 477 of file basetraceplotwidget.cpp.
References getValueRangeOnKeyRange().
| QCPRange pappso::BaseTracePlotWidget::getValueRangeOnKeyRange | ( | QCPAbstractPlottable * | plottable_p, | 
| bool & | ok ) | 
Definition at line 420 of file basetraceplotwidget.cpp.
Referenced by axisDoubleClickHandler(), axisPan(), axisReframe(), axisRescale(), axisZoom(), and getValueRangeOnKeyRange().
| std::vector< double > pappso::BaseTracePlotWidget::getValuesX | ( | int | index | ) | const | 
Definition at line 372 of file basetraceplotwidget.cpp.
| std::vector< double > pappso::BaseTracePlotWidget::getValuesY | ( | int | index | ) | const | 
Definition at line 396 of file basetraceplotwidget.cpp.
| double pappso::BaseTracePlotWidget::getYatX | ( | double | x, | 
| int | index = 0 ) | 
Definition at line 518 of file basetraceplotwidget.cpp.
| double pappso::BaseTracePlotWidget::getYatX | ( | double | x, | 
| QCPGraph * | graph_p ) | 
Definition at line 495 of file basetraceplotwidget.cpp.
References pappso::x.
Referenced by getYatX().
      
  | 
  virtual | 
Definition at line 107 of file basetraceplotwidget.cpp.
References setGraphData().
Referenced by setGraphData().
      
  | 
  virtual | 
Definition at line 121 of file basetraceplotwidget.cpp.
References pappso::BasePlotWidget::m_pen, and pappso::BasePlotWidget::resetAxesRangeHistory().
| pappso::Trace pappso::BaseTracePlotWidget::toTrace | ( | const QCPGraph * | graph_p | ) | const | 
Definition at line 867 of file basetraceplotwidget.cpp.
| pappso::Trace pappso::BaseTracePlotWidget::toTrace | ( | const QCPRange & | x_axis_range, | 
| const QCPGraph * | graph_p ) const | 
Definition at line 901 of file basetraceplotwidget.cpp.
| pappso::Trace pappso::BaseTracePlotWidget::toTrace | ( | const QCPRange & | x_axis_range, | 
| int | index ) const | 
Definition at line 889 of file basetraceplotwidget.cpp.
References toTrace().
| pappso::Trace pappso::BaseTracePlotWidget::toTrace | ( | int | index | ) | const |