00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // -------------------------------------------------------------------------- 00005 // OpenMS Mass Spectrometry Framework 00006 // -------------------------------------------------------------------------- 00007 // Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert 00008 // 00009 // This library is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public2 00011 // License as published by the Free Software Foundation; either 00012 // version 2.1 of the License, or (at your option) any later version. 00013 // 00014 // This library is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 // 00023 // -------------------------------------------------------------------------- 00024 // $Maintainer: Marc Sturm $ 00025 // -------------------------------------------------------------------------- 00026 00027 #ifndef OPENMS_VISUAL_SPECTRUM3DCANVAS_H 00028 #define OPENMS_VISUAL_SPECTRUM3DCANVAS_H 00029 00030 // OpenMS 00031 #include <OpenMS/VISUAL/SpectrumCanvas.h> 00032 00033 class QPainter; 00034 class QGLWidget; 00035 class QResizeEvent; 00036 00037 namespace OpenMS 00038 { 00039 class Spectrum3DOpenGLCanvas; 00040 00054 class Spectrum3DCanvas 00055 : public SpectrumCanvas 00056 { 00057 Q_OBJECT 00058 00059 friend class Spectrum3DOpenGLCanvas; 00060 00061 public: 00063 Spectrum3DCanvas(const Param& preferences, QWidget* parent = 0); 00065 virtual ~Spectrum3DCanvas(); 00066 00068 enum ShadeModes 00069 { 00070 SHADE_FLAT = 0, 00071 SHADE_SMOOTH = 1 00072 }; 00073 00075 Spectrum3DOpenGLCanvas* openglwidget(); 00076 00077 // Docu in base class 00078 Int finishAdding(); 00079 00081 00082 void resizeEvent(QResizeEvent* e); 00083 void contextMenuEvent(QContextMenuEvent* e); 00085 00086 bool isLegendShown() const; 00088 void showLegend(bool); 00090 Spectrum3DOpenGLCanvas* openglcanvas_; 00091 00092 // docu in base class 00093 virtual void showCurrentLayerPreferences(); 00094 00095 // Docu in base class 00096 virtual void saveCurrentLayer(bool visible); 00097 00098 public slots: 00099 // Docu in base class 00100 void activateLayer(int layer_index); 00101 // Docu in base class 00102 void removeLayer(int layer_index); 00103 00104 protected: 00105 // Docu in base class 00106 virtual void intensityModeChange_(); 00116 virtual void changeVisibleArea_(const AreaType& new_area, bool add_to_stack = false); 00117 00118 // Docu in base class 00119 virtual void currentLayerParamtersChanged_(); 00120 00121 // Reimplementation in order to update the OpenGL widget 00122 virtual void update_(const char* caller_name); 00123 00125 double area_; 00127 bool legend_shown_; 00128 }; 00129 00130 } //namespace 00131 #endif
Generated Tue Apr 1 15:36:38 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |