Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | Friends

Spectrum3DCanvas Class Reference
[Spectrum visualizaion widgets]

Canvas for 3D-visualization of peak map data. More...

#include <OpenMS/VISUAL/Spectrum3DCanvas.h>

Inheritance diagram for Spectrum3DCanvas:
SpectrumCanvas QWidget DefaultParamHandler

List of all members.

Public Types

enum  ShadeModes { SHADE_FLAT = 0, SHADE_SMOOTH = 1 }
 

Different shade modes.

More...

Public Slots

void activateLayer (Size layer_index)
 change the active layer (the one that is used for selecting and so on)
void removeLayer (Size layer_index)
 removes the layer with index layer_index
virtual void updateLayer (Size i)
 Updates layer i when the data in the corresponding file changes.

Signals

void showCurrentPeaksAs2D ()
 Requests to display all spectra in 2D plot.

Public Member Functions

 Spectrum3DCanvas (const Param &preferences, QWidget *parent=0)
 Constructor.
virtual ~Spectrum3DCanvas ()
 Destructor.
Spectrum3DOpenGLCanvasopenglwidget ()
 returns the Spectrum3DOpenGLcanvas
bool isLegendShown () const
 Returns if the legend is shown.
void showLegend (bool)
 Shows/hides the legend.
virtual void showCurrentLayerPreferences ()
 Shows the preferences dialog of the active layer.
virtual void saveCurrentLayer (bool visible)
 Saves the current layer data.
Remplemented Qt events

void resizeEvent (QResizeEvent *e)
void contextMenuEvent (QContextMenuEvent *e)

Public Attributes

Spectrum3DOpenGLCanvasopenglcanvas_
 pointer to the SpectrumOpenGLCanvas implementation

Protected Slots

void currentLayerParamtersChanged_ ()
 Reacts on changed layer paramters.

Protected Member Functions

bool finishAdding_ ()
 Method that is called when a new layer has been added.
virtual void update_ (const char *caller_name=0)
 Updates the diplayed data.
virtual void translateLeft_ ()
 Translation bound to the 'Left' key.
virtual void translateRight_ ()
 Translation bound to the 'Rightt' key.
virtual void translateForward_ ()
 Translation bound to the 'Up' key.
virtual void translateBackward_ ()
 Translation bound to the 'Down' key.

Protected Attributes

bool legend_shown_
 whether the legend is shoen or not

Friends

class Spectrum3DOpenGLCanvas

Detailed Description

Canvas for 3D-visualization of peak map data.

The Spectrum3DCanvas uses the helper class Spectrum3DOpenGLCanvas for the actual 3D rendering. Deriving Spectrum3DCanvas directly from QGLWidget is not possible due to the "Deadly Diamond" shape of inheritence.

Spectrum3DWidget.png
Parameters of this class are:

NameTypeDefaultRestrictionsDescription
default_path string.  Default path for loading/storing data.
background_color string@#ffffff  Background color
dot:shade_mode int1 min: 0 max: 1Shade mode: single-color ('flat') or gradient peaks ('smooth').
dot:gradient stringLinear|0,@#ffea00;6,@#ff0000;14,@#aa00ff;23,@#5500ff;100,@#000000  Peak color gradient.
dot:interpolation_steps int1000 min: 1 max: 1000Interpolation steps for peak color gradient precalculation.
dot:line_width int2 min: 1 max: 99Line width for peaks.

Note:

Member Enumeration Documentation

enum ShadeModes

Different shade modes.

Enumerator:
SHADE_FLAT 
SHADE_SMOOTH 

Constructor & Destructor Documentation

Spectrum3DCanvas ( const Param preferences,
QWidget parent = 0 
)

Constructor.

virtual ~Spectrum3DCanvas (  )  [virtual]

Destructor.


Member Function Documentation

void activateLayer ( Size  layer_index  )  [virtual, slot]

change the active layer (the one that is used for selecting and so on)

Implements SpectrumCanvas.

void contextMenuEvent ( QContextMenuEvent *  e  ) 
void currentLayerParamtersChanged_ (  )  [protected, slot]

Reacts on changed layer paramters.

bool finishAdding_ (  )  [protected, virtual]

Method that is called when a new layer has been added.

Implements SpectrumCanvas.

bool isLegendShown (  )  const

Returns if the legend is shown.

Spectrum3DOpenGLCanvas* openglwidget (  ) 

returns the Spectrum3DOpenGLcanvas

void removeLayer ( Size  layer_index  )  [virtual, slot]

removes the layer with index layer_index

Implements SpectrumCanvas.

void resizeEvent ( QResizeEvent *  e  ) 

Reimplemented from SpectrumCanvas.

virtual void saveCurrentLayer ( bool  visible  )  [virtual]

Saves the current layer data.

Parameters:
visible If true, only the visible data is stored. Otherwise the whole data is stored.

Implements SpectrumCanvas.

virtual void showCurrentLayerPreferences (  )  [virtual]

Shows the preferences dialog of the active layer.

Implements SpectrumCanvas.

void showCurrentPeaksAs2D (  )  [signal]

Requests to display all spectra in 2D plot.

void showLegend ( bool   ) 

Shows/hides the legend.

virtual void translateBackward_ (  )  [protected, virtual]

Translation bound to the 'Down' key.

Reimplemented from SpectrumCanvas.

virtual void translateForward_ (  )  [protected, virtual]

Translation bound to the 'Up' key.

Reimplemented from SpectrumCanvas.

virtual void translateLeft_ (  )  [protected, virtual]

Translation bound to the 'Left' key.

Reimplemented from SpectrumCanvas.

virtual void translateRight_ (  )  [protected, virtual]

Translation bound to the 'Rightt' key.

Reimplemented from SpectrumCanvas.

virtual void update_ ( const char *  caller_name = 0  )  [protected, virtual]

Updates the diplayed data.

The default implementation calls QWidget::update().

This method is reimplemented in the 3D view to update the OpenGL widget.

Parameters:
caller_name Name of the calling function (use __PRETTY_FUNCTION__).

Reimplemented from SpectrumCanvas.

virtual void updateLayer ( Size  i  )  [virtual, slot]

Updates layer i when the data in the corresponding file changes.

Implements SpectrumCanvas.


Friends And Related Function Documentation

friend class Spectrum3DOpenGLCanvas [friend]

Member Data Documentation

bool legend_shown_ [protected]

whether the legend is shoen or not

pointer to the SpectrumOpenGLCanvas implementation


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:58 using doxygen 1.7.1