OpenMS
Loading...
Searching...
No Matches
Painter2DPeak Class Reference

Painter2D for spectra. More...

#include <OpenMS/VISUAL/Painter2DBase.h>

Inheritance diagram for Painter2DPeak:
[legend]
Collaboration diagram for Painter2DPeak:
[legend]

Public Member Functions

 Painter2DPeak (const LayerDataPeak *parent)
 C'tor which remembers the layer to paint.
 
void paint (QPainter *, Plot2DCanvas *canvas, int layer_index) override
 Paints items using the given painter onto the canvas.
 
- Public Member Functions inherited from Painter2DBase
virtual ~Painter2DBase ()=default
 
virtual void highlightElement (QPainter *painter, Plot2DCanvas *canvas, const PeakIndex element)
 Emphasize a certain element (e.g. feature), e.g. when mouse hovering. By default, nothing is highlighted. Override for subclasses if you need highlighting.
 

Protected Member Functions

void paintAllIntensities_ (QPainter &painter, Plot2DCanvas *canvas, Size layer_index, double pen_width)
 
void paintMaximumIntensities_ (QPainter &painter, Plot2DCanvas *canvas, Size layer_index, Size rt_pixel_count, Size mz_pixel_count)
 Paints maximum intensity of individual peaks.
 
void paintPrecursorPeaks_ (QPainter &painter, Plot2DCanvas *canvas)
 Paints the locations where MS2 scans where triggered.
 

Protected Attributes

const LayerDataPeaklayer_
 the data to paint
 

Additional Inherited Members

- Static Public Member Functions inherited from PainterBase
static ShapeIcon toShapeIcon (const String &icon)
 
static void drawDashedLine (const QPoint &from, const QPoint &to, QPainter *painter, const QColor &color)
 static method to draw a dashed line
 
static void drawCross (const QPoint &position, QPainter *painter, const int size=8)
 draw a cross at position, using a certain size (= width = height) of the cross
 
static void drawCaret (const QPoint &position, QPainter *painter, const int size=8)
 draw a caret '^' at position, using a certain size (= width) of the caret
 
static void drawDiamond (const QPoint &position, QPainter *painter, const int size=8)
 draw an unfilled diamond at position, using a certain size (= width = height) of the diamond
 
static void drawIcon (const QPoint &pos, const QRgb &color, const ShapeIcon icon, Size s, QPainter &p)
 draws squares, circles etc
 
static QPainterPath getOpenArrow (int arrow_width)
 An arrow head which is open, i.e. '>'.
 
static QPainterPath getClosedArrow (int arrow_width)
 An arrow head which is closed, i.e. a triangle.
 
static QRectF drawLineWithArrows (QPainter *painter, const QPen &pen, const QPoint &start, const QPoint &end, const QPainterPath &arrow_start=QPainterPath(), const QPainterPath &arrow_end=QPainterPath())
 
- Static Protected Member Functions inherited from Painter2DBase
static void paintConvexHull_ (QPainter &painter, Plot2DCanvas *canvas, const ConvexHull2D &hull, bool has_identifications)
 Paints a convex hull.
 
static void paintConvexHulls_ (QPainter &painter, Plot2DCanvas *canvas, const std::vector< ConvexHull2D > &hulls, bool has_identifications)
 Paints convex hulls.
 
static void paintPeptideIDs_ (QPainter *painter, Plot2DCanvas *canvas, const IPeptideIds::PepIds &ids, int layer_index)
 

Detailed Description

Painter2D for spectra.

Constructor & Destructor Documentation

◆ Painter2DPeak()

Painter2DPeak ( const LayerDataPeak parent)

C'tor which remembers the layer to paint.

Member Function Documentation

◆ paint()

void paint ( QPainter *  painter,
Plot2DCanvas canvas,
int  layer_index 
)
overridevirtual

Paints items using the given painter onto the canvas.

Parameters
[in]painterThe painter used for drawing
[in]canvasThe canvas to paint onto (should expose all the details needed, like canvas size, draw mode, colors etc)
[in]layer_indexWhich layer is currently painted

Implements Painter2DBase.

◆ paintAllIntensities_()

void paintAllIntensities_ ( QPainter &  painter,
Plot2DCanvas canvas,
Size  layer_index,
double  pen_width 
)
protected

◆ paintMaximumIntensities_()

void paintMaximumIntensities_ ( QPainter &  painter,
Plot2DCanvas canvas,
Size  layer_index,
Size  rt_pixel_count,
Size  mz_pixel_count 
)
protected

Paints maximum intensity of individual peaks.

Paints the peaks as small ellipses. The peaks are colored according to the selected dot gradient.

Parameters
[in]painterThe QPainter to paint with.
[in]canvasThe canvas to paint on.
[in]layer_indexThe index of the layer.
[in]rt_pixel_count
[in]mz_pixel_count

◆ paintPrecursorPeaks_()

void paintPrecursorPeaks_ ( QPainter &  painter,
Plot2DCanvas canvas 
)
protected

Paints the locations where MS2 scans where triggered.

Member Data Documentation

◆ layer_

const LayerDataPeak* layer_
protected

the data to paint