OpenMS  2.7.0
Public Member Functions | Protected Attributes | Private Attributes | List of all members
LayerStack Class Reference

#include <OpenMS/VISUAL/PlotCanvas.h>

Collaboration diagram for LayerStack:
[legend]

Public Member Functions

void addLayer (LayerData &&new_layer)
 adds a new layer and makes it the current layer More...
 
const LayerDatagetLayer (const Size index) const
 
LayerDatagetLayer (const Size index)
 
const LayerDatagetCurrentLayer () const
 
LayerDatagetCurrentLayer ()
 
void setCurrentLayer (Size index)
 throws Exception::IndexOverflow unless index is smaller than getLayerCount() More...
 
Size getCurrentLayerIndex () const
 
bool empty () const
 
Size getLayerCount () const
 
void removeLayer (Size layer_index)
 
void removeCurrentLayer ()
 

Protected Attributes

std::vector< LayerDatalayers_
 

Private Attributes

Size current_layer_ = -1
 

Detailed Description

A class to manage a stack of layers as shown in the layer widget in TOPPView. The order of layers is automatically determined based on LayerData::type (in short: peak data below, ID data on top).

Member Function Documentation

◆ addLayer()

void addLayer ( LayerData &&  new_layer)

adds a new layer and makes it the current layer

◆ empty()

bool empty ( ) const

◆ getCurrentLayer() [1/2]

LayerData& getCurrentLayer ( )

◆ getCurrentLayer() [2/2]

const LayerData& getCurrentLayer ( ) const

◆ getCurrentLayerIndex()

Size getCurrentLayerIndex ( ) const

◆ getLayer() [1/2]

LayerData& getLayer ( const Size  index)

◆ getLayer() [2/2]

const LayerData& getLayer ( const Size  index) const

◆ getLayerCount()

Size getLayerCount ( ) const

◆ removeCurrentLayer()

void removeCurrentLayer ( )

◆ removeLayer()

void removeLayer ( Size  layer_index)

◆ setCurrentLayer()

void setCurrentLayer ( Size  index)

throws Exception::IndexOverflow unless index is smaller than getLayerCount()

Member Data Documentation

◆ current_layer_

Size current_layer_ = -1
private

◆ layers_

std::vector<LayerData> layers_
protected