Loading...
Searching...
No Matches
baseplotwidget.h
Go to the documentation of this file.
/* This code comes right from the msXpertSuite software project.
*
* msXpertSuite - mass spectrometry software suite
* -----------------------------------------------
* Copyright(C) 2009,...,2018 Filippo Rusconi
*
* http://www.msxpertsuite.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* END software license
*/
#pragma once
/////////////////////// StdLib includes
#include <memory>
/////////////////////// Qt includes
#include <QObject>
#include <QString>
#include <QWidget>
#include <QBrush>
#include <QColor>
#include <QVector>
/////////////////////// QCustomPlot
#include <qcustomplot.h>
/////////////////////// Local includes
#include "pappsomspp/export-import-config.h"
#include "../../core/types.h"
#include "pappsomspp/core/processing/combiners/selectionpolygon.h"
#include "baseplotcontext.h"
namespace pappso
{
enum class SelectionDrawingLines
{
NOT_SET = 0x0000,
TOP_LINE = 1 << 0,
BOTTOM_LINE = 1 << 1,
HORIZONTAL_LINES = (TOP_LINE | BOTTOM_LINE),
RIGHT_LINE = 1 << 2,
LEFT_LINE = 1 << 3,
VERTICAL_LINES = (RIGHT_LINE | LEFT_LINE),
FULL_POLYGON = (HORIZONTAL_LINES | VERTICAL_LINES)
};
enum class RangeType
{
outermost = 1,
innermost = 2,
};
class BasePlotWidget;
typedef std::shared_ptr<BasePlotWidget> BasePlotWidgetSPtr;
typedef std::shared_ptr<const BasePlotWidget> BasePlotWidgetCstSPtr;
class PMSPP_LIB_DECL BasePlotWidget : public QCustomPlot
{
Q_OBJECT
public:
explicit BasePlotWidget(QWidget *parent);
explicit BasePlotWidget(QWidget *parent,
const QString &x_axis_label,
const QString &y_axis_label);
virtual ~BasePlotWidget();
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);
// AXES RANGE HISTORY-related functions
virtual void resetAxesRangeHistory();
virtual void updateAxesRangeHistory();
virtual void restorePreviousAxesRangeHistory();
virtual void restoreAxesRangeHistory(std::size_t index);
// AXES RANGE HISTORY-related functions
/// KEYBOARD-related EVENTS
virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event);
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);
/// KEYBOARD-related EVENTS
/// MOUSE-related EVENTS
virtual void mousePressHandler(QMouseEvent *event);
virtual void mouseReleaseHandler(QMouseEvent *event);
virtual void mouseReleaseHandlerLeftButton(QMouseEvent *event);
virtual void mouseReleaseHandlerRightButton(QMouseEvent *event);
virtual void mouseWheelHandler(QWheelEvent *event);
virtual void mouseMoveHandler(QMouseEvent *event);
virtual void mouseMoveHandlerNotDraggingCursor(QMouseEvent *event);
virtual void mouseMoveHandlerDraggingCursor(QMouseEvent *event);
virtual void mouseMoveHandlerLeftButtonDraggingCursor(QMouseEvent *event);
virtual void mouseMoveHandlerRightButtonDraggingCursor(QMouseEvent *event);
virtual void axisDoubleClickHandler(QCPAxis *axis,
QCPAxis::SelectablePart part,
QMouseEvent *event);
bool isClickOntoXAxis(const QPointF &mousePoint);
bool isClickOntoYAxis(const QPointF &mousePoint);
/// MOUSE-related EVENTS
/// MOUSE MOVEMENTS mouse/keyboard-triggered
int dragDirection();
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);
/// MOUSE MOVEMENTS mouse/keyboard-triggered
/// RANGE-related functions
virtual QCPRange getRangeX(bool &found_range, int index) const;
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);
/// RANGE-related functions
/// PLOTTING / REPLOTTING functions
virtual void axisRescale();
virtual void axisReframe();
virtual void axisZoom();
virtual void axisPan();
virtual void
replotWithAxesRanges(QCPRange xAxisRange, QCPRange yAxisRange, Enums::Axis axis);
virtual void replotWithAxisRangeX(double lower, double upper);
virtual void replotWithAxisRangeY(double lower, double upper);
/// PLOTTING / REPLOTTING functions
/// PLOT ITEMS : TRACER TEXT ITEMS...
virtual void hideAllPlotItems();
virtual void showTracers();
virtual void hideTracers();
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();
/// PLOT ITEMS : TRACER TEXT ITEMS...
virtual void setFocus();
virtual void redrawPlotBackground(QWidget *focusedPlotWidget);
virtual void updateContextXandYAxisRanges();
virtual const BasePlotContext &getContext() const;
////////////////////////// SIGNALS /////////////////////////////////
////////////////////////// SIGNALS /////////////////////////////////
////////////////////////// SIGNALS /////////////////////////////////
signals:
void setFocusSignal();
void lastCursorHoveredPointSignal(const QPointF &pointf);
void plotRangesChangedSignal(QMouseEvent *event, const pappso::BasePlotContext &context);
void plotRangesChangedWheelEventSignal(QWheelEvent *event,
const pappso::BasePlotContext &context);
void xAxisMeasurementSignal(const pappso::BasePlotContext &context, bool with_delta);
void keyPressEventSignal(QKeyEvent *event, const pappso::BasePlotContext &context);
void keyReleaseEventSignal(QKeyEvent *event, const pappso::BasePlotContext &context);
void mousePressEventSignal(QMouseEvent *event, const pappso::BasePlotContext &context);
void mouseReleaseEventSignal(QMouseEvent *event, const pappso::BasePlotContext &context);
void mouseMoveDraggingCursorSignal(QMouseEvent *event, const pappso::BasePlotContext &context);
void mouseWheelEventSignal(QWheelEvent *event, const pappso::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 pappso::BasePlotContext &context);
void beforeReplotSignal();
void afterLayoutSignal();
void afterReplotSignal();
protected:
//! Name of the plot widget.
QString m_name = "NOT_SET";
//! Description of the plot widget.
QString m_desc = "NOT_SET";
//! The name of the data file from which the mass data were read.
QString m_fileName;
QString m_axisLabelX;
QString m_axisLabelY;
BasePlotContext m_context;
int m_leftMousePseudoButtonKey = Qt::Key_Less;
int m_rightMousePseudoButtonKey = Qt::Key_Greater;
//! Rectangle defining the borders of zoomed-in/out data.
// QCPItemRect *mp_zoomRectItem = nullptr;
// The four lines that are needed to craft the selection rectangle.
QCPItemLine *mp_selectionRectangeLine1 = nullptr;
QCPItemLine *mp_selectionRectangeLine2 = nullptr;
QCPItemLine *mp_selectionRectangeLine3 = nullptr;
QCPItemLine *mp_selectionRectangeLine4 = nullptr;
//! Text describing the x-axis delta value during a drag operation.
QCPItemText *mp_xDeltaTextItem = nullptr;
QCPItemText *mp_yDeltaTextItem = nullptr;
//! Tells if the tracers should be visible.
bool m_shouldTracersBeVisible = true;
//! Horizontal position tracer
QCPItemLine *mp_hPosTracerItem = nullptr;
//! Vertical position tracer
QCPItemLine *mp_vPosTracerItem = nullptr;
//! Vertical selection start tracer (typically in green).
QCPItemLine *mp_vStartTracerItem = nullptr;
//! Vertical selection end tracer (typically in red).
QCPItemLine *mp_vEndTracerItem = nullptr /*only vertical*/;
//! Index of the last axis range history item.
/*!
Each time the user modifies the ranges (x/y axis) during panning or
zooming of the graph, the new axis ranges are stored in a axis ranges
history list. This index allows to point to the last range of that
history.
*/
std::size_t m_lastAxisRangeHistoryIndex = 0;
//! List of x axis ranges occurring during the panning zooming actions.
std::vector<QCPRange *> m_xAxisRangeHistory;
//! List of y axis ranges occurring during the panning zooming actions.
std::vector<QCPRange *> m_yAxisRangeHistory;
//! How many mouse move events must be skipped */
/*!
when the data are so massive that the graph panning becomes sluggish. By
default, the value is 10 events to be skipped before accounting one. The
"fat data" mouse movement handler mechanism is actuated by using a
keyboard key combination. There is no automatic shift between normal
processing and "fat data" processing.
*/
int m_mouseMoveHandlerSkipAmount = 10;
//! Counter to handle the "fat data" mouse move event handling.
/*!
\sa m_mouseMoveHandlerSkipAmount.
*/
int m_mouseMoveHandlerSkipCount = 0;
// QColor m_unfocusedColor = QColor(Qt::lightGray);
// QColor m_unfocusedColor = QColor(230, 230, 230, 255);
//! Color used for the background of unfocused plot.
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 focused plot.
QColor m_focusedColor = QColor(Qt::transparent);
//! Color used for the background of focused plot.
QBrush m_focusedBrush = QBrush(m_focusedColor);
//! Pen used to draw the graph and textual elements in the plot widget.
QPen m_pen;
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;
};
} // namespace pappso
Q_DECLARE_METATYPE(pappso::BasePlotContext);
extern int basePlotContextMetaTypeId;
Q_DECLARE_METATYPE(pappso::BasePlotContext *);
extern int basePlotContextPtrMetaTypeId;
baseplotcontext.h
basePlotContextPtrMetaTypeId
int basePlotContextPtrMetaTypeId
Definition baseplotwidget.cpp:44
basePlotContextMetaTypeId
int basePlotContextMetaTypeId
Definition baseplotwidget.cpp:42
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::BasePlotContext)
pappso::BasePlotContext
Definition baseplotcontext.h:51
pappso::BasePlotWidget::axisPan
virtual void axisPan()
Definition baseplotwidget.cpp:2164
pappso::BasePlotWidget::updateIntegrationScopeRect
virtual void updateIntegrationScopeRect(bool for_integration=false)
Definition baseplotwidget.cpp:2680
pappso::BasePlotWidget::m_mouseMoveHandlerSkipAmount
int m_mouseMoveHandlerSkipAmount
How many mouse move events must be skipped *‍/.
Definition baseplotwidget.h:343
pappso::BasePlotWidget::m_lastAxisRangeHistoryIndex
std::size_t m_lastAxisRangeHistoryIndex
Index of the last axis range history item.
Definition baseplotwidget.h:325
pappso::BasePlotWidget::replotWithAxesRanges
virtual void replotWithAxesRanges(QCPRange xAxisRange, QCPRange yAxisRange, Enums::Axis axis)
Definition baseplotwidget.cpp:2203
pappso::BasePlotWidget::updateAxesRangeHistory
virtual void updateAxesRangeHistory()
Create new axis range history items and append them to the history.
Definition baseplotwidget.cpp:501
pappso::BasePlotWidget::mouseWheelHandler
virtual void mouseWheelHandler(QWheelEvent *event)
Definition baseplotwidget.cpp:1678
pappso::BasePlotWidget::plottableDestructionRequestedSignal
void plottableDestructionRequestedSignal(BasePlotWidget *base_plot_widget_p, QCPAbstractPlottable *plottable_p, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::m_shouldTracersBeVisible
bool m_shouldTracersBeVisible
Tells if the tracers should be visible.
Definition baseplotwidget.h:302
pappso::BasePlotWidget::hideSelectionRectangle
virtual void hideSelectionRectangle(bool reset_values=false)
Definition baseplotwidget.cpp:3194
pappso::BasePlotWidget::updateIntegrationScopeDrawing
virtual void updateIntegrationScopeDrawing(bool as_line_segment=false, bool for_integration=false)
Definition baseplotwidget.cpp:3074
pappso::BasePlotWidget::directionKeyReleaseEvent
virtual void directionKeyReleaseEvent(QKeyEvent *event)
Definition baseplotwidget.cpp:864
pappso::BasePlotWidget::m_name
QString m_name
Name of the plot widget.
Definition baseplotwidget.h:272
pappso::BasePlotWidget::mp_yDeltaTextItem
QCPItemText * mp_yDeltaTextItem
Definition baseplotwidget.h:299
pappso::BasePlotWidget::mousePressEventSignal
void mousePressEventSignal(QMouseEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::mp_selectionRectangeLine1
QCPItemLine * mp_selectionRectangeLine1
Rectangle defining the borders of zoomed-in/out data.
Definition baseplotwidget.h:292
pappso::BasePlotWidget::getOutermostRangeX
virtual QCPRange getOutermostRangeX(bool &found_range) const
Definition baseplotwidget.cpp:2032
pappso::BasePlotWidget::lastCursorHoveredPointSignal
void lastCursorHoveredPointSignal(const QPointF &pointf)
pappso::BasePlotWidget::getContext
virtual const BasePlotContext & getContext() const
Definition baseplotwidget.cpp:3322
pappso::BasePlotWidget::drawSelectionRectangleAndPrepareZoom
virtual void drawSelectionRectangleAndPrepareZoom(bool as_line_segment=false, bool for_integration=false)
Definition baseplotwidget.cpp:2301
pappso::BasePlotWidget::getRangeY
virtual QCPRange getRangeY(bool &found_range, int index) const
Definition baseplotwidget.cpp:1923
pappso::BasePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
KEYBOARD-related EVENTS.
Definition baseplotwidget.cpp:607
pappso::BasePlotWidget::xAxisMeasurementSignal
void xAxisMeasurementSignal(const pappso::BasePlotContext &context, bool with_delta)
pappso::BasePlotWidget::updateIntegrationScope
virtual void updateIntegrationScope(bool for_integration=false)
Definition baseplotwidget.cpp:2619
pappso::BasePlotWidget::m_fileName
QString m_fileName
The name of the data file from which the mass data were read.
Definition baseplotwidget.h:278
pappso::BasePlotWidget::beforeReplotSignal
void beforeReplotSignal()
pappso::BasePlotWidget::axisZoom
virtual void axisZoom()
Definition baseplotwidget.cpp:2143
pappso::BasePlotWidget::mouseMoveHandlerLeftButtonDraggingCursor
virtual void mouseMoveHandlerLeftButtonDraggingCursor(QMouseEvent *event)
Definition baseplotwidget.cpp:1142
pappso::BasePlotWidget::mp_selectionRectangeLine2
QCPItemLine * mp_selectionRectangeLine2
Definition baseplotwidget.h:293
pappso::BasePlotWidget::plotRangesChangedSignal
void plotRangesChangedSignal(QMouseEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::mp_xDeltaTextItem
QCPItemText * mp_xDeltaTextItem
Text describing the x-axis delta value during a drag operation.
Definition baseplotwidget.h:298
pappso::BasePlotWidget::setAxisLabelX
virtual void setAxisLabelX(const QString &label)
Definition baseplotwidget.cpp:462
pappso::BasePlotWidget::m_mouseMoveHandlerSkipCount
int m_mouseMoveHandlerSkipCount
Counter to handle the "fat data" mouse move event handling.
Definition baseplotwidget.h:351
pappso::BasePlotWidget::getOutermostRangeY
virtual QCPRange getOutermostRangeY(bool &found_range) const
Definition baseplotwidget.cpp:2045
pappso::BasePlotWidget::mouseMoveHandlerRightButtonDraggingCursor
virtual void mouseMoveHandlerRightButtonDraggingCursor(QMouseEvent *event)
Definition baseplotwidget.cpp:1278
pappso::BasePlotWidget::dragDirection
int dragDirection()
MOUSE-related EVENTS.
Definition baseplotwidget.cpp:1801
pappso::BasePlotWidget::isClickOntoYAxis
bool isClickOntoYAxis(const QPointF &mousePoint)
Definition baseplotwidget.cpp:1771
pappso::BasePlotWidget::moveMouseCursorPixelCoordToGlobal
virtual void moveMouseCursorPixelCoordToGlobal(QPointF local_coordinates)
Definition baseplotwidget.cpp:1839
pappso::BasePlotWidget::mp_hPosTracerItem
QCPItemLine * mp_hPosTracerItem
Horizontal position tracer.
Definition baseplotwidget.h:305
pappso::BasePlotWidget::mp_vPosTracerItem
QCPItemLine * mp_vPosTracerItem
Vertical position tracer.
Definition baseplotwidget.h:308
pappso::BasePlotWidget::keyPressEventSignal
void keyPressEventSignal(QKeyEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::setupWidget
virtual bool setupWidget()
Definition baseplotwidget.cpp:336
pappso::BasePlotWidget::setPen
virtual void setPen(const QPen &pen)
Definition baseplotwidget.cpp:399
pappso::BasePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor(QMouseEvent *event)
Definition baseplotwidget.cpp:1058
pappso::BasePlotWidget::getInnermostRangeX
virtual QCPRange getInnermostRangeX(bool &found_range) const
Definition baseplotwidget.cpp:2025
pappso::BasePlotWidget::redrawPlotBackground
virtual void redrawPlotBackground(QWidget *focusedPlotWidget)
Redraw the background of the focusedPlotWidget plot widget.
Definition baseplotwidget.cpp:3288
pappso::BasePlotWidget::mouseReleaseHandlerLeftButton
virtual void mouseReleaseHandlerLeftButton(QMouseEvent *event)
Definition baseplotwidget.cpp:1554
pappso::BasePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor(QMouseEvent *event)
Definition baseplotwidget.cpp:994
pappso::BasePlotWidget::isClickOntoXAxis
bool isClickOntoXAxis(const QPointF &mousePoint)
Definition baseplotwidget.cpp:1746
pappso::BasePlotWidget::setAxisLabelY
virtual void setAxisLabelY(const QString &label)
Definition baseplotwidget.cpp:468
pappso::BasePlotWidget::restoreAxesRangeHistory
virtual void restoreAxesRangeHistory(std::size_t index)
Get the axis histories at index index and update the plot ranges.
Definition baseplotwidget.cpp:549
pappso::BasePlotWidget::drawXScopeSpanFeatures
virtual void drawXScopeSpanFeatures()
Definition baseplotwidget.cpp:2333
pappso::BasePlotWidget::spaceKeyReleaseEvent
virtual void spaceKeyReleaseEvent(QKeyEvent *event)
Definition baseplotwidget.cpp:817
pappso::BasePlotWidget::setFocusSignal
void setFocusSignal()
pappso::BasePlotWidget::replotWithAxisRangeX
virtual void replotWithAxisRangeX(double lower, double upper)
Definition baseplotwidget.cpp:2228
pappso::BasePlotWidget::m_unfocusedColor
QColor m_unfocusedColor
Color used for the background of unfocused plot.
Definition baseplotwidget.h:357
pappso::BasePlotWidget::createAllAncillaryItems
virtual void createAllAncillaryItems()
Definition baseplotwidget.cpp:215
pappso::BasePlotWidget::getPlottingColor
virtual QColor getPlottingColor(QCPAbstractPlottable *plottable_p) const
Definition baseplotwidget.cpp:442
pappso::BasePlotWidget::m_rightMousePseudoButtonKey
int m_rightMousePseudoButtonKey
Definition baseplotwidget.h:286
pappso::BasePlotWidget::m_focusedBrush
QBrush m_focusedBrush
Color used for the background of focused plot.
Definition baseplotwidget.h:364
pappso::BasePlotWidget::m_pen
QPen m_pen
Pen used to draw the graph and textual elements in the plot widget.
Definition baseplotwidget.h:367
pappso::BasePlotWidget::isSelectionRectangleVisible
virtual bool isSelectionRectangleVisible()
Definition baseplotwidget.cpp:3258
pappso::BasePlotWidget::isVerticalDisplacementAboveThreshold
virtual bool isVerticalDisplacementAboveThreshold()
Definition baseplotwidget.cpp:2600
pappso::BasePlotWidget::m_leftMousePseudoButtonKey
int m_leftMousePseudoButtonKey
Definition baseplotwidget.h:285
pappso::BasePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition baseplotwidget.cpp:1330
pappso::BasePlotWidget::verticalMoveMouseCursorCountPixels
virtual void verticalMoveMouseCursorCountPixels(int pixel_count)
Definition baseplotwidget.cpp:1876
pappso::BasePlotWidget::axisReframe
virtual void axisReframe()
Definition baseplotwidget.cpp:2111
pappso::BasePlotWidget::updateIntegrationScopeRhomb
virtual void updateIntegrationScopeRhomb(bool for_integration=false)
Definition baseplotwidget.cpp:2986
pappso::BasePlotWidget::mouseWheelEventSignal
void mouseWheelEventSignal(QWheelEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::resetAxesRangeHistory
virtual void resetAxesRangeHistory()
Definition baseplotwidget.cpp:475
pappso::BasePlotWidget::whatIsVisibleOfTheSelectionRectangle
virtual SelectionDrawingLines whatIsVisibleOfTheSelectionRectangle()
Definition baseplotwidget.cpp:3215
pappso::BasePlotWidget::showTracers
virtual void showTracers()
Show the traces (vertical and horizontal).
Definition baseplotwidget.cpp:2269
pappso::BasePlotWidget::horizontalGetGraphCoordNewPointCountPixels
virtual QPointF horizontalGetGraphCoordNewPointCountPixels(int pixel_count)
Definition baseplotwidget.cpp:1861
pappso::BasePlotWidget::afterReplotSignal
void afterReplotSignal()
pappso::BasePlotWidget::mp_selectionRectangeLine4
QCPItemLine * mp_selectionRectangeLine4
Definition baseplotwidget.h:295
pappso::BasePlotWidget::m_focusedColor
QColor m_focusedColor
Color used for the background of focused plot.
Definition baseplotwidget.h:362
pappso::BasePlotWidget::yMinMaxOnXAxisCurrentRange
void yMinMaxOnXAxisCurrentRange(double &min, double &max, int index)
pappso::BasePlotWidget::m_axisLabelX
QString m_axisLabelX
Definition baseplotwidget.h:280
pappso::BasePlotWidget::horizontalMoveMouseCursorCountPixels
virtual void horizontalMoveMouseCursorCountPixels(int pixel_count)
Definition baseplotwidget.cpp:1846
pappso::BasePlotWidget::BasePlotWidget
BasePlotWidget(QWidget *parent)
Definition baseplotwidget.cpp:49
pappso::BasePlotWidget::m_yAxisRangeHistory
std::vector< QCPRange * > m_yAxisRangeHistory
List of y axis ranges occurring during the panning zooming actions.
Definition baseplotwidget.h:331
pappso::BasePlotWidget::getInnermostRangeY
virtual QCPRange getInnermostRangeY(bool &found_range) const
Definition baseplotwidget.cpp:2038
pappso::BasePlotWidget::setFocus
virtual void setFocus()
PLOT ITEMS : TRACER TEXT ITEMS...
Definition baseplotwidget.cpp:3275
pappso::BasePlotWidget::drawYScopeSpanFeatures
virtual void drawYScopeSpanFeatures()
Definition baseplotwidget.cpp:2475
pappso::BasePlotWidget::getPen
virtual const QPen & getPen() const
Definition baseplotwidget.cpp:405
pappso::BasePlotWidget::updateContextXandYAxisRanges
virtual void updateContextXandYAxisRanges()
Definition baseplotwidget.cpp:3313
pappso::BasePlotWidget::updateIntegrationScopeHorizontalRhomb
virtual void updateIntegrationScopeHorizontalRhomb(bool for_integration=false)
Definition baseplotwidget.cpp:2764
pappso::BasePlotWidget::plottableSelectionChangedSignal
void plottableSelectionChangedSignal(QCPAbstractPlottable *plottable_p, bool selected)
pappso::BasePlotWidget::mousePseudoButtonKeyPressEvent
virtual void mousePseudoButtonKeyPressEvent(QKeyEvent *event)
Definition baseplotwidget.cpp:871
pappso::BasePlotWidget::setPlottingColor
virtual void setPlottingColor(QCPAbstractPlottable *plottable_p, const QColor &new_color)
Definition baseplotwidget.cpp:411
pappso::BasePlotWidget::calculateDragDeltas
virtual void calculateDragDeltas()
Definition baseplotwidget.cpp:2580
pappso::BasePlotWidget::getRange
QCPRange getRange(Enums::Axis axis, RangeType range_type, bool &found_range) const
Definition baseplotwidget.cpp:1934
pappso::BasePlotWidget::verticalGetGraphCoordNewPointCountPixels
virtual QPointF verticalGetGraphCoordNewPointCountPixels(int pixel_count)
Definition baseplotwidget.cpp:1892
pappso::BasePlotWidget::mp_vStartTracerItem
QCPItemLine * mp_vStartTracerItem
Vertical selection start tracer (typically in green).
Definition baseplotwidget.h:311
pappso::BasePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event)
Definition baseplotwidget.cpp:1445
pappso::BasePlotWidget::m_unfocusedBrush
QBrush m_unfocusedBrush
Color used for the background of unfocused plot.
Definition baseplotwidget.h:359
pappso::BasePlotWidget::axisRescale
virtual void axisRescale()
RANGE-related functions.
Definition baseplotwidget.cpp:2056
pappso::BasePlotWidget::mouseMoveDraggingCursorSignal
void mouseMoveDraggingCursorSignal(QMouseEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::moveMouseCursorGraphCoordToGlobal
virtual void moveMouseCursorGraphCoordToGlobal(QPointF plot_coordinates)
Definition baseplotwidget.cpp:1828
pappso::BasePlotWidget::allLayerNamesToString
virtual QString allLayerNamesToString() const
Definition baseplotwidget.cpp:172
pappso::BasePlotWidget::mp_selectionRectangeLine3
QCPItemLine * mp_selectionRectangeLine3
Definition baseplotwidget.h:294
pappso::BasePlotWidget::mouseReleaseEventSignal
void mouseReleaseEventSignal(QMouseEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::axisDoubleClickHandler
virtual void axisDoubleClickHandler(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
Definition baseplotwidget.cpp:1698
pappso::BasePlotWidget::m_desc
QString m_desc
Description of the plot widget.
Definition baseplotwidget.h:275
pappso::BasePlotWidget::mp_vEndTracerItem
QCPItemLine * mp_vEndTracerItem
Vertical selection end tracer (typically in red).
Definition baseplotwidget.h:314
pappso::BasePlotWidget::plotRangesChangedWheelEventSignal
void plotRangesChangedWheelEventSignal(QWheelEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition baseplotwidget.cpp:947
pappso::BasePlotWidget::directionKeyPressEvent
virtual void directionKeyPressEvent(QKeyEvent *event)
Definition baseplotwidget.cpp:823
pappso::BasePlotWidget::afterLayoutSignal
void afterLayoutSignal()
pappso::BasePlotWidget::layerableLayerName
virtual QString layerableLayerName(QCPLayerable *layerable_p) const
Definition baseplotwidget.cpp:187
pappso::BasePlotWidget::m_axisLabelY
QString m_axisLabelY
Definition baseplotwidget.h:281
pappso::BasePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event)
Handle specific key codes and trigger respective actions.
Definition baseplotwidget.cpp:646
pappso::BasePlotWidget::resetSelectionRectangle
virtual void resetSelectionRectangle()
Definition baseplotwidget.cpp:3208
pappso::BasePlotWidget::restorePreviousAxesRangeHistory
virtual void restorePreviousAxesRangeHistory()
Go up one history element in the axis history.
Definition baseplotwidget.cpp:522
pappso::BasePlotWidget::layerableLayerIndex
virtual int layerableLayerIndex(QCPLayerable *layerable_p) const
Definition baseplotwidget.cpp:198
pappso::BasePlotWidget::integrationRequestedSignal
void integrationRequestedSignal(const BasePlotContext &context)
pappso::BasePlotWidget::keyReleaseEventSignal
void keyReleaseEventSignal(QKeyEvent *event, const pappso::BasePlotContext &context)
pappso::BasePlotWidget::replotWithAxisRangeY
virtual void replotWithAxisRangeY(double lower, double upper)
Definition baseplotwidget.cpp:2238
pappso::BasePlotWidget::hideTracers
virtual void hideTracers()
Hide the traces (vertical and horizontal).
Definition baseplotwidget.cpp:2286
pappso::BasePlotWidget::mouseReleaseHandlerRightButton
virtual void mouseReleaseHandlerRightButton(QMouseEvent *event)
Definition baseplotwidget.cpp:1636
pappso::BasePlotWidget::yMinMaxOnXAxisCurrentRange
void yMinMaxOnXAxisCurrentRange(double &min, double &max, QCPAbstractPlottable *plottable_p=nullptr)
pappso::BasePlotWidget::updateIntegrationScopeVerticalRhomb
virtual void updateIntegrationScopeVerticalRhomb(bool for_integration=false)
Definition baseplotwidget.cpp:2872
pappso::BasePlotWidget::mousePseudoButtonKeyReleaseEvent
virtual void mousePseudoButtonKeyReleaseEvent(QKeyEvent *event)
Definition baseplotwidget.cpp:878
pappso::BasePlotWidget::hideAllPlotItems
virtual void hideAllPlotItems()
PLOTTING / REPLOTTING functions.
Definition baseplotwidget.cpp:2254
pappso::BasePlotWidget::getRangeX
virtual QCPRange getRangeX(bool &found_range, int index) const
MOUSE MOVEMENTS mouse/keyboard-triggered.
Definition baseplotwidget.cpp:1912
pappso::BasePlotWidget::m_xAxisRangeHistory
std::vector< QCPRange * > m_xAxisRangeHistory
List of x axis ranges occurring during the panning zooming actions.
Definition baseplotwidget.h:328
pappso::BasePlotWidget::m_context
BasePlotContext m_context
Definition baseplotwidget.h:283
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
pappso::Enums::Axis
Axis
Definition types.h:258
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::DataDimension::NOT_SET
@ NOT_SET
Definition selectionpolygon.h:36
pappso::RangeType
RangeType
Definition baseplotwidget.h:73
pappso::RangeType::innermost
@ innermost
Definition baseplotwidget.h:75
pappso::RangeType::outermost
@ outermost
Definition baseplotwidget.h:74
pappso::SelectionDrawingLines
SelectionDrawingLines
Definition baseplotwidget.h:56
pappso::SelectionDrawingLines::VERTICAL_LINES
@ VERTICAL_LINES
Definition baseplotwidget.h:67
pappso::SelectionDrawingLines::RIGHT_LINE
@ RIGHT_LINE
Definition baseplotwidget.h:64
pappso::SelectionDrawingLines::FULL_POLYGON
@ FULL_POLYGON
Definition baseplotwidget.h:69
pappso::SelectionDrawingLines::TOP_LINE
@ TOP_LINE
Definition baseplotwidget.h:59
pappso::SelectionDrawingLines::BOTTOM_LINE
@ BOTTOM_LINE
Definition baseplotwidget.h:60
pappso::SelectionDrawingLines::LEFT_LINE
@ LEFT_LINE
Definition baseplotwidget.h:65
pappso::SelectionDrawingLines::HORIZONTAL_LINES
@ HORIZONTAL_LINES
Definition baseplotwidget.h:62
pappso::BasePlotWidgetCstSPtr
std::shared_ptr< const BasePlotWidget > BasePlotWidgetCstSPtr
Definition baseplotwidget.h:81
pappso::BasePlotWidgetSPtr
std::shared_ptr< BasePlotWidget > BasePlotWidgetSPtr
Definition baseplotwidget.h:80
selectionpolygon.h
types.h