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

Spectrum2DWidget.h (Maintainer: Marc Sturm)

Go to the documentation of this file.
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 Public
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_SPECTRUM2DWIDGET_H
00028 #define OPENMS_VISUAL_SPECTRUM2DWIDGET_H
00029 
00030 // OpenMS
00031 #include <OpenMS/VISUAL/SpectrumWidget.h>
00032 #include <OpenMS/VISUAL/Spectrum1DWidget.h>
00033 #include <OpenMS/VISUAL/Spectrum2DCanvas.h>
00034 
00035 class QGroupBox;
00036 class QLabel;
00037 
00038 namespace OpenMS
00039 {
00040   class Spectrum2DCanvas;
00041   
00053   class Spectrum2DWidget 
00054     : public SpectrumWidget
00055   {
00056     Q_OBJECT
00057   public:
00058 
00060     Spectrum2DWidget(const Param& preferences, QWidget* parent = 0);
00062     virtual ~Spectrum2DWidget();
00063     
00065     inline Spectrum2DCanvas* canvas()
00066     {
00067       return static_cast<Spectrum2DCanvas*>(canvas_);
00068     }
00069 
00071     const Spectrum1DWidget* getHorizontalProjection() const;
00073     const Spectrum1DWidget* getVerticalProjection() const;
00074 
00075   public slots: 
00076     // Docu in base class
00077     virtual void recalculateAxes_();
00079     void hideProjections();
00080     // Docu in base class
00081     virtual void showGoToDialog();
00082     
00083   signals:
00089     void visibleAreaChanged(DRange<2> area);
00091     void showCurrentPeaksAs3D();
00093     void showSpectrumAs1D(int index);
00094 
00095   protected:
00096     // Docu in base class
00097     virtual Math::Histogram<UInt,float> createIntensityDistribution_();
00098     
00100     Spectrum1DWidget* projection_vert_;
00102     Spectrum1DWidget* projection_horz_;
00104     QGroupBox* projection_box_;
00106     QLabel* projection_peaks_;
00108     QLabel* projection_sum_;
00110     QLabel* projection_max_;
00111 
00112   private slots:
00114     void horizontalProjection(const MSExperiment<>&, Spectrum1DCanvas::DrawModes);
00116     void verticalProjection(const MSExperiment<>&, Spectrum1DCanvas::DrawModes);
00118     void projectionInfo(int peaks, double intensity, double max);
00119 
00120   };
00121 }
00122 
00123 #endif

Generated Tue Apr 1 15:36:38 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1