Skip to content
Snippets Groups Projects
Commit 64644804 authored by Langella Olivier's avatar Langella Olivier
Browse files

new object TandemRunBatch to handle all informations needed to run X\!Tandem

parent 93afc112
No related branches found
No related tags found
No related merge requests found
/**
* \file /core/tandem_run/tandem_run_batch.cpp
* \date 2/9/2017
* \author Olivier Langella
* \brief all data needed to run a Tandem batch
*/
/*******************************************************************************
* 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 "tandemrunbatch.h"
/**
* \file /core/tandem_run/tandem_run_batch.h
* \date 2/9/2017
* \author Olivier Langella
* \brief all data needed to run a Tandem batch
*/
/*******************************************************************************
* 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 TANDEMRUNBATCH_H
#define TANDEMRUNBATCH_H
#include <QStringList>
struct TandemRunBatch
{
QString _tandem_bin_path;
QStringList _mz_file_list;
QString _preset_file;
QStringList _fasta_file_list;
QString _output_directory;
};
#endif // TANDEMRUNBATCH_H
......@@ -40,7 +40,7 @@ void PtmSequenceDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
const QModelIndex &index) const
{
if (index.data().canConvert<PtmSampleScan *>()) {
PtmSampleScan * p_ptm_sample_scan = qvariant_cast<PtmSampleScan *>(index.data());
PtmSampleScan * p_ptm_sample_scan = index.data().value<PtmSampleScan *>();
// if (option.state & QStyle::State_Selected)
// painter->fillRect(option.rect, option.palette.highlight());
......
......@@ -35,6 +35,7 @@
#include <QMessageBox>
#include <pappsomspp/pappsoexception.h>
Q_DECLARE_METATYPE(QFileInfo)
TandemRunDialog::TandemRunDialog(QWidget * parent):
QDialog(parent),
......@@ -172,3 +173,14 @@ void TandemRunDialog::selectMzFiles() {
// tr("Error choosing identification result files : %1").arg(error.qwhat()), error);
}
}
TandemRunBatch TandemRunDialog::getTandemRunBatch() const {
TandemRunBatch tandem_run_batch;
tandem_run_batch._tandem_bin_path = ui->tandem_bin_label->text();
tandem_run_batch._mz_file_list = _p_mz_file_list->stringList();
tandem_run_batch._fasta_file_list = _p_fasta_file_list->stringList();
//tandem_run_batch._preset_file = ui->preset_combobox->itemData(ui->preset_combobox->currentIndex()).value<QFileInfo>().absoluteFilePath();
tandem_run_batch._preset_file = ui->preset_combobox->itemData(ui->preset_combobox->currentIndex()).value<QFileInfo>().absoluteFilePath();
tandem_run_batch._output_directory = ui->output_directory_label->text();
return tandem_run_batch;
}
......@@ -32,6 +32,8 @@
#include <QDialog>
#include <QStringListModel>
#include "../../core/tandem_run/tandemrunbatch.h"
namespace Ui {
class TandemRunDialog;
}
......@@ -45,6 +47,7 @@ public:
explicit TandemRunDialog(QWidget * parent);
~TandemRunDialog();
TandemRunBatch getTandemRunBatch() const;
void reset();
public slots:
void selectFastaFiles();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment