libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
obolistmodel.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/widget/obo/obolistwidget/obolistmodel.h
3
* \date 19/04/2021
4
* \author Olivier Langella
5
* \brief MVC model of OBO term list
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
#include <QStringListModel>
33
#include "
pappsomspp/export-import-config.h
"
34
#include "
../../../core/obo/obopsimodterm.h
"
35
#include "
../../../core/obo/obopsimodhandlerinterface.h
"
36
#include <vector>
37
38
39
namespace
pappso
40
{
41
42
/**
43
* @todo write docs
44
*/
45
class
PMSPP_LIB_DECL
OboListModel
:
public
QStringListModel
46
{
47
public
:
48
/**
49
* Default constructor
50
*/
51
OboListModel
(QObject *parent =
nullptr
);
52
53
/**
54
* Destructor
55
*/
56
~OboListModel
();
57
58
void
loadPsiMod
();
59
60
61
QVariant
data
(
const
QModelIndex &index,
62
int
role = Qt::DisplayRole)
const override
;
63
64
int
rowCount
(
const
QModelIndex &parent = QModelIndex())
const override
;
65
66
67
const
OboPsiModTerm
&
getOboPsiModTerm
(
int
row)
const
;
68
69
protected
:
70
class
OboPsiModHandler
:
public
OboPsiModHandlerInterface
71
{
72
73
public
:
74
OboPsiModHandler
(
OboListModel
*parent);
75
virtual
~OboPsiModHandler
();
76
77
void
setOboPsiModTerm
(
const
OboPsiModTerm
&term)
override
;
78
79
private
:
80
pappso::OboListModel
*
mp_parent
;
81
};
82
83
std::vector<OboPsiModTerm>
m_oboPsiModTermList
;
84
};
85
}
// namespace pappso
pappso::OboListModel::OboPsiModHandler::mp_parent
pappso::OboListModel * mp_parent
Definition
obolistmodel.h:80
pappso::OboListModel::OboPsiModHandler::OboPsiModHandler
OboPsiModHandler(OboListModel *parent)
Definition
obolistmodel.cpp:50
pappso::OboListModel::OboPsiModHandler::setOboPsiModTerm
void setOboPsiModTerm(const OboPsiModTerm &term) override
triggered function on each obo term when parsing obo file
Definition
obolistmodel.cpp:60
pappso::OboListModel
Definition
obolistmodel.h:46
pappso::OboListModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition
obolistmodel.cpp:89
pappso::OboListModel::getOboPsiModTerm
const OboPsiModTerm & getOboPsiModTerm(int row) const
Definition
obolistmodel.cpp:138
pappso::OboListModel::OboListModel
OboListModel(QObject *parent=nullptr)
Definition
obolistmodel.cpp:42
pappso::OboListModel::m_oboPsiModTermList
std::vector< OboPsiModTerm > m_oboPsiModTermList
Definition
obolistmodel.h:83
pappso::OboListModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition
obolistmodel.cpp:132
pappso::OboListModel::loadPsiMod
void loadPsiMod()
Definition
obolistmodel.cpp:67
pappso::OboPsiModHandlerInterface
Definition
obopsimodhandlerinterface.h:31
pappso::OboPsiModTerm
Definition
obopsimodterm.h:34
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
obopsimodhandlerinterface.h
obopsimodterm.h
pappsomspp
gui
obo
obolistwidget
obolistmodel.h
Generated on
for libpappsomspp by
1.17.0