![]() |
OpenMS
2.6.0
|
Canvas for 2D-visualization of peak map, feature map and consensus map data. More...
#include <OpenMS/VISUAL/Spectrum2DCanvas.h>
Public Slots | |
void | activateLayer (Size layer_index) override |
void | removeLayer (Size layer_index) override |
void | updateLayer (Size i) override |
void | horizontalScrollBarChange (int value) override |
void | verticalScrollBarChange (int value) override |
void | updateProjections () |
Updates the projection data and emits some related signals. More... | |
![]() | |
void | changeVisibility (Size i, bool b) |
change the visibility of a layer More... | |
void | changeLayerFilterState (Size i, bool b) |
change if the defined data filters are used More... | |
void | showGridLines (bool show) |
Whether or not to show grid lines. More... | |
void | resetZoom (bool repaint=true) |
Zooms fully out and resets the zoom stack. More... | |
void | setVisibleArea (AreaType area) |
Sets the visible area. More... | |
virtual void | horizontalScrollBarChange (int value) |
Notifies the canvas that the horizontal scrollbar has been moved. More... | |
virtual void | verticalScrollBarChange (int value) |
Notifies the canvas that the vertical scrollbar has been moved. More... | |
void | setAdditionalContextMenu (QMenu *menu) |
Sets the additional context menu. If not 0, this menu is added to the context menu of the canvas. More... | |
void | getVisiblePeakData (ExperimentType &map) const |
Fills the handed over map with the visible peaks of the current layer. More... | |
void | getVisibleFeatureData (FeatureMapType &map) const |
Fills the handed over map with the visible features of the current layer. More... | |
void | getVisibleConsensusData (ConsensusMapType &map) const |
Fills the handed over map with the visible consensus features of the current layer. More... | |
void | getVisibleIdentifications (std::vector< PeptideIdentification > &peptides) const |
Fills the handed over peptides with the visible peptide identifications of the current layer. More... | |
virtual void | updateLayer (Size i)=0 |
Updates layer i when the data in the corresponding file changes. More... | |
Signals | |
void | showProjectionHorizontal (ExperimentSharedPtrType) |
Sets the data for the horizontal projection. More... | |
void | showProjectionVertical (ExperimentSharedPtrType) |
Sets the data for the vertical projection. More... | |
void | showProjectionInfo (int, double, double) |
Shows the number of peaks and the intensity sum of the projection. More... | |
void | toggleProjections () |
Signal emitted when the projections are to be shown/hidden. More... | |
void | showSpectrumAs1D (int index) |
Requests to display the spectrum with index index in 1D. More... | |
void | showSpectrumAs1D (std::vector< int, std::allocator< int > > indices) |
void | showCurrentPeaksAs3D () |
Requests to display all spectra in 3D plot. More... | |
![]() | |
void | layerModficationChange (Size layer, bool modified) |
Signal emitted whenever the modification status of a layer changes (editing and storing) More... | |
void | layerActivated (QWidget *w) |
Signal emitted whenever a new layer is activated within the current window. More... | |
void | layerZoomChanged (QWidget *w) |
Signal emitted whenever the zoom changed. More... | |
void | visibleAreaChanged (DRange< 2 > area) |
Change of the visible area. More... | |
void | sendCursorStatus (double mz=-1.0, double rt=-1.0) |
Emitted when the cursor position changes (for displaying e.g. in status bar) More... | |
void | sendStatusMessage (std::string message, OpenMS::UInt time) |
Emits a status message that should be displayed for time ms. If time is 0 the message should be displayed until the next message is emitted. More... | |
void | recalculateAxes () |
Forces recalculation of axis ticks in the connected widget. More... | |
void | updateVScrollbar (float, float, float, float) |
Triggers the update of the vertical scrollbar. More... | |
void | updateHScrollbar (float, float, float, float) |
Triggers the update of the horizontal scrollbar. More... | |
void | changeLegendVisibility () |
Toggle axis legend visibility change. More... | |
void | actionModeChange () |
Emitted when the action mode changes. More... | |
void | preferencesChange () |
Emitted when the layer preferences have changed. More... | |
Public Member Functions | |
Spectrum2DCanvas (const Param &preferences, QWidget *parent=nullptr) | |
Default constructor. More... | |
~Spectrum2DCanvas () override | |
Destructor. More... | |
void | showCurrentLayerPreferences () override |
Shows the preferences dialog of the active layer. More... | |
void | saveCurrentLayer (bool visible) override |
Saves the current layer data. More... | |
void | mergeIntoLayer (Size i, FeatureMapSharedPtrType map) |
Merges the features in map into the features layer i . More... | |
void | mergeIntoLayer (Size i, ConsensusMapSharedPtrType map) |
Merges the consensus features in map into the features layer i . More... | |
void | mergeIntoLayer (Size i, std::vector< PeptideIdentification > &peptides) |
Merges the peptide identifications in peptides into the peptide layer i . More... | |
void | recalculateCurrentLayerDotGradient () |
recalculates the dot gradient of the active layer More... | |
![]() | |
SpectrumCanvas (const Param &preferences, QWidget *parent=nullptr) | |
Default constructor. More... | |
~SpectrumCanvas () override | |
Destructor. More... | |
void | setSpectrumWidget (SpectrumWidget *widget) |
Sets the spectrum widget. More... | |
SpectrumWidget * | getSpectrumWidget () const |
Returns the spectrum widget. More... | |
Int | getActionMode () const |
Returns the action mode. More... | |
IntensityModes | getIntensityMode () const |
Returns the intensity mode. More... | |
void | setIntensityMode (IntensityModes mod) |
Sets the intensity mode. More... | |
bool | gridLinesShown () const |
Returns if the grid is currently shown. More... | |
const LayerData & | getLayer (Size index) const |
returns the layer data with index index More... | |
const LayerData & | getCurrentLayer () const |
returns the layer data of the active layer More... | |
Size | getCurrentLayerIndex () const |
returns the index of the active layer More... | |
LayerData & | getCurrentLayer () |
returns the layer data of the active layer More... | |
bool | getLayerFlag (LayerData::Flags f) const |
returns a layer flag of the current layer More... | |
void | setLayerFlag (LayerData::Flags f, bool value) |
sets a layer flag of the current layer More... | |
bool | getLayerFlag (Size layer, LayerData::Flags f) const |
returns a layer flag of the layer layer More... | |
void | setLayerFlag (Size layer, LayerData::Flags f, bool value) |
sets a layer flag of the layer layer More... | |
void | setLabel (LayerData::LabelType label) |
const AreaType & | getVisibleArea () const |
Returns the currently visible area. More... | |
virtual void | setFilters (const DataFilters &filters) |
Sets the filters applied to the data before drawing (for the current layer) More... | |
bool | isMzToXAxis () |
Returns the mapping of m/z to axes. More... | |
void | mzToXAxis (bool mz_to_x_axis) |
Sets the mapping of m/z to axes. More... | |
Size | getLayerCount () const |
Returns the number of layers. More... | |
Size | activeLayerIndex () const |
Returns the index of the active layer. More... | |
virtual void | activateLayer (Size layer_index)=0 |
change the active layer (the one that is used for selecting and so on) More... | |
virtual void | removeLayer (Size layer_index)=0 |
removes the layer with index layer_index More... | |
bool | addLayer (ExperimentSharedPtrType map, ODExperimentSharedPtrType od_map, const String &filename="") |
Add a peak data layer. More... | |
bool | addLayer (FeatureMapSharedPtrType map, const String &filename="") |
Add a feature data layer. More... | |
bool | addLayer (ConsensusMapSharedPtrType map, const String &filename="") |
Add a consensus feature data layer. More... | |
bool | addLayer (std::vector< PeptideIdentification > &peptides, const String &filename="") |
Add an identification data layer. More... | |
float | getCurrentMinIntensity () const |
Returns the minimum intensity of the active layer. More... | |
float | getCurrentMaxIntensity () const |
Returns the maximum intensity of the active layer. More... | |
float | getMinIntensity (Size index) const |
Returns the minimum intensity of the layer with index index . More... | |
float | getMaxIntensity (Size index) const |
Returns the maximum intensity of the layer with index index . More... | |
void | setLayerName (Size i, const String &name) |
Sets the name of layer i . More... | |
String | getLayerName (Size i) |
Gets the name of layer i . More... | |
void | setCurrentLayerParameters (const Param ¶m) |
Sets the parameters of the current layer. More... | |
const DRange< 3 > & | getDataRange () |
Returns the area which encloses all data points. More... | |
double | getSnapFactor () |
Returns the first intensity scaling factor for 'snap to maximum intensity mode'. More... | |
double | getPercentageFactor () |
Returns the percentage factor. More... | |
virtual void | showMetaData (bool modifiable=false, Int index=-1) |
Shows a dialog with the meta data. More... | |
![]() | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Protected Slots | |
void | currentLayerParametersChanged_ () |
Reacts on changed layer parameters. More... | |
![]() | |
void | updateCursor_ () |
Updates the cursor according to the current action mode. More... | |
Protected Member Functions | |
bool | finishAdding_ () override |
Method that is called when a new layer has been added. More... | |
bool | collectFragmentScansInArea (double rt_min, double rt_max, double mz_min, double mz_max, QAction *a, QMenu *msn_scans, QMenu *msn_meta) |
Collects fragment ion scans in the indicated RT/mz area and adds them to the indicated action. More... | |
void | drawCoordinates_ (QPainter &painter, const PeakIndex &peak) |
Draws the coordinates (or coordinate deltas) to the widget's upper left corner. More... | |
void | drawDeltas_ (QPainter &painter, const PeakIndex &start, const PeakIndex &end) |
Draws the coordinates (or coordinate deltas) to the widget's upper left corner. More... | |
![]() | |
void | resizeEvent (QResizeEvent *e) override |
void | wheelEvent (QWheelEvent *e) override |
void | keyPressEvent (QKeyEvent *e) override |
void | keyReleaseEvent (QKeyEvent *e) override |
void | focusOutEvent (QFocusEvent *e) override |
void | leaveEvent (QEvent *e) override |
void | enterEvent (QEvent *e) override |
virtual void | changeVisibleArea_ (const AreaType &new_area, bool repaint=true, bool add_to_stack=false) |
Sets the visible area. More... | |
virtual void | zoom_ (int x, int y, bool zoom_in) |
Zooms such that screen point x, y would still point to the same data point. More... | |
void | zoomBack_ () |
Go backward in zoom history. More... | |
virtual void | zoomForward_ () |
Go forward in zoom history. More... | |
void | zoomAdd_ (const AreaType &area) |
Add a visible area to the zoom stack. More... | |
void | zoomClear_ () |
Clears the zoom stack and invalidates the current zoom position. After calling this, a valid zoom position has to be added immediately. More... | |
PointType | widgetToData_ (double x, double y) |
Convert widget to chart coordinates. More... | |
PointType | widgetToData_ (const QPoint &pos) |
Calls widgetToData_ with x and y position of pos . More... | |
void | dataToWidget_ (double x, double y, QPoint &point) |
Convert chart to widget coordinates. More... | |
virtual void | paintGridLines_ (QPainter &painter) |
Helper function to paint grid lines. More... | |
void | recalculateRanges_ (UInt mz_dim, UInt rt_dim, UInt it_dim) |
Recalculates the overall_data_range_. More... | |
virtual void | update_ (const char *caller_name) |
Updates the displayed data. More... | |
void | modificationStatus_ (Size layer_index, bool modified) |
Takes all actions necessary when the modification status of a layer changes (signals etc.) More... | |
void | adjustBuffer_ () |
Changes the size of the paint buffer to the currently required size. More... | |
void | addDataProcessing_ (PeakMap &map, DataProcessing::ProcessingAction action) const |
Data processing setter for peak maps. More... | |
void | drawText_ (QPainter &painter, QStringList text) |
Draws several lines of text to the upper right corner of the widget. More... | |
double | getIdentificationMZ_ (const Size layer_index, const PeptideIdentification &peptide) const |
Returns the m/z value of an identification depending on the m/z source of the layer (precursor mass/theoretical peptide mass) More... | |
void | popIncompleteLayer_ (const QString &error_message="") |
LayerData & | getLayer_ (Size index) |
Returns the layer with index index . More... | |
LayerData & | getCurrentLayer_ () |
Returns the currently active layer. More... | |
![]() | |
virtual void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Reimplemented QT events | |
ExperimentType | projection_mz_ |
m/z projection data More... | |
ExperimentType | projection_rt_ |
RT projection data. More... | |
PeakIndex | selected_peak_ |
the nearest peak/feature to the mouse cursor More... | |
PeakIndex | measurement_start_ |
start peak/feature of measuring mode More... | |
MultiGradient | linear_gradient_ |
stores the linear color gradient for non-log modes More... | |
double | pen_size_min_ |
minimum number of pixels for one data point More... | |
double | pen_size_max_ |
maximum number of pixels for one data point More... | |
double | canvas_coverage_min_ |
minimum coverage of the canvas required; if lower, points are upscaled in size More... | |
void | mousePressEvent (QMouseEvent *e) override |
void | mouseReleaseEvent (QMouseEvent *e) override |
void | mouseMoveEvent (QMouseEvent *e) override |
void | paintEvent (QPaintEvent *e) override |
void | contextMenuEvent (QContextMenuEvent *e) override |
void | keyPressEvent (QKeyEvent *e) override |
void | keyReleaseEvent (QKeyEvent *e) override |
void | mouseDoubleClickEvent (QMouseEvent *e) override |
void | updateScrollbars_ () override |
Updates the scroll bars. More... | |
void | paintDots_ (Size layer_index, QPainter &p) |
Paints individual peaks. More... | |
void | paintAllIntensities_ (Size layer_index, double pen_width, QPainter &painter) |
void | paintMaximumIntensities_ (Size layer_index, Size rt_pixel_count, Size mz_pixel_count, QPainter &p) |
Paints maximum intensity of individual peaks. More... | |
void | paintPrecursorPeaks_ (Size layer_index, QPainter &painter) |
Paints the precursor peaks. More... | |
void | paintFeatureData_ (Size layer_index, QPainter &p) |
Paints feature data. More... | |
void | paintTraceConvexHulls_ (Size layer_index, QPainter &p) |
Paints convex hulls (one for each mass trace) of a features layer. More... | |
void | paintFeatureConvexHulls_ (Size layer_index, QPainter &p) |
Paints the convex hulls (one for each feature) of a features layer. More... | |
void | paintIdentifications_ (Size layer_index, QPainter &p) |
Paints peptide identifications (for idXML and unassigned peptides in featureXML). More... | |
void | paintConsensusElements_ (Size layer_index, QPainter &p) |
Paints the consensus elements of a consensus features layer. More... | |
void | paintConsensusElement_ (Size layer_index, const ConsensusFeature &cf, QPainter &p, bool use_buffer) |
Paints one consensus element of a consensus features layer. More... | |
bool | isConsensusFeatureVisible_ (const ConsensusFeature &ce, Size layer_index) |
checks if any element of a consensus feature is currently visible. More... | |
void | paintConvexHulls_ (const std::vector< ConvexHull2D > &hulls, bool hasIdentifications, QPainter &p) |
Paints convex hulls (one for each mass trace) for a single feature. More... | |
void | intensityModeChange_ () override |
This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes. More... | |
void | recalculateSnapFactor_ () override |
Recalculates the intensity scaling factor for 'snap to maximum intensity mode'. More... | |
Int | precalculatedColorIndex_ (float val, const MultiGradient &gradient, double snap_factor) |
Returns the position on color gradient associated with given intensity. More... | |
QColor | heightColor_ (float val, const MultiGradient &gradient, double snap_factor) |
Returns the color associated with val for the gradient gradient . More... | |
void | dataToWidget_ (double x, double y, QPoint &point) |
Convert chart to widget coordinates. More... | |
double | adaptPenScaling_ (double ratio_data2pixel, double &pen_size) const |
For a certain dimension: computes the size a data point would need, such that the image reaches a certain coverage. More... | |
void | recalculateDotGradient_ (Size layer) |
recalculates the dot gradient of a layer More... | |
void | highlightPeak_ (QPainter &p, const PeakIndex &peak) |
Highlights a single peak and prints coordinates to screen. More... | |
PeakIndex | findNearestPeak_ (const QPoint &pos) |
Returns the nearest peak to position pos . More... | |
void | paintIcon_ (const QPoint &pos, const QRgb &color, const String &icon, Size s, QPainter &p) const |
Paints a peak icon for feature and consensus feature peaks. More... | |
virtual void | translateVisibleArea_ (double mzShiftRel, double rtShiftRel) |
translates the visible area by a given offset specified in fractions of current visible area More... | |
void | translateLeft_ (Qt::KeyboardModifiers m) override |
Translation bound to the 'Left' key. More... | |
void | translateRight_ (Qt::KeyboardModifiers m) override |
Translation bound to the 'Right' key. More... | |
void | translateForward_ () override |
Translation bound to the 'Up' key. More... | |
void | translateBackward_ () override |
Translation bound to the 'Down' key. More... | |
void | finishContextMenu_ (QMenu *context_menu, QMenu *settings_menu) |
Finishes context menu after customization to peaks, features or consensus features. More... | |
Spectrum2DCanvas () | |
Default C'tor hidden. More... | |
Additional Inherited Members | |
![]() | |
enum | ActionModes { AM_TRANSLATE, AM_ZOOM, AM_MEASURE } |
Mouse action modes. More... | |
enum | IntensityModes { IM_NONE, IM_PERCENTAGE, IM_SNAP, IM_LOG } |
Display modes of intensity. More... | |
typedef LayerData::ExperimentType | ExperimentType |
Main data type (experiment) More... | |
typedef LayerData::ExperimentSharedPtrType | ExperimentSharedPtrType |
Main managed data type (experiment) More... | |
typedef LayerData::ConstExperimentSharedPtrType | ConstExperimentSharedPtrType |
typedef LayerData::ODExperimentSharedPtrType | ODExperimentSharedPtrType |
typedef LayerData::FeatureMapType | FeatureMapType |
Main data type (features) More... | |
typedef LayerData::FeatureMapSharedPtrType | FeatureMapSharedPtrType |
Main managed data type (features) More... | |
typedef LayerData::ConsensusMapType | ConsensusMapType |
Main data type (consensus features) More... | |
typedef LayerData::ConsensusMapSharedPtrType | ConsensusMapSharedPtrType |
Main managed data type (consensus features) More... | |
typedef ExperimentType::SpectrumType | SpectrumType |
Spectrum type. More... | |
typedef SpectrumType::ConstIterator | SpectrumConstIteratorType |
Spectrum iterator type (iterates over peaks) More... | |
typedef SpectrumType::PeakType | PeakType |
Peak type. More... | |
typedef FeatureMapType::FeatureType | FeatureType |
Feature type. More... | |
typedef DPosition< 2 > | PointType |
Type of the Points. More... | |
typedef DRange< 2 > | AreaType |
Types of Ranges/Areas. More... | |
![]() | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &prefix="") |
Writes all parameters to meta values. More... | |
![]() | |
QImage | buffer_ |
Buffer that stores the actual peak information. More... | |
ActionModes | action_mode_ |
Stores the current action mode (Pick, Zoom, Translate) More... | |
IntensityModes | intensity_mode_ |
Stores the used intensity mode function. More... | |
std::vector< LayerData > | layers_ |
Layer data. More... | |
bool | mz_to_x_axis_ |
Stores the mapping of m/z. More... | |
AreaType | visible_area_ |
Stores the currently visible area. More... | |
DRange< 3 > | overall_data_range_ |
Stores the data range (m/z, RT and intensity) of all layers. More... | |
bool | show_grid_ |
Stores whether or not to show a grid. More... | |
std::vector< AreaType > | zoom_stack_ |
The zoom stack. More... | |
std::vector< AreaType >::iterator | zoom_pos_ |
The current position in the zoom stack. More... | |
bool | update_buffer_ |
Whether to recalculate the data in the buffer when repainting. More... | |
Size | current_layer_ |
Stores the index of the currently active layer. More... | |
SpectrumWidget * | spectrum_widget_ |
Back-pointer to the enclosing spectrum widget. More... | |
QPoint | last_mouse_pos_ |
start position of mouse actions More... | |
double | percentage_factor_ |
Intensity scaling factor for relative scale with multiple layers. More... | |
std::vector< double > | snap_factors_ |
Intensity scaling factor for 'snap to maximum intensity mode'. More... | |
QRubberBand | rubber_band_ |
Rubber band for selected area. More... | |
QMenu * | context_add_ |
External context menu extension. More... | |
bool | show_timing_ |
Flag that determines if timing data is printed to the command line. More... | |
PeakIndex | selected_peak_ |
selected peak More... | |
PeakIndex | measurement_start_ |
start peak of measuring mode More... | |
![]() | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Canvas for 2D-visualization of peak map, feature map and consensus map data.
This widget displays a 2D representation of a set of peaks, features or consensus elements.
The example image shows Spectrum2DCanvas displaying a peak layer and a feature layer.
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
default_path | string | . | Default path for loading/storing data. | |
background_color | string | @#ffffff | Background color. | |
interpolation_steps | int | 1000 | min: 1 max: 1000 | Number of interpolation steps for peak gradient pre-calculation. |
mapping_of_mz_to | string | y_axis | x_axis, y_axis | Determines which axis is the m/z axis. |
dot:gradient | string | Linear|0,@#eeeeee;1,@#ffea00;6,@#ff0000;14,@#aa00ff;23,@#5500ff;100,@#000000 | Multi-color gradient for peaks. | |
dot:feature_icon | string | circle | diamond, square, circle, triangle | Icon used for features and consensus features. |
dot:feature_icon_size | int | 4 | min: 1 max: 999 | Icon size used for features and consensus features. |
Spectrum2DCanvas | ( | const Param & | preferences, |
QWidget * | parent = nullptr |
||
) |
Default constructor.
|
override |
Destructor.
|
private |
Default C'tor hidden.
|
overrideslot |
For a certain dimension: computes the size a data point would need, such that the image reaches a certain coverage.
Internally, this function makes use of the members 'canvas_coverage_min_' (giving the fraction (e.g. 20%) of area which should be covered by data) and 'pen_size_max_' (maximum allowed number of pixels per data point).
ratio_data2pixel | The current ratio of #data points vs. # pixels of image |
pen_size | In/Out param: gives the initial pen size, and is increased (up to MAX_PEN_SIZE ) to reach desired coverage given by 'canvas_coverage_min_' |
|
protected |
Collects fragment ion scans in the indicated RT/mz area and adds them to the indicated action.
|
overrideprotected |
|
protectedslot |
Reacts on changed layer parameters.
Convert chart to widget coordinates.
Translates chart coordinates to widget coordinates.
x | the chart coordinate x |
y | the chart coordinate y |
point | returned widget coordinates |
|
protected |
Draws the coordinates (or coordinate deltas) to the widget's upper left corner.
Draws the coordinates (or coordinate deltas) to the widget's upper left corner.
|
protected |
Returns the nearest peak to position pos
.
|
overrideprotectedvirtual |
Method that is called when a new layer has been added.
Implements SpectrumCanvas.
|
protected |
Finishes context menu after customization to peaks, features or consensus features.
|
inlineprotected |
Returns the color associated with val
for the gradient gradient
.
Takes intensity modes into account.
References MultiGradient::precalculatedColorByIndex().
|
protected |
Highlights a single peak and prints coordinates to screen.
|
overrideslot |
|
overrideprotectedvirtual |
This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes.
Reimplemented from SpectrumCanvas.
|
protected |
checks if any element of a consensus feature is currently visible.
layer_index | Index of the layer. |
ce | The ConsensusFeature that needs checking |
|
overrideprotected |
|
overrideprotected |
void mergeIntoLayer | ( | Size | i, |
ConsensusMapSharedPtrType | map | ||
) |
Merges the consensus features in map
into the features layer i
.
void mergeIntoLayer | ( | Size | i, |
FeatureMapSharedPtrType | map | ||
) |
Merges the features in map
into the features layer i
.
Referenced by TOPPViewBase::addData().
void mergeIntoLayer | ( | Size | i, |
std::vector< PeptideIdentification > & | peptides | ||
) |
Merges the peptide identifications in peptides
into the peptide layer i
.
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
protected |
Paints one consensus element of a consensus features layer.
layer_index | Index of the layer. |
cf | Reference to the feature to be painted. |
p | The QPainter to paint on. |
use_buffer | Flag to switch between painting on the buffer and screen. |
|
protected |
Paints the consensus elements of a consensus features layer.
layer_index | Index of the layer. |
p | The QPainter to paint on. |
|
protected |
Paints convex hulls (one for each mass trace) for a single feature.
hulls | Reference to convex hull vector. |
p | The QPainter to paint on. |
|
protected |
Paints individual peaks.
Calls different painting methods depending on the layer type and the density of displayed peaks
layer_index | The index of the layer. |
p | The QPainter to paint on. |
|
overrideprotected |
|
protected |
Paints the convex hulls (one for each feature) of a features layer.
layer_index | Index of the layer. |
p | The QPainter to paint on. |
|
protected |
Paints feature data.
layer_index | The index of the layer. |
p | The QPainter to paint on. |
|
protected |
Paints a peak icon for feature and consensus feature peaks.
|
protected |
Paints peptide identifications (for idXML and unassigned peptides in featureXML).
layer_index | Index of the layer. |
p | The QPainter to paint on. |
|
protected |
Paints maximum intensity of individual peaks.
Paints the peaks as small ellipses. The peaks are colored according to the selected dot gradient.
layer_index | The index of the layer. |
rt_pixel_count | |
mz_pixel_count | |
p | The QPainter to paint on. |
|
protected |
Paints the precursor peaks.
layer_index | The index of the layer. |
painter | The QPainter to paint on. |
|
protected |
Paints convex hulls (one for each mass trace) of a features layer.
layer_index | Index of the layer. |
p | The QPainter to paint on. |
|
inlineprotected |
Returns the position on color gradient
associated with given intensity.
Takes intensity modes into account.
References OpenMS::IM_NONE, and MultiGradient::precalculatedColorIndex().
void recalculateCurrentLayerDotGradient | ( | ) |
recalculates the dot gradient of the active layer
|
protected |
recalculates the dot gradient of a layer
|
overrideprotectedvirtual |
Recalculates the intensity scaling factor for 'snap to maximum intensity mode'.
Reimplemented from SpectrumCanvas.
|
overrideslot |
|
overridevirtual |
Saves the current layer data.
visible | If true, only the visible data is stored. Otherwise the whole data is stored. |
Implements SpectrumCanvas.
|
overridevirtual |
Shows the preferences dialog of the active layer.
Implements SpectrumCanvas.
|
signal |
Requests to display all spectra in 3D plot.
|
signal |
Sets the data for the horizontal projection.
Shows the number of peaks and the intensity sum of the projection.
|
signal |
Sets the data for the vertical projection.
|
signal |
Requests to display the spectrum with index index
in 1D.
|
signal |
Signal emitted when the projections are to be shown/hidden.
|
overrideprotectedvirtual |
Translation bound to the 'Down' key.
Reimplemented from SpectrumCanvas.
|
overrideprotectedvirtual |
Translation bound to the 'Up' key.
Reimplemented from SpectrumCanvas.
|
overrideprotectedvirtual |
Translation bound to the 'Left' key.
Reimplemented from SpectrumCanvas.
|
overrideprotectedvirtual |
Translation bound to the 'Right' key.
Reimplemented from SpectrumCanvas.
translates the visible area by a given offset specified in fractions of current visible area
|
overrideslot |
|
slot |
Updates the projection data and emits some related signals.
Emitted signals are showProjectionHorizontal(ExperimentSharedPtrType, Spectrum1DCanvas::DrawModes, SpectrumCanvas::IntensityModes) and showProjectionVertical(ExperimentSharedPtrType, Spectrum1DCanvas::DrawModes, SpectrumCanvas::IntensityModes).
|
overrideprotectedvirtual |
Updates the scroll bars.
Updates the scrollbars after a change of the visible area.
Reimplemented from SpectrumCanvas.
|
overrideslot |
|
protected |
minimum coverage of the canvas required; if lower, points are upscaled in size
|
protected |
stores the linear color gradient for non-log modes
|
protected |
start peak/feature of measuring mode
|
protected |
maximum number of pixels for one data point
|
protected |
minimum number of pixels for one data point
|
protected |
m/z projection data
|
protected |
RT projection data.
|
protected |
the nearest peak/feature to the mouse cursor