libpappsomspp
Library for mass spectrometry
precisionwidget.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/widget/precision/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
pappso::PrecisionWidget::precisionChanged
void precisionChanged(pappso::PrecisionPtr precision) const
pappso::PrecisionWidget::mp_unitComboBox
QComboBox * mp_unitComboBox
Definition: precisionwidget.h:50
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:14
pappso::PrecisionWidget::mp_resValueSpinBox
QDoubleSpinBox * mp_resValueSpinBox
Definition: precisionwidget.h:53
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
Definition: aa.cpp:39
pappso::PrecisionWidget::mp_daltonValueSpinBox
QDoubleSpinBox * mp_daltonValueSpinBox
Definition: precisionwidget.h:54
pappso::PrecisionWidget::mp_precisionDalton
PrecisionPtr mp_precisionDalton
Definition: precisionwidget.h:56
pappso::PrecisionWidget::m_oldIndex
int m_oldIndex
Definition: precisionwidget.h:60
pappso::PrecisionBase
Definition: precision.h:44
pappso::PrecisionWidget::mp_ppmValueSpinBox
QDoubleSpinBox * mp_ppmValueSpinBox
Definition: precisionwidget.h:52
pappso::PrecisionWidget::mp_precisionRes
PrecisionPtr mp_precisionRes
Definition: precisionwidget.h:58
pappso::PrecisionWidget::mp_precisionPpm
PrecisionPtr mp_precisionPpm
Definition: precisionwidget.h:57
pappso::PrecisionWidget
Definition: precisionwidget.h:46