libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
obochooserwidget.cpp
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/widget/obo/obochooserwidget/obochooserwidget.cpp
3
* \date 19/04/2021
4
* \author Olivier Langella
5
* \brief display obo term list and choose items
6
*/
7
8
9
/*******************************************************************************
10
* Copyright (c) 2021 Olivier Langella
11
*<Olivier.Langella@universite-paris-saclay.fr>.
12
*
13
* This file is part of the PAPPSOms++ library.
14
*
15
* PAPPSOms++ is free software: you can redistribute it and/or modify
16
* it under the terms of the GNU General Public License as published by
17
* the Free Software Foundation, either version 3 of the License, or
18
* (at your option) any later version.
19
*
20
* PAPPSOms++ is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU General Public License for more details.
24
*
25
* You should have received a copy of the GNU General Public License
26
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
27
*
28
******************************************************************************/
29
30
#include "
obochooserwidget.h
"
31
32
#include "ui_uiobochooserwidget.h"
33
#include "
pappsomspp/core/exception/exceptionnotfound.h
"
34
#include <QDebug>
35
36
using namespace
pappso
;
37
38
OboChooserWidget::OboChooserWidget
(QWidget *parent)
39
: QWidget(parent),
ui
(new
Ui
::OboChooserWidgetForm)
40
{
41
qDebug();
42
ui
->setupUi(
this
);
43
44
45
connect(
ui
->oboListWidget,
46
&
OboListWidget::oboTermChanged
,
47
ui
->oboTermForm,
48
&
OboTermForm::displayOboTerm
);
49
}
50
51
pappso::OboChooserWidget::~OboChooserWidget
()
52
{
53
delete
ui
;
54
}
55
56
bool
57
pappso::OboChooserWidget::isOboTermSelected
()
const
58
{
59
return
ui
->oboTermForm->isOboTerm();
60
}
61
62
const
pappso::OboPsiModTerm
&
63
pappso::OboChooserWidget::getOboPsiModTermSelected
()
const
64
{
65
if
(
ui
->oboTermForm->isOboTerm())
66
{
67
}
68
else
69
{
70
throw
pappso::ExceptionNotFound
(tr(
"OBO term not available"
));
71
}
72
return
ui
->oboTermForm->getOboPsiModTerm();
73
}
74
75
void
76
pappso::OboChooserWidget::setMzTarget
(
double
target_mz)
77
{
78
qDebug();
79
ui
->oboListWidget->filterMzPrecision(target_mz,
ui
->oboListWidget->getPrecisionPtr());
80
}
81
82
void
83
pappso::OboChooserWidget::setPrecision
(
pappso::PrecisionPtr
precision)
84
{
85
ui
->oboListWidget->filterMzPrecision(
ui
->oboListWidget->getMzTarget(), precision);
86
}
pappso::ExceptionNotFound
Definition
exceptionnotfound.h:32
pappso::OboChooserWidget::setPrecision
void setPrecision(PrecisionPtr precision)
set mz precision to filter among possible modifications
Definition
obochooserwidget.cpp:83
pappso::OboChooserWidget::ui
Ui::OboChooserWidgetForm * ui
Definition
obochooserwidget.h:81
pappso::OboChooserWidget::setMzTarget
void setMzTarget(double target_mz)
set mz target to filter among possible modifications
Definition
obochooserwidget.cpp:76
pappso::OboChooserWidget::OboChooserWidget
OboChooserWidget(QWidget *parent=nullptr)
Definition
obochooserwidget.cpp:38
pappso::OboChooserWidget::getOboPsiModTermSelected
const OboPsiModTerm & getOboPsiModTermSelected() const
get the selected obo term or an exception
Definition
obochooserwidget.cpp:63
pappso::OboChooserWidget::~OboChooserWidget
~OboChooserWidget()
Definition
obochooserwidget.cpp:51
pappso::OboChooserWidget::isOboTermSelected
bool isOboTermSelected() const
tells if an OBO term has been selected
Definition
obochooserwidget.cpp:57
pappso::OboListWidget::oboTermChanged
void oboTermChanged(OboPsiModTerm oboTerm) const
pappso::OboPsiModTerm
Definition
obopsimodterm.h:34
pappso::OboTermForm::displayOboTerm
void displayOboTerm(OboPsiModTerm oboTerm)
Definition
obotermform.cpp:58
exceptionnotfound.h
Ui
Definition
obochooserwidget.h:40
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::PrecisionPtr
const PrecisionBase * PrecisionPtr
Definition
precision.h:122
obochooserwidget.h
pappsomspp
gui
obo
obochooserwidget
obochooserwidget.cpp
Generated on
for libpappsomspp by
1.17.0