Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Spectrum2DWidget.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2013.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg$
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_VISUAL_SPECTRUM2DWIDGET_H
36 #define OPENMS_VISUAL_SPECTRUM2DWIDGET_H
37 
38 // OpenMS
41 
42 class QGroupBox;
43 class QLabel;
44 class QCheckBox;
45 
46 namespace OpenMS
47 {
48  class Spectrum1DWidget;
49 
61  class OPENMS_GUI_DLLAPI Spectrum2DWidget :
62  public SpectrumWidget
63  {
64  Q_OBJECT
65 public:
68 
70  Spectrum2DWidget(const Param & preferences, QWidget * parent = 0);
72  virtual ~Spectrum2DWidget();
73 
76  {
77  return static_cast<Spectrum2DCanvas *>(canvas_);
78  }
79 
81  const Spectrum1DWidget * getHorizontalProjection() const;
83  const Spectrum1DWidget * getVerticalProjection() const;
84 
86  bool projectionsVisible() const;
87 
88 
89 public slots:
90  // Docu in base class
91  virtual void recalculateAxes_();
93  void toggleProjections();
95  void updateProjections();
96  // Docu in base class
97  virtual void showGoToDialog();
98 
99 signals:
105  void visibleAreaChanged(DRange<2> area);
107  void showSpectrumAs1D(int index);
108  void showSpectrumAs1D(std::vector<int, std::allocator<int> > indices);
110  void showCurrentPeaksAs3D();
111 
112 protected:
113  // Docu in base class
114  virtual Math::Histogram<> createIntensityDistribution_() const;
115  // Docu in base class
116  virtual Math::Histogram<> createMetaDistribution_(const String & name) const;
117 
123  QGroupBox * projection_box_;
127  QLabel * projection_sum_;
129  QLabel * projection_max_;
131  QCheckBox * projections_auto_;
134 
135 private slots:
137  void horizontalProjection(ExperimentSharedPtrType, Spectrum1DCanvas::DrawModes);
139  void verticalProjection(ExperimentSharedPtrType exp, Spectrum1DCanvas::DrawModes);
141  void projectionInfo(int peaks, double intensity, double max);
143  void autoUpdateProjections();
144  };
145 }
146 
147 #endif
A more convenient string class.
Definition: String.h:56
DrawModes
Enumerate all avaiable paint styles.
Definition: Spectrum1DCanvas.h:84
QLabel * projection_max_
Intensity maximum of the projection.
Definition: Spectrum2DWidget.h:129
Widget for 2D-visualization of peak map and feature map data.
Definition: Spectrum2DWidget.h:61
QTimer * projections_timer_
Timer that triggers auto-update of projections.
Definition: Spectrum2DWidget.h:133
Canvas for 2D-visualization of peak map, feature map and consensus map data.
Definition: Spectrum2DCanvas.h:67
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:120
Spectrum1DWidget * projection_vert_
Vertical projection widget.
Definition: Spectrum2DWidget.h:119
QCheckBox * projections_auto_
Checkbox that indicates that projections should be automatically updated (with a slight delay) ...
Definition: Spectrum2DWidget.h:131
Spectrum1DWidget * projection_horz_
Horizontal projection widget.
Definition: Spectrum2DWidget.h:121
Spectrum2DCanvas * canvas()
This method is overwritten to make the class specific members accessible.
Definition: Spectrum2DWidget.h:75
Widget for visualization of several spectra.
Definition: Spectrum1DWidget.h:63
QLabel * projection_sum_
Intensity sum of the projection.
Definition: Spectrum2DWidget.h:127
Base class for spectrum widgets.
Definition: SpectrumWidget.h:71
Representation of a histogram.
Definition: Histogram.h:64
QLabel * projection_peaks_
Number of peaks of the projection.
Definition: Spectrum2DWidget.h:125
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: Spectrum2DWidget.h:67
Management and storage of parameters / INI files.
Definition: Param.h:69
QGroupBox * projection_box_
Group box that shows information about the projections.
Definition: Spectrum2DWidget.h:123

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:21 using doxygen 1.8.5