Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
GradientVisualizer.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 
36 #ifndef OPENMS_VISUAL_VISUALIZER_GRADIENTVISUALIZER_H
37 #define OPENMS_VISUAL_VISUALIZER_GRADIENTVISUALIZER_H
38 
39 //OpenMS
43 
44 //STL
45 #include <vector>
46 
47 class QIntValidator;
48 
49 namespace OpenMS
50 {
56  class OPENMS_GUI_DLLAPI GradientVisualizer :
57  public BaseVisualizerGUI,
58  public BaseVisualizer<Gradient>
59  {
60  Q_OBJECT
61 
62 public:
63 
65  GradientVisualizer(bool editable = false, QWidget * parent = 0);
66 
67  //Docu in base class
68  void load(Gradient & g);
69 
70 public slots:
71 
72  //Docu in base class
73  void store();
74 
75 protected slots:
76 
78  void addTimepoint_();
80  void addEluent_();
82  void deleteData_();
84  void undo_();
85 
86 protected:
88  void loadData_();
90  void removeData_();
91 
92 
99 
103  std::vector<String> eluents_;
104  std::vector<Int> timepoints_;
106 
110  QPushButton * add_eluent_button_;
111  QPushButton * add_timepoint_button_;
112  QPushButton * removebutton_;
114 
116  std::vector<QLineEdit *> gradientdata_;
117 
119  std::vector<QLabel *> gradientlabel_;
120 
123 
125  QIntValidator * timepoint_vali_;
126 
128  int nextrow_;
129 
131  QGridLayout * viewlayout_;
132 
133  //Docu in base class
134  void update_();
135  };
136 
137 
138 }
139 #endif
GradientVisualizer is a visualizer class for objects of type gradient.
Definition: GradientVisualizer.h:56
A base class for all visualizer classes.
Definition: BaseVisualizer.h:53
A base class for all visualizer classes.
Definition: BaseVisualizerGUI.h:63
QGridLayout * viewlayout_
The layout to display the eluents, timepoints and percentages.
Definition: GradientVisualizer.h:131
QLineEdit * percentage_
Pointer to fields with actual data.
Definition: GradientVisualizer.h:122
std::vector< String > eluents_
Definition: GradientVisualizer.h:103
QPushButton * add_timepoint_button_
Definition: GradientVisualizer.h:111
Representation of a HPLC gradient.
Definition: Gradient.h:53
std::vector< QLabel * > gradientlabel_
Array of temporary pointers to gradient labels.
Definition: GradientVisualizer.h:119
int nextrow_
Counter to keep track of the actual row in the layout.
Definition: GradientVisualizer.h:128
QIntValidator * timepoint_vali_
A validator to check the input for the new timepoint.
Definition: GradientVisualizer.h:125
QLineEdit * new_timepoint_
Definition: GradientVisualizer.h:97
std::vector< QLineEdit * > gradientdata_
Array of temporary pointers to gradient edit fields.
Definition: GradientVisualizer.h:116
QLineEdit * new_eluent_
Definition: GradientVisualizer.h:96
QPushButton * add_eluent_button_
Definition: GradientVisualizer.h:110
QPushButton * removebutton_
Definition: GradientVisualizer.h:112
std::vector< Int > timepoints_
Definition: GradientVisualizer.h:104

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