35 #ifndef OPENMS_VISUAL_SPECTRUM2DCANVAS_H    36 #define OPENMS_VISUAL_SPECTRUM2DCANVAS_H    39 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>    84     virtual void showCurrentLayerPreferences();
    87     virtual void saveCurrentLayer(
bool visible);
    96     void mergeIntoLayer(
Size i, std::vector<PeptideIdentification>& peptides);
    99     void recalculateCurrentLayerDotGradient();
   107     void showProjectionInfo(
int, 
double, 
double);
   109     void toggleProjections();
   111     void showSpectrumAs1D(
int index);
   112     void showSpectrumAs1D(std::vector<
int, std::allocator<int> > indices);
   114     void showCurrentPeaksAs3D();
   118     void activateLayer(
Size layer_index);
   120     void removeLayer(
Size layer_index);
   122     virtual void updateLayer(
Size i);
   124     virtual void horizontalScrollBarChange(
int value);
   126     virtual void verticalScrollBarChange(
int value);
   137     void updateProjections();
   142     void currentLayerParametersChanged_();
   146     bool finishAdding_();
   149     bool collectFragmentScansInArea(
double rt_min, 
double rt_max, 
double mz_min, 
double mz_max, QAction* a, QMenu * msn_scans, QMenu * msn_meta);
   152     void drawCoordinates_(QPainter& painter, 
const PeakIndex& peak);
   158     void mousePressEvent(QMouseEvent* e);
   159     void mouseReleaseEvent(QMouseEvent* e);
   160     void mouseMoveEvent(QMouseEvent* e);
   161     void paintEvent(QPaintEvent* e);
   162     void contextMenuEvent(QContextMenuEvent* e);
   163     void keyPressEvent(QKeyEvent* e);
   164     void keyReleaseEvent(QKeyEvent* e);
   165     void mouseDoubleClickEvent(QMouseEvent* e);
   169     virtual void updateScrollbars_();
   179     void paintDots_(
Size layer_index, QPainter& p);
   181     void paintAllIntensities_(
Size layer_index, 
double pen_width, QPainter& painter);
   194     void paintMaximumIntensities_(
Size layer_index, 
Size rt_pixel_count, 
Size mz_pixel_count, QPainter& p);
   202     void paintPrecursorPeaks_(
Size layer_index, QPainter& painter);
   210     void paintFeatureData_(
Size layer_index, QPainter& p);
   218     void paintTraceConvexHulls_(
Size layer_index, QPainter& p);
   226     void paintFeatureConvexHulls_(
Size layer_index, QPainter& p);
   234     void paintIdentifications_(
Size layer_index, QPainter& p);
   242     void paintConsensusElements_(
Size layer_index, QPainter& p);
   252     void paintConsensusElement_(
Size layer_index, 
const ConsensusFeature& cf, QPainter& p, 
bool use_buffer);
   268     void paintConvexHulls_(
const std::vector<ConvexHull2D>& hulls, 
bool hasIdentifications, QPainter& p);
   271     virtual void intensityModeChange_();
   273     virtual void recalculateSnapFactor_();
   283       switch (intensity_mode_)
   290         gradientPos = val * percentage_factor_;
   294         gradientPos = val * snap_factor;
   298         gradientPos = std::log(val + 1);
   329         point.setX(
int((y - visible_area_.minY()) / visible_area_.height() * width()));
   330         point.setY(height() - 
int((x - visible_area_.minX()) / visible_area_.width() * height()));
   334         point.setX(
int((x - visible_area_.minX()) / visible_area_.width() * width()));
   335         point.setY(height() - 
int((y - visible_area_.minY()) / visible_area_.height() * height()));
   350     double adaptPenScaling_(
double ratio_data2pixel, 
double& pen_size) 
const;
   353     void recalculateDotGradient_(
Size layer);
   356     void highlightPeak_(QPainter& p, 
const PeakIndex& peak);
   359     PeakIndex findNearestPeak_(
const QPoint& pos);
   362     void paintIcon_(
const QPoint& pos, 
const QRgb& color, 
const String& icon, 
Size s, QPainter& p) 
const;
   365     virtual void translateVisibleArea_(
double mzShiftRel, 
double rtShiftRel);
   368     virtual void translateLeft_(Qt::KeyboardModifiers m);
   370     virtual void translateRight_(Qt::KeyboardModifiers m);
   372     virtual void translateForward_();
   374     virtual void translateBackward_();
   377     void finishContextMenu_(QMenu* context_menu, QMenu* settings_menu);
 LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment) 
Definition: SpectrumCanvas.h:109
 
A more convenient string class. 
Definition: String.h:57
 
PeakIndex measurement_start_
start peak/feature of measuring mode 
Definition: Spectrum2DCanvas.h:387
 
Int precalculatedColorIndex(double position) const
index of color in precalculated table by position in gradient 
Definition: MultiGradient.h:137
 
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features) 
Definition: SpectrumCanvas.h:117
 
Base class for visualization canvas classes. 
Definition: SpectrumCanvas.h:96
 
Main OpenMS namespace. 
Definition: FeatureDeconvolution.h:47
 
QColor precalculatedColorByIndex(Int index) const
precalculated color by its index in the table 
Definition: MultiGradient.h:148
 
Canvas for 2D-visualization of peak map, feature map and consensus map data. 
Definition: Spectrum2DCanvas.h:71
 
QColor heightColor_(float val, const MultiGradient &gradient, double snap_factor)
Returns the color associated with val for the gradient gradient. 
Definition: Spectrum2DCanvas.h:312
 
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates. 
Definition: Spectrum2DCanvas.h:325
 
double pen_size_min_
Definition: Spectrum2DCanvas.h:392
 
Int precalculatedColorIndex_(float val, const MultiGradient &gradient, double snap_factor)
Returns the position on color gradient associated with given intensity. 
Definition: Spectrum2DCanvas.h:280
 
double canvas_coverage_min_
Definition: Spectrum2DCanvas.h:394
 
MultiGradient linear_gradient_
stores the linear color gradient for non-log modes 
Definition: Spectrum2DCanvas.h:390
 
Management and storage of parameters / INI files. 
Definition: Param.h:75
 
ExperimentType projection_rt_
RT projection data. 
Definition: Spectrum2DCanvas.h:382
 
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features) 
Definition: SpectrumCanvas.h:113
 
size_t Size
Size type e.g. used as variable which can hold result of size() 
Definition: Types.h:128
 
ExperimentType projection_mz_
m/z projection data 
Definition: Spectrum2DCanvas.h:380
 
PeakIndex selected_peak_
the nearest peak/feature to the mouse cursor 
Definition: Spectrum2DCanvas.h:385
 
A gradient of multiple colors and arbitrary distances between colors. 
Definition: MultiGradient.h:68
 
int Int
Signed integer type. 
Definition: Types.h:103
 
Not implemented exception. 
Definition: Exception.h:437
 
A 2-dimensional consensus feature. 
Definition: ConsensusFeature.h:65
 
Index of a peak or feature. 
Definition: PeakIndex.h:51
 
double pen_size_max_
Definition: Spectrum2DCanvas.h:393