| OpenMS 2.5.0

Public Types | Public Member Functions | Public Attributes | List of all members
Annotations1DContainer Class Reference

Container for annotations to content of Spectrum1DCanvas. More...

`#include <OpenMS/VISUAL/ANNOTATION/Annotations1DContainer.h>`

Inheritance diagram for Annotations1DContainer:

## Public Types

typedef std::list< Annotation1DItem * >::iterator | Iterator
| Iterator for the 1D annotations. More...
typedef std::list< Annotation1DItem * >::const_iterator | ConstIterator
| Const iterator for the 1D annotations. More...
typedef DPosition< 2 > | PointType
| Type of the Points. More...
typedef double | CoordinateType
| Coordinate type. More...

## Public Member Functions

| Annotations1DContainer ()
| Default constructor. More...
| Annotations1DContainer (const Annotations1DContainer &rhs)
| Copy constructor. More...
Annotations1DContainer & | operator= (const Annotations1DContainer &rhs)
| Assignment operator. More...
virtual | ~Annotations1DContainer ()
| Destructor. More...
Annotation1DItem * | getItemAt (const QPoint &pos) const
| Returns a pointer to the item at `pos`, or 0, if not existent. More...
void | selectItemAt (const QPoint &pos)
| Selects the item at `pos` on the canvas, if it exists. More...
void | deselectItemAt (const QPoint &pos)
| Deselects the item at `pos` on the canvas, if it exists. More...
void | selectAll ()
| Selects all items. More...
void | deselectAll ()
| Deselects all items. More...
void | removeSelectedItems ()
| Removes the selected items. More...
std::vector< Annotation1DItem * > | getSelectedItems ()
| Returns the selected items. More...
void | setPen (const QPen &pen)
| Sets the pen_. More...
const QPen & | getPen () const
| Returns the pen_. More...
void | setSelectedPen (const QPen &pen)
| Sets the selected_pen_. More...
const QPen & | getSelectedPen () const
| Returns the selected_pen_. More...

## Public Attributes

QPen | pen_
| The pen used to draw items. More...
QPen | selected_pen_
| The pen used to draw selected items. More...

## Detailed Description

Container for annotations to content of Spectrum1DCanvas.

## Member Typedef Documentation

## ◆ ConstIterator

typedef std::list<Annotation1DItem *>::const_iterator ConstIterator

Const iterator for the 1D annotations.

## ◆ CoordinateType

typedef double CoordinateType

Coordinate type.

## ◆ Iterator

typedef std::list<Annotation1DItem *>::iterator Iterator

Iterator for the 1D annotations.

## ◆ PointType

typedef DPosition<2> PointType

Type of the Points.

## Constructor & Destructor Documentation

## ◆ Annotations1DContainer() [1/2]

Annotations1DContainer | ( |  | ) |

Default constructor.

## ◆ Annotations1DContainer() [2/2]

Annotations1DContainer | ( | const Annotations1DContainer & | rhs | ) |

Copy constructor.

## ◆ ~Annotations1DContainer()

virtual ~Annotations1DContainer | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## ◆ deselectAll()

void deselectAll | ( |  | ) |

Deselects all items.

## ◆ deselectItemAt()

void deselectItemAt | ( | const QPoint & | pos | ) |

Deselects the item at `pos` on the canvas, if it exists.

## ◆ getItemAt()

Annotation1DItem* getItemAt | ( | const QPoint & | pos | ) | const

Returns a pointer to the item at `pos`, or 0, if not existent.

If more than one item's bounding box encloses `pos` , the one in the foreground is returned.

## ◆ getPen()

const QPen& getPen | ( |  | ) | const

Returns the pen_.

## ◆ getSelectedItems()

std::vector<Annotation1DItem*> getSelectedItems | ( |  | ) |

Returns the selected items.

## ◆ getSelectedPen()

const QPen& getSelectedPen | ( |  | ) | const

Returns the selected_pen_.

## ◆ operator=()

Annotations1DContainer& operator= | ( | const Annotations1DContainer & | rhs | ) |

Assignment operator.

## ◆ removeSelectedItems()

void removeSelectedItems | ( |  | ) |

Removes the selected items.

## ◆ selectAll()

void selectAll | ( |  | ) |

Selects all items.

## ◆ selectItemAt()

void selectItemAt | ( | const QPoint & | pos | ) |

Selects the item at `pos` on the canvas, if it exists.

## ◆ setPen()

void setPen | ( | const QPen & | pen | ) |

Sets the pen_.

## ◆ setSelectedPen()

void setSelectedPen | ( | const QPen & | pen | ) |

Sets the selected_pen_.

## Member Data Documentation

## ◆ pen_

QPen pen_

The pen used to draw items.

## ◆ selected_pen_

QPen selected_pen_

The pen used to draw selected items.