38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 83 void showCurrentLayerPreferences()
override;
86 void saveCurrentLayer(
bool visible)
override;
95 void mergeIntoLayer(
Size i, std::vector<PeptideIdentification>& peptides);
98 void recalculateCurrentLayerDotGradient();
106 void showProjectionInfo(
int,
double,
double);
108 void toggleProjections();
110 void showSpectrumAs1D(
int index);
111 void showSpectrumAs1D(std::vector<
int, std::allocator<int> > indices);
113 void showCurrentPeaksAs3D();
117 void activateLayer(
Size layer_index)
override;
119 void removeLayer(
Size layer_index)
override;
121 void updateLayer(
Size i)
override;
123 void horizontalScrollBarChange(
int value)
override;
125 void verticalScrollBarChange(
int value)
override;
136 void updateProjections();
141 void currentLayerParametersChanged_();
145 bool finishAdding_()
override;
148 bool collectFragmentScansInArea(
double rt_min,
double rt_max,
double mz_min,
double mz_max, QAction* a, QMenu * msn_scans, QMenu * msn_meta);
151 void drawCoordinates_(QPainter& painter,
const PeakIndex& peak);
157 void mousePressEvent(QMouseEvent* e)
override;
158 void mouseReleaseEvent(QMouseEvent* e)
override;
159 void mouseMoveEvent(QMouseEvent* e)
override;
160 void paintEvent(QPaintEvent* e)
override;
161 void contextMenuEvent(QContextMenuEvent* e)
override;
162 void keyPressEvent(QKeyEvent* e)
override;
163 void keyReleaseEvent(QKeyEvent* e)
override;
164 void mouseDoubleClickEvent(QMouseEvent* e)
override;
168 void updateScrollbars_()
override;
178 void paintDots_(
Size layer_index, QPainter& p);
180 void paintAllIntensities_(
Size layer_index,
double pen_width, QPainter& painter);
193 void paintMaximumIntensities_(
Size layer_index,
Size rt_pixel_count,
Size mz_pixel_count, QPainter& p);
201 void paintPrecursorPeaks_(
Size layer_index, QPainter& painter);
209 void paintFeatureData_(
Size layer_index, QPainter& p);
217 void paintTraceConvexHulls_(
Size layer_index, QPainter& p);
225 void paintFeatureConvexHulls_(
Size layer_index, QPainter& p);
233 void paintIdentifications_(
Size layer_index, QPainter& p);
241 void paintConsensusElements_(
Size layer_index, QPainter& p);
251 void paintConsensusElement_(
Size layer_index,
const ConsensusFeature& cf, QPainter& p,
bool use_buffer);
267 void paintConvexHulls_(
const std::vector<ConvexHull2D>& hulls,
bool hasIdentifications, QPainter& p);
270 void intensityModeChange_()
override;
272 void recalculateSnapFactor_()
override;
282 switch (intensity_mode_)
289 gradientPos = val * percentage_factor_;
293 gradientPos = val * snap_factor;
297 gradientPos = std::log(val + 1);
328 point.setX(
int((y - visible_area_.minY()) / visible_area_.height() * width()));
329 point.setY(height() -
int((x - visible_area_.minX()) / visible_area_.width() * height()));
333 point.setX(
int((x - visible_area_.minX()) / visible_area_.width() * width()));
334 point.setY(height() -
int((y - visible_area_.minY()) / visible_area_.height() * height()));
349 double adaptPenScaling_(
double ratio_data2pixel,
double& pen_size)
const;
352 void recalculateDotGradient_(
Size layer);
355 void highlightPeak_(QPainter& p,
const PeakIndex& peak);
358 PeakIndex findNearestPeak_(
const QPoint& pos);
361 void paintIcon_(
const QPoint& pos,
const QRgb& color,
const String& icon,
Size s, QPainter& p)
const;
364 virtual void translateVisibleArea_(
double mzShiftRel,
double rtShiftRel);
367 void translateLeft_(Qt::KeyboardModifiers m)
override;
369 void translateRight_(Qt::KeyboardModifiers m)
override;
371 void translateForward_()
override;
373 void translateBackward_()
override;
376 void finishContextMenu_(QMenu* context_menu, QMenu* settings_menu);
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: SpectrumCanvas.h:113
A more convenient string class.
Definition: String.h:57
PeakIndex measurement_start_
start peak/feature of measuring mode
Definition: Spectrum2DCanvas.h:386
Int precalculatedColorIndex(double position) const
index of color in precalculated table by position in gradient
Definition: MultiGradient.h:136
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: SpectrumCanvas.h:123
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:100
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
QColor precalculatedColorByIndex(Int index) const
precalculated color by its index in the table
Definition: MultiGradient.h:147
Canvas for 2D-visualization of peak map, feature map and consensus map data.
Definition: Spectrum2DCanvas.h:70
QColor heightColor_(float val, const MultiGradient &gradient, double snap_factor)
Returns the color associated with val for the gradient gradient.
Definition: Spectrum2DCanvas.h:311
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates.
Definition: Spectrum2DCanvas.h:324
double pen_size_min_
minimum number of pixels for one data point
Definition: Spectrum2DCanvas.h:391
Int precalculatedColorIndex_(float val, const MultiGradient &gradient, double snap_factor)
Returns the position on color gradient associated with given intensity.
Definition: Spectrum2DCanvas.h:279
double canvas_coverage_min_
minimum coverage of the canvas required; if lower, points are upscaled in size
Definition: Spectrum2DCanvas.h:393
MultiGradient linear_gradient_
stores the linear color gradient for non-log modes
Definition: Spectrum2DCanvas.h:389
Management and storage of parameters / INI files.
Definition: Param.h:74
ExperimentType projection_rt_
RT projection data.
Definition: Spectrum2DCanvas.h:381
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: SpectrumCanvas.h:119
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
ExperimentType projection_mz_
m/z projection data
Definition: Spectrum2DCanvas.h:379
PeakIndex selected_peak_
the nearest peak/feature to the mouse cursor
Definition: Spectrum2DCanvas.h:384
A gradient of multiple colors and arbitrary distances between colors.
Definition: MultiGradient.h:67
int Int
Signed integer type.
Definition: Types.h:102
Not implemented exception.
Definition: Exception.h:436
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
Index of a peak or feature.
Definition: PeakIndex.h:50
double pen_size_max_
maximum number of pixels for one data point
Definition: Spectrum2DCanvas.h:392