#include <OpenMS/VISUAL/Spectrum3DCanvas.h>
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.
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. | |
Spectrum3DOpenGLCanvas * | openglwidget () |
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 | |
Spectrum3DOpenGLCanvas * | openglcanvas_ |
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 |
enum ShadeModes |
Spectrum3DCanvas | ( | const Param & | preferences, | |
QWidget * | parent = 0 | |||
) |
Constructor.
virtual ~Spectrum3DCanvas | ( | ) | [virtual] |
Destructor.
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).
Implements SpectrumCanvas.
void resizeEvent | ( | QResizeEvent * | e | ) |
void contextMenuEvent | ( | QContextMenuEvent * | e | ) |
bool isLegendShown | ( | ) | const |
Returns if the legend is shown.
void showLegend | ( | bool | ) |
Shows/hides the legend.
virtual void showCurrentLayerPreferences | ( | ) | [virtual] |
virtual void saveCurrentLayer | ( | bool | visible | ) | [virtual] |
Saves the current layer data.
visible | If true, only the visible data is stored. Otherwise the whole data is stored. |
Implements SpectrumCanvas.
void activateLayer | ( | int | layer_index | ) | [virtual, slot] |
void removeLayer | ( | int | layer_index | ) | [virtual, slot] |
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.
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.
caller_name | Name of the calling function (use __PRETTY_FUNCTION__). |
Reimplemented from SpectrumCanvas.
friend class Spectrum3DOpenGLCanvas [friend] |
pointer to the SpectrumOpenGLCanvas implementation
double area_ [protected] |
area of the layer
bool legend_shown_ [protected] |
whether the legend is shoen or not
Generated Tue Apr 1 15:36:48 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |