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

new tandem preset dialog window

parent 79dafab5
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,7 @@ SET(XTPCPP_SRCS
./gui/choose_modification_dialog/choosemodificationdialog.cpp
./gui/edit_label_methods/editlabelmethods.cpp
./gui/edit_modifications/editmodifications.cpp
./gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
./gui/export_spreadsheet_dialog/exportspreadsheetdialog.cpp
./gui/load_results_dialog/loadresultsdialog.cpp
./gui/mainwindow.cpp
......@@ -152,6 +153,7 @@ SET (GUI_UIS
./gui/choose_modification_dialog/choose_modification_dialog.ui
./gui/edit_label_methods/edit_label_methods.ui
./gui/edit_modifications/edit_modifications.ui
./gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui
./gui/export_spreadsheet_dialog/export_spreadsheet_dialog.ui
./gui/load_results_dialog/load_results_dialog.ui
./gui/main.ui
......@@ -173,6 +175,7 @@ SET(XTPCPP_MOC_HDRS
./gui/choose_modification_dialog/choosemodificationdialog.h
./gui/edit_label_methods/editlabelmethods.h
./gui/edit_modifications/editmodifications.h
./gui/edit_tandem_preset_dialog/edittandempresetdialog.h
./gui/export_spreadsheet_dialog/exportspreadsheetdialog.h
./gui/load_results_dialog/loadresultsdialog.h
./gui/mainwindow.h
......
......@@ -43,10 +43,10 @@ public:
explicit EditModifications(ProjectWindow * parent = 0);
~EditModifications();
void setProjectSp(ProjectSp project_sp);
public slots:
public slots:
void ItemClicked (QModelIndex index );
void ItemDoubleClicked (QModelIndex index );
private slots:
......
......@@ -14,7 +14,7 @@
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="windowTitle">
<string>Labeling methods editor</string>
<string>X!Tandem preset editor</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
......@@ -27,6 +27,39 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QComboBox" name="preset_combo_box"/>
</item>
<item>
<widget class="QPushButton" name="pushButton_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>New</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Preset directory</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="gridLayout">
......@@ -39,13 +72,22 @@
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="spectrum_tab">
<attribute name="title">
<string>Spectrum</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
......@@ -54,8 +96,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>551</width>
<height>161</height>
<width>567</width>
<height>198</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
......@@ -128,13 +170,10 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBox"/>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButton_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
......@@ -144,9 +183,6 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="spinBox_2"/>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboBox_2">
<item>
......@@ -175,6 +211,12 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
</layout>
</item>
<item>
......@@ -200,6 +242,58 @@
<attribute name="title">
<string>Protein</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QScrollArea" name="scrollArea_2">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>72</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit"/>
......
/**
* \file gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
* \date 30/9/2017
* \author Olivier Langella
* \brief edit tandem preset dialog
*/
/*******************************************************************************
* 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 "edittandempresetdialog.h"
#include <QDebug>
#include "ui_edit_tandem_preset_dialog.h"
EditTandemPresetDialog::EditTandemPresetDialog(QWidget * parent):
QDialog(parent),
ui(new Ui::EditTandemPresetView)
{
qDebug() << "EditTandemPresetDialog::EditTandemPresetDialog begin";
ui->setupUi(this);
this->setModal(true);
#if QT_VERSION >= 0x050000
// Qt5 code
#else
// Qt4 code
#endif
qDebug() << "EditTandemPresetDialog::EditTandemPresetDialog end";
}
EditTandemPresetDialog::~EditTandemPresetDialog()
{
delete ui;
}
/**
* \file gui/edit_tandem_preset_dialog/edittandempresetdialog.h
* \date 30/9/2017
* \author Olivier Langella
* \brief edit tandem preset dialog
*/
/*******************************************************************************
* 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 EDITTANDEMPRESETDIALOG_H
#define EDITTANDEMPRESETDIALOG_H
#include<QDialog>
namespace Ui {
class EditTandemPresetView;
}
class EditTandemPresetDialog: public QDialog
{
Q_OBJECT
public:
explicit EditTandemPresetDialog(QWidget * parent);
~EditTandemPresetDialog();
private:
Ui::EditTandemPresetView *ui;
};
#endif // EDITTANDEMPRESETDIALOG_H
......@@ -369,7 +369,7 @@
<sender>pushButton_7</sender>
<signal>clicked()</signal>
<receiver>TandemRunDialog</receiver>
<slot>selectPresetDirectory()</slot>
<slot>editPresets()</slot>
<hints>
<hint type="sourcelabel">
<x>541</x>
......@@ -390,6 +390,6 @@
<slot>selectMzFiles()</slot>
<slot>selectOutputDirectory()</slot>
<slot>setPresetName(QString)</slot>
<slot>selectPresetDirectory()</slot>
<slot>editPresets()</slot>
</slots>
</ui>
......@@ -139,6 +139,18 @@ void TandemRunDialog::selectPresetDirectory() {
// tr("Error choosing identification result files : %1").arg(error.qwhat()), error);
}
}
void TandemRunDialog::editPresets() {
QSettings settings;
QString default_preset_location = settings.value("path/tandemrun_preset_directory", "").toString();
if (_p_preset_dialog == nullptr) {
_p_preset_dialog = new EditTandemPresetDialog(this);
}
_p_preset_dialog->show();
}
void TandemRunDialog::selectOutputDirectory() {
try {
QSettings settings;
......@@ -218,3 +230,5 @@ TandemRunBatch TandemRunDialog::getTandemRunBatch() const {
tandem_run_batch._number_of_threads = ui->thread_spin_box->value();
return tandem_run_batch;
}
......@@ -33,6 +33,7 @@
#include <QDialog>
#include <QStringListModel>
#include "../../core/tandem_run/tandemrunbatch.h"
#include "../edit_tandem_preset_dialog/edittandempresetdialog.h"
namespace Ui {
class TandemRunDialog;
......@@ -55,6 +56,7 @@ public slots:
void selectMzFiles();
void selectOutputDirectory();
void selectPresetDirectory();
void editPresets();
void setPresetName(QString preset_name);
signals:
......@@ -62,6 +64,7 @@ private:
void fillPresetComboBox();
private:
Ui::TandemRunDialog *ui;
EditTandemPresetDialog * _p_preset_dialog=nullptr;
QStringListModel * _p_fasta_file_list;
QStringListModel * _p_mz_file_list;
QString _previous_preset_file;
......
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