diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 91fb52f051a0dd62f602eb22227e6c06b1884ceb..49be32736a59116c60bea9e0a4a712e63d967e97 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -134,6 +134,7 @@ SET(XTPCPP_SRCS ./gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp ./gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp ./gui/ptm_peptide_list_view/ptmsequencedelegate.cpp + ./gui/tandem_run_dialog/tandemrundialog.cpp ./gui/waiting_message_dialog/waitingmessagedialog.cpp ./gui/workerthread.cpp ./utils/workmonitor.cpp @@ -156,6 +157,7 @@ SET (GUI_UIS ./gui/protein_view/protein_detail_view.ui ./gui/ptm_island_list_view/ptm_island_list_view.ui ./gui/ptm_peptide_list_view/ptm_peptide_list_view.ui + ./gui/tandem_run_dialog/tandem_run_dialog.ui ./gui/waiting_message_dialog/waiting_message_dialog.ui ) @@ -187,6 +189,7 @@ SET(XTPCPP_MOC_HDRS ./gui/ptm_peptide_list_view/ptmpeptidetablemodel.h ./gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h ./gui/ptm_peptide_list_view/ptmsequencedelegate.h + ./gui/tandem_run_dialog/tandemrundialog.h ./gui/waiting_message_dialog/waitingmessagedialog.h ./gui/workerthread.h ./utils/workmonitor.h diff --git a/src/gui/load_results_dialog/load_results_dialog.ui b/src/gui/load_results_dialog/load_results_dialog.ui index bacd1716bc483495f1d501a8b5ec07877eaeeb33..cd022f4b49a7f1947bb05b61dcae4b5f4cf33b5d 100644 --- a/src/gui/load_results_dialog/load_results_dialog.ui +++ b/src/gui/load_results_dialog/load_results_dialog.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Form</string> + <string>Load identification results</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> diff --git a/src/gui/main.ui b/src/gui/main.ui index a7f4671544c6fb35d9d4d9f41b8ded4da921ae2a..9af840c7175e1b6866b64da2c0f983eee4c5d784 100644 --- a/src/gui/main.ui +++ b/src/gui/main.ui @@ -43,6 +43,7 @@ <addaction name="actionProticDb"/> <addaction name="action_spectral_counting_mcq"/> </widget> + <addaction name="action_xtandem_run"/> <addaction name="actionLoad_results"/> <addaction name="actionLoad"/> <addaction name="separator"/> @@ -126,6 +127,11 @@ <string>&About</string> </property> </action> + <action name="action_xtandem_run"> + <property name="text"> + <string>&X!Tandem run</string> + </property> + </action> </widget> <resources> <include location="../xtpcpp.qrc"/> @@ -307,6 +313,22 @@ </hint> </hints> </connection> + <connection> + <sender>action_xtandem_run</sender> + <signal>triggered()</signal> + <receiver>Main</receiver> + <slot>doActionTandemRun()</slot> + <hints> + <hint type="sourcelabel"> + <x>-1</x> + <y>-1</y> + </hint> + <hint type="destinationlabel"> + <x>231</x> + <y>191</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>selectXpipFile()</slot> @@ -320,5 +342,6 @@ <slot>doActionFasta()</slot> <slot>doActionSpectralCountingMcq()</slot> <slot>doActionAbout()</slot> + <slot>doActionTandemRun()</slot> </slots> </ui> diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 86b895adfecf483ccc07e3d2f259d738aa3f51fc..4ac40bbdb7ee587d7a023784f9406876c205913f 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -225,6 +225,10 @@ void MainWindow::doActionModifications() { void MainWindow::doProjectNotReady(QString error) { viewError(error); } + + +void MainWindow::doActionTandemRun() { +} void MainWindow::loadResults() { _p_load_results_dialog->show(); @@ -429,9 +433,9 @@ void MainWindow::doActionAbout() { if (_p_about_dialog == nullptr) { _p_about_dialog = new AboutDialog(this); } - _p_about_dialog->show(); - _p_about_dialog->raise(); - _p_about_dialog->activateWindow(); - + _p_about_dialog->show(); + _p_about_dialog->raise(); + _p_about_dialog->activateWindow(); + qDebug() << "MainWindow::doActionAbout end"; } diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index aecb50ff0a2c6c5b934623821c63fe60cda888e1..65a75a6a0ee313e44620ebd9ed3af950d78f8fc9 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -39,6 +39,7 @@ #include "export_spreadsheet_dialog/exportspreadsheetdialog.h" #include "waiting_message_dialog/waitingmessagedialog.h" #include "about_dialog/aboutdialog.h" +#include "tandem_run_dialog/tandemrundialog.h" @@ -63,6 +64,7 @@ public slots: void doActionMassChroQ(); void doActionProticDb(); void doActionLabelingMethods(); + void doActionTandemRun(); void doActionSpreadsheet(); void doActionModifications(); void doDisplayLoadingMessage(QString message); @@ -109,6 +111,7 @@ private : ExportSpreadsheetDialog * _p_export_spreadsheet_dialog; WaitingMessageDialog * _p_waiting_message_dialog; AboutDialog * _p_about_dialog=nullptr; + TandemRunDialog * _p_tandem_run_dialog=nullptr; }; diff --git a/src/gui/tandem_run_dialog/tandem_run_dialog.ui b/src/gui/tandem_run_dialog/tandem_run_dialog.ui new file mode 100644 index 0000000000000000000000000000000000000000..5a8d39fc8b5fd59b93ca63d29874a89dcff0340a --- /dev/null +++ b/src/gui/tandem_run_dialog/tandem_run_dialog.ui @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>TandemRunDialog</class> + <widget class="QWidget" name="TandemRunDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>573</width> + <height>559</height> + </rect> + </property> + <property name="windowTitle"> + <string>Load identification results</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QGroupBox" name="filter_parameter_groupbox"> + <property name="title"> + <string>Choose MZ data file</string> + </property> + <layout class="QVBoxLayout" name="filter_parameter_layout"/> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Choose presets</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QComboBox" name="preset_combobox"/> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="choose_files_groupbox"> + <property name="title"> + <string>Choose databases</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QListView" name="file_list_view"/> + </item> + <item row="4" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <spacer name="horizontalSpacer_2"> + <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="clear_list_button"> + <property name="text"> + <string>clear list</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="add_files_button"> + <property name="text"> + <string>add files</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="output_directory_groupbox"> + <property name="title"> + <string>Output directory</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <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="pushButton_2"> + <property name="text"> + <string>Cancel</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pushButton"> + <property name="text"> + <string>OK</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>add_files_button</sender> + <signal>clicked()</signal> + <receiver>TandemRunDialog</receiver> + <slot>chooseFiles()</slot> + <hints> + <hint type="sourcelabel"> + <x>550</x> + <y>447</y> + </hint> + <hint type="destinationlabel"> + <x>550</x> + <y>264</y> + </hint> + </hints> + </connection> + <connection> + <sender>pushButton_2</sender> + <signal>clicked()</signal> + <receiver>TandemRunDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>476</x> + <y>548</y> + </hint> + <hint type="destinationlabel"> + <x>568</x> + <y>234</y> + </hint> + </hints> + </connection> + <connection> + <sender>pushButton</sender> + <signal>clicked()</signal> + <receiver>TandemRunDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>562</x> + <y>548</y> + </hint> + <hint type="destinationlabel"> + <x>648</x> + <y>216</y> + </hint> + </hints> + </connection> + <connection> + <sender>clear_list_button</sender> + <signal>clicked()</signal> + <receiver>TandemRunDialog</receiver> + <slot>clearFileList()</slot> + <hints> + <hint type="sourcelabel"> + <x>434</x> + <y>441</y> + </hint> + <hint type="destinationlabel"> + <x>606</x> + <y>468</y> + </hint> + </hints> + </connection> + </connections> + <slots> + <slot>chooseFiles()</slot> + <slot>reject()</slot> + <slot>accept()</slot> + <slot>clearFileList()</slot> + </slots> +</ui> diff --git a/src/gui/tandem_run_dialog/tandemrundialog.cpp b/src/gui/tandem_run_dialog/tandemrundialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52a4bc1434e50508a1d874b275a9d4c1dd15e0a1 --- /dev/null +++ b/src/gui/tandem_run_dialog/tandemrundialog.cpp @@ -0,0 +1,65 @@ +/** + * \file /gui/tandem_run_dialog/tandem_run_dialog.cpp + * \date 31/8/2017 + * \author Olivier Langella + * \brief dialog window to launch tandem process + */ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.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: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ +#include "tandemrundialog.h" + +#include "ui_tandem_run_dialog.h" +#include <QDebug> +#include <QSettings> +#include <QFileDialog> +#include <QMessageBox> +#include <pappsomspp/pappsoexception.h> + + +TandemRunDialog::TandemRunDialog(QWidget * parent): + QDialog(parent), + ui(new Ui::TandemRunDialog) +{ + qDebug() << "TandemRunDialog::TandemRunDialog begin"; + ui->setupUi(this); + this->setModal(true); + +#if QT_VERSION >= 0x050000 + // Qt5 code + /* + connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater); + connect(this, &PtSpectrumViewer::operateMsDataFile, worker, &PwizLoaderThread::doMsDataFileLoad); + connect(worker, &PwizLoaderThread::msDataReady, this, &PtSpectrumViewer::handleMsDataFile); + */ +#else +// Qt4 code + +#endif + + qDebug() << "TandemRunDialog::TandemRunDialog end"; +} + +TandemRunDialog::~TandemRunDialog() +{ + delete ui; +} diff --git a/src/gui/tandem_run_dialog/tandemrundialog.h b/src/gui/tandem_run_dialog/tandemrundialog.h new file mode 100644 index 0000000000000000000000000000000000000000..844c34572385521d94789b2682043895af93c9e9 --- /dev/null +++ b/src/gui/tandem_run_dialog/tandemrundialog.h @@ -0,0 +1,56 @@ +/** + * \file /gui/tandem_run_dialog/tandem_run_dialog.h + * \date 31/8/2017 + * \author Olivier Langella + * \brief dialog window to launch tandem process + */ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.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: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ +#ifndef TANDEMRUNDIALOG_H +#define TANDEMRUNDIALOG_H + + +#include <QDialog> +namespace Ui { +class TandemRunDialog; +} + + +class TandemRunDialog : public QDialog +{ + Q_OBJECT + +public: + explicit TandemRunDialog(QWidget * parent); + ~TandemRunDialog(); + +public slots: + +signals: + +private: + Ui::TandemRunDialog *ui; + +}; + +#endif // TANDEMRUNDIALOG_H