Loading...
Searching...
No Matches
obolistwidget.h
Go to the documentation of this file.
/**
* \file pappsomspp/widget/obo/obolistwidget/obolistwidget.h
* \date 17/04/2021
* \author Olivier Langella
* \brief handles a list of obo term, select and click
*/
/*******************************************************************************
* Copyright (c) 2021 Olivier Langella
*<Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include <QWidget>
#include "pappsomspp/export-import-config.h"
#include "pappsomspp/core/precision.h"
#include "obolistmodel.h"
#include <QItemSelection>
namespace Ui
{
class OboListWidgetForm;
}
namespace pappso
{
class OboListProxyModel;
class PMSPP_LIB_DECL OboListWidget : public QWidget
{
Q_OBJECT
public:
/**
* Default constructor
*/
explicit OboListWidget(QWidget *parent = nullptr);
/**
* Destructor
*/
~OboListWidget();
void filterMzPrecision(double target_mz, PrecisionPtr precision);
/** @brief get the current mz value used to filter term list
*/
double getMzTarget() const;
/** @brief get the current precision used to filter term list
*/
PrecisionPtr getPrecisionPtr() const;
signals:
void oboTermChanged(OboPsiModTerm oboTerm) const;
private slots:
void onSelectionChanged(const QItemSelection &selected,
const QItemSelection &deselected);
void onFilterChanged(pappso::PrecisionPtr precision);
void onFilterChanged();
void onFilterChanged(double value);
private:
Ui::OboListWidgetForm *ui;
OboListModel *mpa_oboListModel = nullptr;
OboListProxyModel *mpa_oboListProxyModel = nullptr;
};
} // namespace pappso
Q_DECLARE_METATYPE(pappso::OboPsiModTerm);
pappso::OboListModel
Definition obolistmodel.h:46
pappso::OboListProxyModel
Definition obolistproxymodel.h:43
pappso::OboListWidget::getPrecisionPtr
PrecisionPtr getPrecisionPtr() const
get the current precision used to filter term list
Definition obolistwidget.cpp:149
pappso::OboListWidget::filterMzPrecision
void filterMzPrecision(double target_mz, PrecisionPtr precision)
Definition obolistwidget.cpp:89
pappso::OboListWidget::OboListWidget
OboListWidget(QWidget *parent=nullptr)
Definition obolistwidget.cpp:38
pappso::OboListWidget::ui
Ui::OboListWidgetForm * ui
Definition obolistwidget.h:87
pappso::OboListWidget::getMzTarget
double getMzTarget() const
get the current mz value used to filter term list
Definition obolistwidget.cpp:143
pappso::OboListWidget::mpa_oboListProxyModel
OboListProxyModel * mpa_oboListProxyModel
Definition obolistwidget.h:90
pappso::OboListWidget::oboTermChanged
void oboTermChanged(OboPsiModTerm oboTerm) const
pappso::OboListWidget::onSelectionChanged
void onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Definition obolistwidget.cpp:74
pappso::OboListWidget::mpa_oboListModel
OboListModel * mpa_oboListModel
Definition obolistwidget.h:89
pappso::OboListWidget::onFilterChanged
void onFilterChanged(pappso::PrecisionPtr precision)
Definition obolistwidget.cpp:137
pappso::OboPsiModTerm
Definition obopsimodterm.h:34
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
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
obolistmodel.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::OboPsiModTerm)
precision.h