Commit 81ec763c authored by Edlira Nano's avatar Edlira Nano
Browse files

xic extraction widget done

git-svn-id: https://subversion.renater.fr/masschroq/trunk@2240 e4b6dbb4-9209-464b-83f7-6257456c460c
parent d2abdecc
......@@ -13,7 +13,7 @@ MainWindow::MainWindow(QWidget *parent)
// Central Widget
QWidget *widget = new QWidget;
_plot = new QwtPlot;
setCentralWidget(widget);
//_plot = new XicPlot(this);
......@@ -29,6 +29,7 @@ MainWindow::MainWindow(QWidget *parent)
//createStatusBar();
}
void
MainWindow::createMenus() {
_fileMenu = menuBar()->addMenu(tr("&File"));
......@@ -63,7 +64,7 @@ MainWindow::createActions() {
_extractXicAct = new QAction(tr("&extract XIC"), this);
_extractXicAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_X));
_extractXicAct->setStatusTip(tr("Select values vor XIC extraction"));
connect(_extractXicAct, SIGNAL(triggered()), this, SLOT(extractXic()));
connect(_extractXicAct, SIGNAL(triggered()), this, SLOT(extractXicWidget()));
_applyFilterAct = new QAction(tr("&filter XIC"), this);
_applyFilterAct->setShortcut(QKeySequence(tr("Ctrl+F")));
......@@ -92,7 +93,8 @@ MainWindow::loadMsrun() {
}
void
MainWindow::extractXic() {
MainWindow::extractXicWidget() {
XicSelectionWidget * xic = new XicSelectionWidget(this);
}
......
......@@ -31,7 +31,7 @@ private:
//createStatusBar();
//createDockWindows();
//Plot * _plot;
Plot * _plot;
//QListWidget * filtersList;
//QListWidget * quantiItemsList;
......
/**
* \file xicSelectionWidget.cpp
* \date November 15, 2011
* \author Edlira Nano
*/
#include <QtGui>
#include "xicSelectionWidget.h"
XicSelectionWidget::XicSelectionWidget() {
create_xic_type_group();
create_xic_range_group();
create_mz_group();
QPushButton extractButton = new QPushButton(tr("&Extract"));
extractButton.setDefault(true);
_button_box = new QDialogButtonBox(Qt::Vertical);
_button_box->addButton(extractButton, QDialogButtonBox::AcceptRole);
_button_box->addButton(QDialogButtonBox::Cancel);
connect(_button_box, SIGNAL(accepted()), this, SLOT(accept()));
connect(_button_box, SIGNAL(rejected()), this, SLOT(reject()));
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(_xic_type_group);
mainLayout->addWidget(_xic_range_group);
mainLayout->addWidget(_mz_group);
mainLayout->addWidget(_button_box);
setLayout(mainLayout);
setWindowTitle(tr("XIC extraction"));
}
void
XicSelectionWidget::create_xic_type_group() {
_xic_type_group = new QGroupBox(tr("XIC type"));
QVBoxLayout *layout = new QVBoxLayout;
QButtonGroup xic_type_buttons = new QButtonGroup();
xic_type_buttons.setExclusive(true);
QCheckBox xic_type_max = new QCheckBox(tr("max xic type"));
xic_type_max.setChecked(true);
xic_type_buttons.addButton(xic_type_max);
QCheckBox xic_type_sum = new QCheckBox(tr("sum xic type"));
xic_type_buttons.addButton(xic_type_sum);
layout->addWidget(xic_type_buttons);
_xic_type_group->setLayout(layout);
}
void
XicSelectionWidget::create_xic_range_group() {
_xic_range_group = new QGroupBox(tr("XIC extraction range"));
QGridLayout *layout = new QGridLayout;
QButtonGroup xic_range_buttons = new QButtonGroup();
xic_range_buttons.setExclusive(true);
QCheckBox ppm_range = new QCheckBox(tr("ppm_range"));
ppm_range.setChecked(true);
xic_range_buttons.addButton(ppm_range);
QCheckBox mz_range = new QCheckBox(tr("mz_range"));
xic_range_buttons.addButton(mz_range);
layout->addWidget(xic_range_buttons, 0, 0, 1, 2);
QLabel min_label = new QLabel("minimum range");
QDoubleSpinBox min_box = new QDoubleSpinBox;
min_box.setMaximum(30.00);
min_box.setWrapping(true);
min_box.setSingleStep(0.1);
layout->addWidget(min_label, 1, 0);
layout->addWidget(min_box, 1, 1);
QLabel max_label = new QLabel("maximum range");
QDoubleSpinBox max_box = new QDoubleSpinBox;
max_box.setMaximum(30.00);
max_box.setWrapping(true);
max_box.setSingleStep(0.1);
layout->addWidget(max_label, 2, 0);
layout->addWidget(max_box, 2, 1);
_xic_range_group->setLayout(layout);
}
void
XicSelectionWidget::create_mz_group() {
_mz_group = new QGroupBox(tr("m/z value selection"));
QFormLayout *layout = new QFormLayout;
QDoubleSpinBox mz_value = new QDoubleSpinBox;
mz_value.setMaximum(5000.0000);
mz_value.setSingleStep(10.0000);
QDoubleSpinBox rt_value = new QDoubleSpinBox;
mz_value.setMaximum(5000.0000);
mz_value.setSingleStep(10.0000);
layout->addRow(tr("rt value to extract"), rt_value);
_mz_group->setLayout(layout);
}
......@@ -27,7 +27,7 @@
#ifndef XIC_SELECTION_WIDGET_H_
#define XIC_SELECTION_WIDGET_H_ 1
#include
#include <QDockWidget>
/**
* \class XicSelectionWidget
......@@ -36,28 +36,31 @@
*
*/
class XicSelectionWidget : public QWidget {
class XicSelectionWidget : public QDockWidget {
Q_OBJECT
public :
XicSelectionWidget(const Msrun * msrun,
const XicExtractionMethodBase & extraction_method,
const mcq_xic_type xic_type,
const QPen * style);
XicSelectionWidget();
virtual ~XicSelectionWidget();
//virtual XicProfile * applyTreatment(XicProfile * xic_profile);
private :
void create_xic_type_group();
void create_xic_range_group();
void create_mz_group();
// type of the Xic : MAX_XIC_TYPE ou SUM_XIC_TYPE
const mcq_xic_type _xic_type;
QButtonGroup * _xic_type_group;
// type of range : mz_range or ppm_range
QGroupBox * _xic_range_group;
QGroupBox * _mz_group;
QDialogButtonBox * _button_box;
mcq_double _mz;
};
......
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