libpappsomspp
Library for mass spectrometry
obotermform.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/widget/obo/obotermform/obotermform.h
3  * \date 20/04/2021
4  * \author Olivier Langella
5  * \brief display an obo term form
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 #pragma once
31 
32 
33 #include <QWidget>
34 #include "../../../exportinmportconfig.h"
35 #include "../../../obo/obopsimodterm.h"
36 namespace Ui
37 {
38 class OboTermForm;
39 }
40 
41 namespace pappso
42 {
43 
44 class PMSPP_LIB_DECL OboTermForm : public QWidget
45 {
46  Q_OBJECT
47  public:
48  /**
49  * Default constructor
50  */
51  explicit OboTermForm(QWidget *parent = nullptr);
52 
53  /**
54  * Destructor
55  */
56  ~OboTermForm();
57 
58 
59  /** @brief tells if an OBO term is displayed
60  */
61  bool isOboTerm() const;
62 
63  /** @brief get the obo term or an exception
64  */
65  const OboPsiModTerm &getOboPsiModTerm() const;
66 
67  public slots:
68  void displayOboTerm(OboPsiModTerm oboTerm);
69 
70 
71  protected:
72  /** @brief parse the definition label to extract external links
73  * */
74  void parseDefinitionLabel();
75 
76 
77  private:
78  Ui::OboTermForm *ui;
79 
81 
82 
83  static QRegularExpression m_findExternalLinks;
84 };
85 } // namespace pappso
OboPsiModTerm m_oboPsiModTerm
Definition: obotermform.h:80
Ui::OboTermForm * ui
Definition: obotermform.h:78
static QRegularExpression m_findExternalLinks
Definition: obotermform.h:83
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39