libpappsomspp
Library for mass spectrometry
precisionwidget.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/widget/precisionwidget/precisionwidget.h
3  * \date 5/1/2018
4  * \author Olivier Langella
5  * \brief edit presicion in ppm or dalton
6  */
7 
8 
9 /*******************************************************************************
10  * Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.fr>.
11  *
12  * This file is part of the PAPPSOms++ library.
13  *
14  * PAPPSOms++ is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation, either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * PAPPSOms++ is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
26  *
27  * Contributors:
28  * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
29  *implementation
30  ******************************************************************************/
31 
32 #pragma once
33 
34 
35 #include <QWidget>
36 #include <QComboBox>
37 #include <QDoubleSpinBox>
38 
39 #include "../../exportinmportconfig.h"
40 #include "../../mzrange.h"
41 
42 namespace pappso
43 {
44 
45 class PMSPP_LIB_DECL PrecisionWidget : public QWidget
46 {
47  Q_OBJECT
48 
49  private:
50  QComboBox *mp_unitComboBox;
51 
52  QDoubleSpinBox *mp_ppmValueSpinBox;
53  QDoubleSpinBox *mp_resValueSpinBox;
54  QDoubleSpinBox *mp_daltonValueSpinBox;
55 
59 
61 
62  Q_SLOT void setCurrentIndex(int);
63  Q_SLOT void setPpmValueChanged(double);
64  Q_SLOT void setResValueChanged(double);
65  Q_SLOT void setDaltonValueChanged(double);
66 
67  public:
68  PrecisionWidget(QWidget *parent = 0);
69  ~PrecisionWidget();
70 
71  void setPrecision(PrecisionPtr precision);
72  const PrecisionPtr &getPrecision() const;
73 
74  signals:
75  void precisionChanged(pappso::PrecisionPtr precision) const;
76 };
77 
78 
79 } // namespace pappso
QDoubleSpinBox * mp_daltonValueSpinBox
QDoubleSpinBox * mp_ppmValueSpinBox
void precisionChanged(pappso::PrecisionPtr precision) const
PrecisionPtr mp_precisionRes
QDoubleSpinBox * mp_resValueSpinBox
PrecisionPtr mp_precisionDalton
PrecisionPtr mp_precisionPpm
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39