Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

Spectrum3DCanvas Class Reference
[Spectrum visualizaion widgets]

#include <OpenMS/VISUAL/Spectrum3DCanvas.h>

Inheritance diagram for Spectrum3DCanvas:

SpectrumCanvas QWidget DefaultParamHandler

List of all members.


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

Spectrum3DCanvas Parameters are explained on a separate page.

Public Types

enum  ShadeModes { SHADE_FLAT = 0, SHADE_SMOOTH = 1 }
 Different shade modes. More...

Public Slots

void activateLayer (int layer_index)
 change the active layer (the one that is used for selecting and so on)
void removeLayer (int layer_index)
 removes the layer with index layer_index

Public Member Functions

 Spectrum3DCanvas (const Param &preferences, QWidget *parent=0)
 Constructor.
virtual ~Spectrum3DCanvas ()
 Destructor.
Spectrum3DOpenGLCanvasopenglwidget ()
 returns the Spectrum3DOpenGLcanvas
Int finishAdding ()
 Finish adding data after call to addEmptyPeakLayer().
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)
 reimplemented QT event
void contextMenuEvent (QContextMenuEvent *e)

Public Attributes

Spectrum3DOpenGLCanvasopenglcanvas_
 pointer to the SpectrumOpenGLCanvas implementation

Protected Member Functions

virtual void intensityModeChange_ ()
 This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes.
virtual void changeVisibleArea_ (const AreaType &new_area, bool add_to_stack=false)
 Sets the visible area.
virtual void currentLayerParamtersChanged_ ()
 Change of layer parameters.
virtual void update_ (const char *caller_name)
 Updates the diplayed data.

Protected Attributes

double area_
 area of the layer
bool legend_shown_
 whether the legend is shoen or not

Friends

class Spectrum3DOpenGLCanvas


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

Spectrum3DOpenGLCanvas* openglwidget (  ) 

returns the Spectrum3DOpenGLcanvas

Int finishAdding (  )  [virtual]

Finish adding data after call to addEmptyPeakLayer().

You can use this method instead of addLayer (add by copy). First call addEmptyPeakLayer(),then fill returned reference and finally call finishAdding(float).

Returns:
the index of the new layer

Implements SpectrumCanvas.

void resizeEvent ( QResizeEvent *  e  ) 

reimplemented QT event

Reimplemented from SpectrumCanvas.

void contextMenuEvent ( QContextMenuEvent *  e  ) 

bool isLegendShown (  )  const

Returns if the legend is shown.

void showLegend ( bool   ) 

Shows/hides the legend.

virtual void showCurrentLayerPreferences (  )  [virtual]

Shows the preferences dialog of the active layer.

Implements 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.

void activateLayer ( int  layer_index  )  [virtual, slot]

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

Implements SpectrumCanvas.

void removeLayer ( int  layer_index  )  [virtual, slot]

removes the layer with index layer_index

Implements SpectrumCanvas.

virtual void intensityModeChange_ (  )  [protected, virtual]

This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes.

Reimplemented from SpectrumCanvas.

virtual void changeVisibleArea_ ( const AreaType new_area,
bool  add_to_stack = false 
) [protected, virtual]

Sets the visible area.

Changes the visible area, adjustes the zoom stack and notifies interested clients about the change. If parts of the area are outside of the data area, the new area will be adjusted.

Parameters:
new_area The new visible area.
add_to_stack If the new area is to add to the zoom_stack_

Reimplemented from SpectrumCanvas.

virtual void currentLayerParamtersChanged_ (  )  [protected, virtual]

Change of layer parameters.

This method is called whenever the paramters of the current layer change. Reimplement if you need to react on such changes.

Reimplemented from SpectrumCanvas.

virtual void update_ ( const char *  caller_name  )  [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.


Friends And Related Function Documentation

friend class Spectrum3DOpenGLCanvas [friend]


Member Data Documentation

Spectrum3DOpenGLCanvas* openglcanvas_

pointer to the SpectrumOpenGLCanvas implementation

double area_ [protected]

area of the layer

bool legend_shown_ [protected]

whether the legend is shoen or not


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:48 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1