libpappsomspp
Library for mass spectrometry
|
#include <basecolormapplotwidget.h>
Public Member Functions | |
BaseColorMapPlotWidget (QWidget *parent, const QString &x_axis_label, const QString &y_axis_label) | |
virtual | ~BaseColorMapPlotWidget () |
Destruct this BaseColorMapPlotWidget instance. More... | |
virtual void | setColorMapPlotConfig (const ColorMapPlotConfig &color_map_config) |
virtual const ColorMapPlotConfig & | getColorMapPlotConfig () |
virtual QCPColorMap * | addColorMap (std::shared_ptr< std::map< double, MapTrace >> double_map_trace_map_sp, ColorMapPlotConfig color_map_plot_config, const QColor &color) |
virtual void | transposeAxes () |
virtual void | zAxisScaleToLog10 () |
virtual void | zAxisScaleResetToOriginal () |
DataKind | xAxisDataKind () const |
DataKind | yAxisDataKind () const |
AxisScale | axisScale (Axis axis) const |
AxisScale | xAxisScale () const |
AxisScale | yAxisScale () const |
AxisScale | zAxisScale () const |
virtual void | setPlottingColor (QCPAbstractPlottable *plottable_p, const QColor &new_color) override |
virtual QColor | getPlottingColor (int index=0) const override |
![]() | |
BasePlotWidget (QWidget *parent) | |
BasePlotWidget (QWidget *parent, const QString &x_axis_label, const QString &y_axis_label) | |
virtual | ~BasePlotWidget () |
Destruct this BasePlotWidget instance. More... | |
virtual bool | setupWidget () |
virtual void | setPen (const QPen &pen) |
virtual const QPen & | getPen () const |
virtual void | setPlottingColor (int index, const QColor &new_color) |
virtual QColor | getPlottingColor (QCPAbstractPlottable *plottable_p) 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. More... | |
virtual void | restorePreviousAxesRangeHistory () |
Go up one history element in the axis history. More... | |
virtual void | restoreAxesRangeHistory (std::size_t index) |
Get the axis histories at index index and update the plot ranges. More... | |
virtual void | keyPressEvent (QKeyEvent *event) |
KEYBOARD-related EVENTS. More... | |
virtual void | keyReleaseEvent (QKeyEvent *event) |
Handle specific key codes and trigger respective actions. More... | |
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. More... | |
virtual void | mouseReleaseHandler (QMouseEvent *event) |
virtual void | mouseReleaseHandlerLeftButton () |
virtual void | mouseReleaseHandlerRightButton () |
virtual void | mouseMoveHandler (QMouseEvent *event) |
virtual void | mouseMoveHandlerNotDraggingCursor () |
virtual void | mouseMoveHandlerDraggingCursor () |
virtual void | mouseMoveHandlerLeftButtonDraggingCursor () |
virtual void | mouseMoveHandlerRightButtonDraggingCursor () |
virtual void | axisDoubleClickHandler (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event) |
bool | isClickOntoXAxis (const QPointF &mousePoint) |
bool | isClickOntoYAxis (const QPointF &mousePoint) |
int | dragDirection () |
MOUSE-related EVENTS. More... | |
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. More... | |
virtual QCPRange | getRangeY (bool &found_range, int index) const |
QCPRange | getRange (PlotAxis 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 | axisRescale () |
RANGE-related functions. More... | |
virtual void | axisReframe () |
virtual void | axisZoom () |
virtual void | axisPan () |
virtual void | replotWithAxesRanges (QCPRange xAxisRange, QCPRange yAxisRange, PlotAxis whichAxis) |
virtual void | replotWithAxisRangeX (double lower, double upper) |
virtual void | replotWithAxisRangeY (double lower, double upper) |
virtual void | hideAllPlotItems () |
PLOTTING / REPLOTTING functions. More... | |
virtual void | showTracers () |
Show the traces (vertical and horizontal). More... | |
virtual void | hideTracers () |
Hide the traces (vertical and horizontal). More... | |
virtual void | drawRectangleAndPrepareZoom () |
virtual void | prepareXDeltaLineAndMeasure () |
virtual void | drawXDeltaLineAndMeasure () |
virtual void | drawXDeltaLineForIntegration () |
virtual void | calculateDragDeltas () |
virtual void | calculateDragDeltasAndUnSortedRegionCorners () |
virtual bool | isProperSelectionRectangle () |
virtual void | setFocus () |
PLOT ITEMS : TRACER TEXT ITEMS... More... | |
virtual void | redrawPlotBackground (QWidget *focusedPlotWidget) |
Redraw the background of the focusedPlotWidget plot widget. More... | |
virtual void | updateContextRanges () |
virtual const BasePlotContext & | getContext () const |
Protected Attributes | |
QCPColorMapData * | mpa_backupColorMapData = nullptr |
ColorMapPlotConfig | m_colorMapPlotConfig |
![]() | |
QString | m_name = "NOT_SET" |
Name of the plot widget. More... | |
QString | m_desc = "NOT_SET" |
Description of the plot widget. More... | |
QString | m_fileName |
The name of the data file from which the mass data were read. More... | |
QString | m_axisLabelX |
QString | m_axisLabelY |
BasePlotContext | m_context |
int | m_leftMousePseudoButtonKey = Qt::Key_Less |
int | m_rightMousePseudoButtonKey = Qt::Key_Greater |
QCPItemRect * | mp_zoomRectItem = nullptr |
Rectangle defining the borders of zoomed-in/out data. More... | |
QCPItemLine * | mp_selectLineItem = nullptr |
Line that is printed when the user selects a range. More... | |
QCPItemText * | mp_xDeltaTextItem = nullptr |
Text describing the x-axis delta value during a drag operation. More... | |
bool | m_shouldTracersBeVisible = true |
Tells if the tracers should be visible. More... | |
QCPItemLine * | mp_hPosTracerItem |
Horizontal position tracer. More... | |
QCPItemLine * | mp_vPosTracerItem |
Vertical position tracer. More... | |
QCPItemLine * | mp_vStartTracerItem |
Vertical selection start tracer (typically in green). More... | |
QCPItemLine * | mp_vEndTracerItem |
Vertical selection end tracer (typically in red). More... | |
std::size_t | m_lastAxisRangeHistoryIndex = 0 |
Index of the last axis range history item. More... | |
std::vector< QCPRange * > | m_xAxisRangeHistory |
List of x axis ranges occurring during the panning zooming actions. More... | |
std::vector< QCPRange * > | m_yAxisRangeHistory |
List of y axis ranges occurring during the panning zooming actions. More... | |
int | m_mouseMoveHandlerSkipAmount = 10 |
How many mouse move events must be skipped */. More... | |
int | m_mouseMoveHandlerSkipCount = 0 |
Counter to handle the "fat data" mouse move event handling. More... | |
QColor | m_unfocusedColor = QColor("lightgray") |
Color used for the background of unfocused plot. More... | |
QBrush | m_unfocusedBrush = QBrush(m_unfocusedColor) |
Color used for the background of unfocused plot. More... | |
QColor | m_focusedColor = QColor(Qt::transparent) |
Color used for the background of focused plot. More... | |
QBrush | m_focusedBrush = QBrush(m_focusedColor) |
Color used for the background of focused plot. More... | |
QPen | m_pen |
Pen used to draw the graph and textual elements in the plot widget. More... | |
Additional Inherited Members | |
![]() | |
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 | mouseReleaseEventSignal (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) |
Definition at line 61 of file basecolormapplotwidget.h.
|
explicit |
Definition at line 44 of file basecolormapplotwidget.cpp.
|
virtual |
Destruct this
BaseColorMapPlotWidget instance.
The destruction involves clearing the history, deleting all the axis range history items for x and y axes.
Definition at line 59 of file basecolormapplotwidget.cpp.
|
virtual |
Definition at line 80 of file basecolormapplotwidget.cpp.
References pappso::ColorMapPlotConfig::keyCellCount, m_colorMapPlotConfig, pappso::ColorMapPlotConfig::maxKeyValue, pappso::ColorMapPlotConfig::maxMzValue, pappso::ColorMapPlotConfig::minKeyValue, pappso::ColorMapPlotConfig::minMzValue, mpa_backupColorMapData, pappso::ColorMapPlotConfig::mzCellCount, pappso::BasePlotWidget::plottableSelectionChangedSignal(), pappso::BasePlotWidget::resetAxesRangeHistory(), pappso::unset, and pappso::y.
Definition at line 394 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, pappso::unset, pappso::x, pappso::ColorMapPlotConfig::xAxisScale, pappso::y, pappso::ColorMapPlotConfig::yAxisScale, and pappso::ColorMapPlotConfig::zAxisScale.
|
virtual |
Definition at line 73 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig.
|
overridevirtual |
Reimplemented from pappso::BasePlotWidget.
Definition at line 465 of file basecolormapplotwidget.cpp.
|
virtual |
Definition at line 65 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig.
|
overridevirtual |
Reimplemented from pappso::BasePlotWidget.
Definition at line 433 of file basecolormapplotwidget.cpp.
|
virtual |
Definition at line 211 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, pappso::ColorMapPlotConfig::xAxisDataKind, and pappso::ColorMapPlotConfig::yAxisDataKind.
DataKind pappso::BaseColorMapPlotWidget::xAxisDataKind | ( | ) | const |
Definition at line 380 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, and pappso::ColorMapPlotConfig::xAxisDataKind.
AxisScale pappso::BaseColorMapPlotWidget::xAxisScale | ( | ) | const |
Definition at line 412 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, and pappso::ColorMapPlotConfig::xAxisScale.
DataKind pappso::BaseColorMapPlotWidget::yAxisDataKind | ( | ) | const |
Definition at line 387 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, and pappso::ColorMapPlotConfig::yAxisDataKind.
AxisScale pappso::BaseColorMapPlotWidget::yAxisScale | ( | ) | const |
Definition at line 419 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, and pappso::ColorMapPlotConfig::yAxisScale.
AxisScale pappso::BaseColorMapPlotWidget::zAxisScale | ( | ) | const |
Definition at line 426 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, and pappso::ColorMapPlotConfig::zAxisScale.
|
virtual |
Definition at line 352 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, mpa_backupColorMapData, and pappso::ColorMapPlotConfig::zAxisScale.
|
virtual |
Definition at line 283 of file basecolormapplotwidget.cpp.
References m_colorMapPlotConfig, pappso::unset, and pappso::ColorMapPlotConfig::zAxisScale.
|
protected |
Definition at line 103 of file basecolormapplotwidget.h.
Referenced by addColorMap(), axisScale(), getColorMapPlotConfig(), setColorMapPlotConfig(), transposeAxes(), xAxisDataKind(), xAxisScale(), yAxisDataKind(), yAxisScale(), zAxisScale(), zAxisScaleResetToOriginal(), and zAxisScaleToLog10().
|
protected |
Definition at line 102 of file basecolormapplotwidget.h.
Referenced by addColorMap(), and zAxisScaleResetToOriginal().