diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 150a5ff3cc0d897026c2f2ccb048ca245c3e04b0..39c0c4e51fe84f689a27d985e3081df9d71cd6c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -72,6 +72,8 @@ SET(CPP_FILES input/xpipsaxhandler.cpp input/xtandemsaxhandler.cpp output/masschroqml.cpp + output/ods/odsexport.cpp + output/ods/simplesheet.cpp utils/identificationdatasourcestore.cpp utils/groupstore.cpp utils/msrunstore.cpp @@ -86,6 +88,7 @@ set(QTLIBS ${Qt5Xml_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES}) # (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake) SET(XTPCPP_SRCS + ./gui/export_spreadsheet_dialog/exportspreadsheetdialog.cpp ./gui/load_results_dialog/loadresultsdialog.cpp ./gui/mainwindow.cpp ./gui/peptide_detail_view/peptidewindow.cpp @@ -103,6 +106,7 @@ SET(XTPCPP_SRCS ) SET (GUI_UIS + ./gui/export_spreadsheet_dialog/export_spreadsheet_dialog.ui ./gui/load_results_dialog/load_results_dialog.ui ./gui/main.ui ./gui/peptide_detail_view/peptide_detail_view.ui @@ -116,6 +120,7 @@ SET (GUI_UIS SET(XTPCPP_MOC_HDRS + ./gui/export_spreadsheet_dialog/exportspreadsheetdialog.h ./gui/load_results_dialog/loadresultsdialog.h ./gui/mainwindow.h ./gui/peptide_detail_view/peptidewindow.h diff --git a/src/core/msrun.cpp b/src/core/msrun.cpp index 38e7c45412eff029c20ef1eb67da290ffc4bfe20..57ee5eb0224c17abbb00fbe264731265b2a522cb 100644 --- a/src/core/msrun.cpp +++ b/src/core/msrun.cpp @@ -49,6 +49,10 @@ MsRun::~MsRun() { } + const QString & MsRun::getSampleName() const { + return _name; + } + void MsRun::setFilename(const QString filename) { _location = filename; } diff --git a/src/core/msrun.h b/src/core/msrun.h index 40604c926839d3297300452b3b05cabfee134014..25ad79b7648ca73b4d86a6b575f1ee6374bb80ff 100644 --- a/src/core/msrun.h +++ b/src/core/msrun.h @@ -50,6 +50,7 @@ public: void setXmlId(const QString xmlid); const QString & getFilename() const; + const QString & getSampleName() const; const QString & getXmlId() const; MzFormat getMzFormat() const; diff --git a/src/core/project.cpp b/src/core/project.cpp index 0437c22e6ddcedb7006334894d7f776bccc7f511..ad3de8ff1fee3ab95da07cd22d236c74c8b6de86 100644 --- a/src/core/project.cpp +++ b/src/core/project.cpp @@ -55,6 +55,10 @@ void Project::setCombineMode(bool is_combine_mode) { std::vector<IdentificationGroup *> Project::getIdentificationGroupList() { return _identification_goup_list; } + + const std::vector<IdentificationGroup *> Project::getIdentificationGroupList() const { + return _identification_goup_list; + } const GroupingType Project::getGroupingType() const { return _grouping_type; } diff --git a/src/core/project.h b/src/core/project.h index cbf721250a1cde53cc6ee525f730cebf96057a72..ead40c37eaaa4105f93bc7e8ac486c955b40f560 100644 --- a/src/core/project.h +++ b/src/core/project.h @@ -61,6 +61,7 @@ public: const GroupingType getGroupingType() const; std::vector<IdentificationGroup *> getIdentificationGroupList(); + const std::vector<IdentificationGroup *> getIdentificationGroupList() const; void setCombineMode(bool is_combine_mode); bool isCombineMode() const; void readResultFile(QString filename); diff --git a/src/gui/export_spreadsheet_dialog/export_spreadsheet_dialog.ui b/src/gui/export_spreadsheet_dialog/export_spreadsheet_dialog.ui new file mode 100644 index 0000000000000000000000000000000000000000..552ad3a8c348b542e969c1983e76b61d0219b72b --- /dev/null +++ b/src/gui/export_spreadsheet_dialog/export_spreadsheet_dialog.ui @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ExportSpreadsheetDialog</class> + <widget class="QWidget" name="ExportSpreadsheetDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>573</width> + <height>559</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Available spreadsheets</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QCheckBox" name="simple_checkbox"> + <property name="text"> + <string>simple protein and peptide list</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_2"> + <property name="text"> + <string>CheckBox</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>pushButton</sender> + <signal>clicked()</signal> + <receiver>ExportSpreadsheetDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>522</x> + <y>415</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>279</y> + </hint> + </hints> + </connection> + <connection> + <sender>pushButton_2</sender> + <signal>clicked()</signal> + <receiver>ExportSpreadsheetDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>436</x> + <y>415</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>279</y> + </hint> + </hints> + </connection> + <connection> + <sender>simple_checkbox</sender> + <signal>toggled(bool)</signal> + <receiver>ExportSpreadsheetDialog</receiver> + <slot>doSimpleProteinPeptideList(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>115</x> + <y>110</y> + </hint> + <hint type="destinationlabel"> + <x>633</x> + <y>369</y> + </hint> + </hints> + </connection> + </connections> + <slots> + <slot>reject()</slot> + <slot>accept()</slot> + <slot>doSimpleProteinPeptideList(bool)</slot> + </slots> +</ui> diff --git a/src/gui/export_spreadsheet_dialog/exportspreadsheetdialog.cpp b/src/gui/export_spreadsheet_dialog/exportspreadsheetdialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..044433b817b3a0c1ef6847985c81264d6a419fee --- /dev/null +++ b/src/gui/export_spreadsheet_dialog/exportspreadsheetdialog.cpp @@ -0,0 +1,70 @@ + +/******************************************************************************* +* 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 "ui_export_spreadsheet_dialog.h" +#include "exportspreadsheetdialog.h" +#include <QDebug> +#include <QSettings> + +ExportSpreadsheetDialog::ExportSpreadsheetDialog(QWidget * parent): + QDialog(parent), + ui(new Ui::ExportSpreadsheetDialog) +{ + qDebug() << "ExportSpreadsheetDialog::ExportSpreadsheetDialog begin"; + ui->setupUi(this); + this->setModal(true); + + + + QSettings settings; + ui->simple_checkbox->setCheckState(Qt::Unchecked); + if (settings.value("export_ods/simple", "true").toBool()) { + ui->simple_checkbox->setCheckState(Qt::Checked); + } + //param.setFilterCrossSamplePeptideNumber(settings.value("automatic_filter/cross_sample", "true").toBool()); + +#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() << "ExportSpreadsheetDialog::ExportSpreadsheetDialog end"; +} + +ExportSpreadsheetDialog::~ExportSpreadsheetDialog() +{ + delete ui; +} + +void ExportSpreadsheetDialog::doSimpleProteinPeptideList(bool simple) { + + QSettings settings; + settings.setValue("export_ods/simple", QString("%1").arg(simple)); +} diff --git a/src/gui/export_spreadsheet_dialog/exportspreadsheetdialog.h b/src/gui/export_spreadsheet_dialog/exportspreadsheetdialog.h new file mode 100644 index 0000000000000000000000000000000000000000..d8d096923d4db9540b52273b409990f9f00eb5b0 --- /dev/null +++ b/src/gui/export_spreadsheet_dialog/exportspreadsheetdialog.h @@ -0,0 +1,56 @@ + +/******************************************************************************* +* 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 EXPORTSPREADSHEETDIALOG_H +#define EXPORTSPREADSHEETDIALOG_H + +#include <QDialog> +#include <QStringListModel> +#include "../project_view/automatic_filter_widget/automaticfilterwidget.h" + + +namespace Ui { +class ExportSpreadsheetDialog; +} + +class ProjectWindow; + +class ExportSpreadsheetDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ExportSpreadsheetDialog(QWidget * parent); + ~ExportSpreadsheetDialog(); + + +public slots: + void doSimpleProteinPeptideList(bool simple); +signals: + +private: + Ui::ExportSpreadsheetDialog *ui; + +}; + +#endif // EXPORTSPREADSHEETDIALOG_H diff --git a/src/gui/load_results_dialog/loadresultsdialog.h b/src/gui/load_results_dialog/loadresultsdialog.h index 5af69f86754783c53efc556abbf627eb86bb8dcf..fd33953176ad3d9012455a6ff61b5379461dd245 100644 --- a/src/gui/load_results_dialog/loadresultsdialog.h +++ b/src/gui/load_results_dialog/loadresultsdialog.h @@ -33,7 +33,6 @@ namespace Ui { class LoadResultsDialog; } -class ProjectWindow; class LoadResultsDialog : public QDialog { diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index a01faae498c675f05d890853fcef4146ade2144e..c54779869126734137edd475676b04c601c99a25 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -30,7 +30,9 @@ #include "ui_main.h" #include <pappsomspp/pappsoexception.h> +#include <odsstream/odsdocwriter.h> #include "../output/masschroqml.h" +#include "../output/ods/odsexport.h" void XtpLoaderThread::doXpipFileLoad(QString filename) { @@ -90,6 +92,7 @@ MainWindow::MainWindow(QWidget *parent): workerThread.start(); _p_load_results_dialog = new LoadResultsDialog(this); + _p_export_spreadsheet_dialog = new ExportSpreadsheetDialog(this); _project_window = new ProjectWindow(this); @@ -118,6 +121,7 @@ MainWindow::MainWindow(QWidget *parent): connect(worker, SIGNAL(projectReady(ProjectSp)), this,SLOT(doProjectReady(ProjectSp))); connect(this, SIGNAL(operateLoadingResults(bool,AutomaticFilterParameters,QStringList)), worker,SLOT(doLoadingResults(bool,AutomaticFilterParameters,QStringList))); connect(_p_load_results_dialog, SIGNAL(accepted()), this,SLOT(doAcceptedLoadResultDialog())); + connect(_p_export_spreadsheet_dialog, SIGNAL(accepted()), this,SLOT(doAcceptedExportSpreadsheetDialog())); connect(worker, SIGNAL(loadingMessage(QString)), this,SLOT(doDisplayLoadingMessage(QString))); connect(worker, SIGNAL(projectNotReady(QString)), this,SLOT(doProjectNotReady(QString))); /* @@ -157,6 +161,35 @@ void MainWindow::doDisplayLoadingMessage(QString message) { ui->statusbar->showMessage(message); } +void MainWindow::doAcceptedExportSpreadsheetDialog() { + qDebug() << "MainWindow::doAcceptedExportSpreadsheetDialog begin"; + try { + QSettings settings; + QString default_location = settings.value("path/export_ods", "").toString(); + + QString filename = QFileDialog::getSaveFileName(this, tr("Save ODS file"), + QString("%1/untitled.ods").arg(default_location), + tr("Open Document Spreadsheet (*.ods)")); + + if (filename.isEmpty()) { + return; + } + + settings.setValue("path/export_ods", QFileInfo(filename).absolutePath()); + + OdsDocWriter writer(filename); + OdsExport export_ods(_project_sp.get()); + export_ods.write(&writer); + + writer.close(); + //emit operateXpipFile(filename); + } + catch (pappso::PappsoException & error) { + viewError(tr("Error while writing ODS file :\n%1").arg(error.qwhat())); + } + qDebug() << "MainWindow::doAcceptedExportSpreadsheetDialog end"; +} + void MainWindow::doAcceptedLoadResultDialog() { qDebug() << "MainWindow::doAcceptedLoadResultDialog begin"; AutomaticFilterParameters param = _p_load_results_dialog->getAutomaticFilterParameters(); @@ -227,12 +260,12 @@ void MainWindow::selectXpipFile() { qDebug() << "MainWindow::doActionSpreadsheet begin"; try { - _p_load_results_dialog->show(); - _p_load_results_dialog->raise(); - _p_load_results_dialog->activateWindow(); + _p_export_spreadsheet_dialog->show(); + _p_export_spreadsheet_dialog->raise(); + _p_export_spreadsheet_dialog->activateWindow(); } catch (pappso::PappsoException & error) { - viewError(tr("Error while writing MassChroqML file :\n%1").arg(error.qwhat())); + viewError(tr("Error doActionSpreadsheet :\n%1").arg(error.qwhat())); } qDebug() << "MainWindow::doActionSpreadsheet end"; } diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index d926d2aaf1affc3b9c26b08ab190190c0acb9052..331850d8e764baf1c021fc26e95f4e221537ef94 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -38,6 +38,7 @@ #include "files/xpipfile.h" #include "project_view/projectwindow.h" #include "load_results_dialog/loadresultsdialog.h" +#include "export_spreadsheet_dialog/exportspreadsheetdialog.h" @@ -85,6 +86,7 @@ public slots: void doProjectReady(ProjectSp project_sp); void doProjectNotReady(QString error); void doAcceptedLoadResultDialog(); + void doAcceptedExportSpreadsheetDialog(); //void peptideEdited(QString peptideStr); // void setColor(const QColor &color); // void setShape(Shape shape); @@ -109,6 +111,7 @@ private : ProjectWindow * _project_window=nullptr; LoadResultsDialog * _p_load_results_dialog=nullptr; + ExportSpreadsheetDialog * _p_export_spreadsheet_dialog; }; diff --git a/src/gui/project_view/project_view.ui b/src/gui/project_view/project_view.ui index 70b513cf0dca38c90076cc0e2eadd2f721b92bc2..bcff87cae093fc912e8936e7c7adb37cb86bd67f 100644 --- a/src/gui/project_view/project_view.ui +++ b/src/gui/project_view/project_view.ui @@ -21,7 +21,7 @@ <bool>true</bool> </property> <property name="currentIndex"> - <number>1</number> + <number>0</number> </property> <widget class="QWidget" name="identifications"> <attribute name="title"> diff --git a/src/output/ods/odsexport.cpp b/src/output/ods/odsexport.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1989724cc2495adb143fc1c08744ffae3bef177d --- /dev/null +++ b/src/output/ods/odsexport.cpp @@ -0,0 +1,42 @@ +/** + * \file output/ods/odsexport.cpp + * \date 11/4/2017 + * \author Olivier Langella + * \brief ODS export + */ + +/******************************************************************************* +* 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 "odsexport.h" +#include "simplesheet.h" +#include <QSettings> + +OdsExport::OdsExport(const Project * project):_p_project(project) { +} + +void OdsExport::write(CalcWriterInterface * p_writer) { + QSettings settings; + if (settings.value("export_ods/simple", "false").toBool()) { + SimpleSheet(p_writer, _p_project); + } +} diff --git a/src/output/ods/odsexport.h b/src/output/ods/odsexport.h new file mode 100644 index 0000000000000000000000000000000000000000..222af72b70aa6811b5a4e6ca177094e73d9535a1 --- /dev/null +++ b/src/output/ods/odsexport.h @@ -0,0 +1,47 @@ +/** + * \file output/ods/odsexport.h + * \date 11/4/2017 + * \author Olivier Langella + * \brief ODS export + */ + +/******************************************************************************* +* 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 ODSEXPORT_H +#define ODSEXPORT_H + +#include "../../core/project.h" +#include <odsstream/calcwriterinterface.h> + +class OdsExport +{ +public: + OdsExport(const Project * project); + + void write(CalcWriterInterface * p_writer); + +private: + const Project * _p_project; +}; + +#endif // ODSEXPORT_H diff --git a/src/output/ods/simplesheet.cpp b/src/output/ods/simplesheet.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f4517be5c3b9c8cb21107d7dca0e05f8655c454 --- /dev/null +++ b/src/output/ods/simplesheet.cpp @@ -0,0 +1,65 @@ +/** + * \file output/ods/simplesheet.h + * \date 11/4/2017 + * \author Olivier Langella + * \brief ODS simple sheet + */ + +/******************************************************************************* +* 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 "simplesheet.h" +#include "../../core/identificationgroup.h" + +SimpleSheet::SimpleSheet (CalcWriterInterface * p_writer, const Project * p_project): _p_project(p_project) { + _p_writer = p_writer; + p_writer->writeSheet("simple"); + + std::vector<IdentificationGroup *> identification_list = p_project->getIdentificationGroupList(); + + for (IdentificationGroup * p_ident:identification_list) { + writeIdentificationGroup(p_ident); + } +} + +void SimpleSheet::writeIdentificationGroup(IdentificationGroup * p_ident) { + + //_p_writer->writeSheet("simple"); + const std::vector<MsRunSp> msrun_list = p_ident->getMsRunSpList(); + _p_writer->writeCell("protein"); + _p_writer->writeLine(); + _p_writer->writeEmptyCell(); + _p_writer->writeCell("peptide"); + _p_writer->writeLine(); + if (msrun_list.size() == 1) { + _p_writer->writeCell("sample"); + _p_writer->writeLine(); + _p_writer->writeCell(msrun_list[0].get()->getSampleName()); + _p_writer->writeLine(); + } + + for (ProteinMatch * p_protein_match :p_ident->getProteinMatchList()) { + _p_writer->writeCell(p_protein_match->getProteinXtpSp().get()->getAccession()); + _p_writer->writeLine(); + } + +} diff --git a/src/output/ods/simplesheet.h b/src/output/ods/simplesheet.h new file mode 100644 index 0000000000000000000000000000000000000000..447172b7352706d712097cd0d97b8de07f32be11 --- /dev/null +++ b/src/output/ods/simplesheet.h @@ -0,0 +1,48 @@ +/** + * \file output/ods/simplesheet.h + * \date 11/4/2017 + * \author Olivier Langella + * \brief ODS simple sheet + */ + +/******************************************************************************* +* 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 SIMPLESHEET_H +#define SIMPLESHEET_H + +#include "../../core/project.h" +#include <odsstream/calcwriterinterface.h> +#include "../../core/proteinmatch.h" + +class SimpleSheet +{ + public : + SimpleSheet (CalcWriterInterface * p_writer, const Project * p_project); +private : + void writeIdentificationGroup(IdentificationGroup * p_ident); +private : + const Project * _p_project; + CalcWriterInterface * _p_writer; +}; + +#endif // SIMPLESHEET_H