Commit c5ff2226 authored by Renne Thomas's avatar Renne Thomas
Browse files

Add Engine detail window

parent bc06062a
......@@ -184,6 +184,7 @@ SET(XTPCPP_SRCS
./gui/lists/ms_identification_run_list_view/msidentificationlistwindow.cpp
./gui/lists/ms_identification_run_list_view/msidentificationtablemodel.cpp
./gui/lists/ms_identification_run_list_view/msidentificationtableproxymodel.cpp
./gui/lists/ms_identification_run_list_view/engine_detail_view/enginedetailwindow.cpp
./gui/mainwindow.cpp
./gui/peptide_detail_view/peptidewindow.cpp
./gui/peptide_list_view/peptidelistwindow.cpp
......@@ -228,6 +229,7 @@ SET (GUI_UIS
./gui/export/export_masschroq_dialog/export_masschroq_dialog.ui
./gui/export/export_spreadsheet_dialog/export_spreadsheet_dialog.ui
./gui/lists/ms_identification_run_list_view/ms_identification_run_view.ui
./gui/lists/ms_identification_run_list_view/engine_detail_view/engine_detail_view.ui
./gui/load_results_dialog/load_results_dialog.ui
./gui/main.ui
./gui/peptide_detail_view/peptide_detail_view.ui
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EngineDetailView</class>
<widget class="QMainWindow" name="EngineDetailView">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>479</width>
<height>565</height>
</rect>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="windowTitle">
<string>Engine Detail</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="page">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>461</width>
<height>446</height>
</rect>
</property>
<attribute name="label">
<string>Engine Informations</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelEngineName">
<property name="text">
<string>Engine Name</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEngineName">
<property name="enabled">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelEngineVersion">
<property name="text">
<string>Engine Version</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEngineVersion">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>461</width>
<height>446</height>
</rect>
</property>
<attribute name="label">
<string>Protein Parameters</string>
</attribute>
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>closeButton</sender>
<signal>clicked()</signal>
<receiver>EngineDetailView</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>386</x>
<y>694</y>
</hint>
<hint type="destinationlabel">
<x>218</x>
<y>358</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>doNotValidHide(bool)</slot>
<slot>doNotCheckedHide(bool)</slot>
<slot>doNotGroupedHide(bool)</slot>
<slot>onProteinSearchEdit(QString)</slot>
<slot>doSearchOn(QString)</slot>
<slot>doMsrunFileSearch(QString)</slot>
<slot>doScanNumberSearch(int)</slot>
<slot>doModificationSearch(QString)</slot>
<slot>doExportAsOdsFile()</slot>
<slot>onMsIdentificationSearchEdit(QString)</slot>
</slots>
</ui>
/*******************************************************************************
* Copyright (c) 2019 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
*
* This file is part of XTPcpp.
*
* XTPcpp 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.
*
* XTPcpp 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 XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Thomas Renne <thomas.renne@u-psud.fr>. - initial API and
*implementation
******************************************************************************/
#include "ui_engine_detail_view.h"
#include "enginedetailwindow.h"
#include "../../../mainwindow.h"
#include <QSettings>
#include <odsstream/odsdocwriter.h>
#include <odsstream/qtablewriter.h>
EngineDetailWindow::EngineDetailWindow(ProjectWindow *parent)
: QMainWindow(parent), ui(new Ui::EngineDetailView)
{
m_project_window = parent;
ui->setupUi(this);
setWindowIcon(QIcon(":/xtpcpp_icon/resources/xtandempipeline_icon.svg"));
}
EngineDetailWindow::~EngineDetailWindow()
{
}
void
EngineDetailWindow::setIdentificationEngineParam(IdentificationDataSourceSp *identificationEngine)
{
m_identificationEngine = identificationEngine;
updateDisplay();
}
void EngineDetailWindow::updateDisplay()
{
ui->lineEngineName->setText(m_identificationEngine->get()->getIdentificationEngineName());
ui->lineEngineVersion->setText(m_identificationEngine->get()->getIdentificationEngineVersion());
//ui->lineEdit_3->setText(m_identificationEngine->get()->getIdentificationEngineParam(IdentificationEngineParam::tandem_param));
}
/*******************************************************************************
* Copyright (c) 2019 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
*
* This file is part of XTPcpp.
*
* XTPcpp 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.
*
* XTPcpp 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 XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Thomas Renne <thomas.renne@u-psud.fr>. - initial API and
*implementation
******************************************************************************/
#pragma once
#include <QMainWindow>
#include <QAction>
#include <QMenu>
#include "ui_engine_detail_view.h"
#include <core/identification_sources/identificationdatasource.h>
class ProjectWindow;
// http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html
namespace Ui
{
class EngineDetailView;
}
class EngineDetailWindow : public QMainWindow
{
Q_OBJECT
public:
explicit EngineDetailWindow(ProjectWindow *parent = 0);
~EngineDetailWindow();
void setIdentificationEngineParam(IdentificationDataSourceSp *identificationEngine);
protected:
void updateDisplay();
private:
Ui::EngineDetailView *ui;
ProjectWindow *m_project_window;
IdentificationDataSourceSp *m_identificationEngine = nullptr;
};
......@@ -144,3 +144,11 @@ MsIdentificationListWindow::doExportAsOdsFile()
delete p_writer;
}
}
void
MsIdentificationListWindow::askEngineDetailView(IdentificationDataSourceSp *identificationEngine)
{
qDebug() << "begin";
m_project_window->doViewEngineDetail(identificationEngine);
qDebug() << "end";
}
......@@ -65,6 +65,9 @@ class MsIdentificationListWindow : public QMainWindow
void updateStatusBar();
void onMsIdentificationSearchEdit(QString protein_search_string);
protected:
void askEngineDetailView(IdentificationDataSourceSp *identificationEngine);
private:
Ui::MsIdentificationView *ui;
MsIdentificationTableModel *m_msid_table_model_p = nullptr;
......
......@@ -187,18 +187,22 @@ MsIdentificationTableProxyModel::headerData(int section,
void
MsIdentificationTableProxyModel::onTableClicked(const QModelIndex &index)
{
qDebug() << "MsIdentificationTableProxyModel::onTableClicked begin "
qDebug() << "begin "
<< index.row();
qDebug() << "MsIdentificationTableProxyModel::onTableClicked begin "
<< this->mapToSource(index).row();
QModelIndex source_index(this->mapToSource(index));
int row = source_index.row();
m_identificationEngine = m_msid_table_model_p->getIdentificationDataSourceSpList().at(row);
qDebug() << m_identificationEngine->getIdentificationEngineName();
msIdentificationListColumn col =
(msIdentificationListColumn)source_index.column();
if(col == msIdentificationListColumn::engine_name)
{
// m_msid_list_window->askProteinDetailView();
m_msid_list_window->askEngineDetailView(&m_identificationEngine);
}
qDebug() << "MsIdentificationTableProxyModel::onTableClicked end "
<< index.row();
......
......@@ -61,7 +61,7 @@ class MsIdentificationTableProxyModel : public QSortFilterProxyModel
void onTableClicked(const QModelIndex &index);
private:
std::vector<IdentificationDataSourceSp> m_identificationDataSourceSpList;
IdentificationDataSourceSp m_identificationEngine;
MsIdentificationTableModel *m_msid_table_model_p;
MsIdentificationListWindow *m_msid_list_window;
QString m_ms_id_search_string;
......
......@@ -40,7 +40,7 @@
#include <qcustomplot.h>
#include "../../core/qvalue/computeqvalues.h"
#include "gui/lists/ms_identification_run_list_view/msidentificationlistwindow.h"
#include "gui/lists/ms_identification_run_list_view/engine_detail_view/enginedetailwindow.h"
ProjectWindow::ProjectWindow(MainWindow *parent)
: QMainWindow(parent), ui(new Ui::ProjectView)
......@@ -188,6 +188,14 @@ ProjectWindow::connectNewProteinDetailWindow()
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
}
void
ProjectWindow::connectNewEngineDetailWindow()
{
qDebug() << "";
m_current_engine_detail_window = new EngineDetailWindow(this);
m_engine_detail_window_collection.push_back(m_current_engine_detail_window);
}
void
ProjectWindow::connectNewMsRunListWindow()
{
......@@ -584,6 +592,25 @@ ProjectWindow::doViewProteinDetail(ProteinMatch *protein_match)
qDebug() << "ProjectWindow::doViewProteinDetail end";
}
void
ProjectWindow::doViewEngineDetail(IdentificationDataSourceSp *identificationEngine)
{
qDebug() << "begin";
if(m_engine_detail_window_collection.size() == 0)
{
connectNewEngineDetailWindow();
}
Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
if(modifier == Qt::ControlModifier)
{
connectNewEngineDetailWindow();
}
m_current_engine_detail_window->setIdentificationEngineParam(identificationEngine);
m_current_engine_detail_window->show();
qDebug() << "end";
}
void
ProjectWindow::doPtmIslandGrouping(IdentificationGroup *p_identification_group)
{
......@@ -594,6 +621,7 @@ ProjectWindow::doPtmIslandGrouping(IdentificationGroup *p_identification_group)
emit operatePtmGroupingOnIdentification(p_identification_group);
}
}
void
ProjectWindow::doViewPtmIslandList(IdentificationGroup *p_identification_group)
{
......
......@@ -37,6 +37,7 @@
#include "../xic_view/xicwindow.h"
#include <qcustomplot.h>
#include "../lists/ms_identification_run_list_view/msidentificationlistwindow.h"
#include "../lists/ms_identification_run_list_view/engine_detail_view/enginedetailwindow.h"
class MainWindow;
......@@ -68,6 +69,7 @@ class ProjectWindow : public QMainWindow
void doPtmIslandGrouping(IdentificationGroup *p_identification_group);
void doViewProteinList(IdentificationGroup *p_identification_group = nullptr);
void doViewMsIdentificationList();
void doViewEngineDetail(IdentificationDataSourceSp *identificationEngine);
void setDefaultProteinListWindow(ProteinListWindow *p_protein_list_window);
void doAutomaticFilterParametersChanged(AutomaticFilterParameters parameters);
void doMassPrecisionUnitChanged(QString combo_value);
......@@ -105,6 +107,7 @@ class ProjectWindow : public QMainWindow
void doViewPeptideList(IdentificationGroup *p_ident_group,
ProteinMatch *protein_match);
void doViewProteinDetail(ProteinMatch *protein_match);
void doIdentificationGroupEdited(IdentificationGroup *p_identification_group);
void doContaminantSelectionChanged();
void doDecoySelectionChanged();
......@@ -117,6 +120,7 @@ class ProjectWindow : public QMainWindow
void connectNewMsRunListWindow();
void connectNewPeptideListWindow();
void connectNewProteinDetailWindow();
void connectNewEngineDetailWindow();
void connectNewPeptideDetailWindow();
void refresh();
void showWaitingMessage(const QString title);
......@@ -133,6 +137,8 @@ class ProjectWindow : public QMainWindow
ProteinListWindow *_p_current_protein_list_window = nullptr;
std::list<MsIdentificationListWindow *> _ms_identification_list_window_collection;
MsIdentificationListWindow *_p_current_ms_identification_list_window = nullptr;
std::list<EngineDetailWindow *> m_engine_detail_window_collection;
EngineDetailWindow *m_current_engine_detail_window = nullptr;
std::list<PeptideListWindow *> _peptide_list_window_collection;
PeptideListWindow *_p_current_peptide_list_window = nullptr;
std::list<ProteinWindow *> _protein_detail_window_collection;
......
......@@ -8,7 +8,7 @@
set(PAPPSOMSPP_QT5_FOUND 1)
set(PAPPSOMSPP_WIDGET_QT5_FOUND 1)
set(PAPPSOMSPP_INCLUDE_DIR "/home/langella/developpement/git/pappsomspp/src")
set(PAPPSOMSPP_QT5_LIBRARY "/home/langella/developpement/git/pappsomspp/cbuild/src/libpappsomspp-qt5.so")
set(PAPPSOMSPP_WIDGET_QT5_LIBRARY "/home/langella/developpement/git/pappsomspp/cbuild/src/pappsomspp/widget/libpappsomspp-widget-qt5.so")
set(PAPPSOMSPP_INCLUDE_DIR "/home/trenne/developpement/git/pappsomspp/src")
set(PAPPSOMSPP_QT5_LIBRARY "/home/trenne/developpement/git/pappsomspp/cbuild/src/libpappsomspp-qt5.so")
set(PAPPSOMSPP_WIDGET_QT5_LIBRARY "/home/trenne/developpement/git/pappsomspp/cbuild/src/pappsomspp/widget/libpappsomspp-widget-qt5.so")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment