Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Attributes | List of all members
Annotation1DPeakItem Class Reference

A peak annotation item. More...

#include <OpenMS/VISUAL/ANNOTATION/Annotation1DPeakItem.h>

Inheritance diagram for Annotation1DPeakItem:
Annotation1DItem

Public Member Functions

 Annotation1DPeakItem (const PointType &peak_position, const QString &text, const QColor &color)
 Constructor. More...
 
 Annotation1DPeakItem (const Annotation1DPeakItem &rhs)
 Copy constructor. More...
 
virtual ~Annotation1DPeakItem ()
 Destructor. More...
 
virtual void ensureWithinDataRange (Spectrum1DCanvas *const canvas)
 Docu in base class. More...
 
virtual void draw (Spectrum1DCanvas *const canvas, QPainter &painter, bool flipped=false)
 Docu in base class. More...
 
virtual void move (const PointType &)
 Docu in base class. More...
 
const PointTypegetPeakPosition () const
 Returns the position of the label (peak) (in MZ/intensity coordinates) More...
 
void setPosition (const PointType &position)
 Sets the position of the label (in MZ/intensity coordinates) More...
 
const PointTypegetPosition () const
 Returns the position of the annotated peak (in MZ/intensity coordinates) More...
 
void setColor (const QColor &color)
 Set the color of the label. More...
 
const QColor & getColor () const
 Returns the color of the label. More...
 
- Public Member Functions inherited from Annotation1DItem
virtual ~Annotation1DItem ()
 Destructor. More...
 
const QRectF & boundingBox () const
 Returns the current bounding box of this item on the canvas where it has last been drawn. More...
 
bool isSelected () const
 Returns true if this item is currently selected on the canvas, else false. More...
 
void setSelected (bool selected)
 Sets whether this item is currently selected on the canvas or not. More...
 
void setText (const QString &text)
 Sets the text of the item. More...
 
const QString & getText () const
 Returns the text of the item. More...
 
bool editText ()
 

Protected Attributes

PointType peak_position_
 The position of the anchor (peak) (in MZ / intensity coordinates) More...
 
PointType position_
 The position of the label (in MZ / intensity coordinates) More...
 
QColor color_
 The color of the label. More...
 
- Protected Attributes inherited from Annotation1DItem
QRectF bounding_box_
 The current bounding box of this item on the canvas where it has last been drawn. More...
 
bool selected_
 Determines whether this item is currently selected on the canvas. More...
 
QString text_
 The displayed text. More...
 

Additional Inherited Members

- Public Types inherited from Annotation1DItem
typedef DPosition< 2 > PointType
 Type of the Points. More...
 
typedef float IntensityType
 Intensity type. More...
 
typedef double CoordinateType
 Coordinate type. More...
 
- Protected Member Functions inherited from Annotation1DItem
 Annotation1DItem (const QString &text)
 Constructor. More...
 
 Annotation1DItem (const Annotation1DItem &rhs)
 Copy constructor. More...
 
void drawBoundingBox_ (QPainter &painter)
 Draws the bounding_box_. More...
 

Detailed Description

A peak annotation item.

See also
Annotation1DItem

Constructor & Destructor Documentation

◆ Annotation1DPeakItem() [1/2]

Annotation1DPeakItem ( const PointType peak_position,
const QString &  text,
const QColor &  color 
)

Constructor.

◆ Annotation1DPeakItem() [2/2]

Copy constructor.

◆ ~Annotation1DPeakItem()

virtual ~Annotation1DPeakItem ( )
virtual

Destructor.

Member Function Documentation

◆ draw()

virtual void draw ( Spectrum1DCanvas *const  canvas,
QPainter &  painter,
bool  flipped = false 
)
virtual

Docu in base class.

Implements Annotation1DItem.

◆ ensureWithinDataRange()

virtual void ensureWithinDataRange ( Spectrum1DCanvas *const  canvas)
virtual

Docu in base class.

Implements Annotation1DItem.

◆ getColor()

const QColor& getColor ( ) const

Returns the color of the label.

◆ getPeakPosition()

const PointType& getPeakPosition ( ) const

Returns the position of the label (peak) (in MZ/intensity coordinates)

◆ getPosition()

const PointType& getPosition ( ) const

Returns the position of the annotated peak (in MZ/intensity coordinates)

◆ move()

virtual void move ( const PointType )
virtual

Docu in base class.

Implements Annotation1DItem.

◆ setColor()

void setColor ( const QColor &  color)

Set the color of the label.

◆ setPosition()

void setPosition ( const PointType position)

Sets the position of the label (in MZ/intensity coordinates)

Member Data Documentation

◆ color_

QColor color_
protected

The color of the label.

◆ peak_position_

PointType peak_position_
protected

The position of the anchor (peak) (in MZ / intensity coordinates)

◆ position_

PointType position_
protected

The position of the label (in MZ / intensity coordinates)


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:07 using doxygen 1.8.13