Commit eefd4eae authored by Edlira Nano's avatar Edlira Nano
Browse files

xic extrction widget compiled

git-svn-id: https://subversion.renater.fr/masschroq/trunk@2242 e4b6dbb4-9209-464b-83f7-6257456c460c
parent d0e902dd
......@@ -128,13 +128,15 @@ SET(VIEWXIC_MOC_HDRS
)
SET(GUI_SRCS
./gui/masschroq_gui.cpp
./gui/mainwindow.cpp
./gui/masschroq_gui.cpp
./gui/xicSelectionWidget.cpp
)
# another list, this time it includes all header files that should be treated with moc
SET(GUI_MOC_HDRS
./gui/mainwindow.h
./gui/xicSelectionWidget.h
)
set(CMAKE_MODULE_PATH ${masschroq_SOURCE_DIR}/modules)
......
#include <QMenuBar>
#include <QFileDialog>
#include <QMessageBox>
#include <QDockWidget>
#include "mainwindow.h"
#include "masschroq_gui.h"
#include "xicSelectionWidget.h"
MainWindow::MainWindow(QWidget *parent)
:
......@@ -13,7 +16,7 @@ MainWindow::MainWindow(QWidget *parent)
// Central Widget
_plot = new QwtPlot;
QWidget * widget = new QWidget();
setCentralWidget(widget);
//_plot = new XicPlot(this);
......@@ -94,7 +97,10 @@ MainWindow::loadMsrun() {
void
MainWindow::extractXicWidget() {
XicSelectionWidget * xic = new XicSelectionWidget(this);
QDockWidget * dock = new QDockWidget(tr("XIC extraction"), this);
XicSelectionWidget * xic = new XicSelectionWidget(dock);
dock->setWidget(xic);
addDockWidget(Qt::LeftDockWidgetArea, dock);
}
......
......@@ -14,7 +14,7 @@ public:
private Q_SLOTS:
void loadMsrun();
void extractXic();
void extractXicWidget();
void filterXic();
void about();
......@@ -31,7 +31,7 @@ private:
//createStatusBar();
//createDockWindows();
Plot * _plot;
//Plot * _plot;
//QListWidget * filtersList;
//QListWidget * quantiItemsList;
......
......@@ -7,14 +7,14 @@
#include <QtGui>
#include "xicSelectionWidget.h"
XicSelectionWidget::XicSelectionWidget() : QDockWidget() {
XicSelectionWidget::XicSelectionWidget(QWidget * parent) : QDialog(parent) {
create_xic_type_group();
create_xic_range_group();
create_mz_group();
QPushButton extractButton = new QPushButton(tr("&Extract"));
extractButton.setDefault(true);
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);
......@@ -22,7 +22,7 @@ XicSelectionWidget::XicSelectionWidget() : QDockWidget() {
connect(_button_box, SIGNAL(accepted()), this, SLOT(accept()));
connect(_button_box, SIGNAL(rejected()), this, SLOT(reject()));
QVBoxLayout *mainLayout = new QVBoxLayout;
QVBoxLayout * mainLayout = new QVBoxLayout;
mainLayout->addWidget(_xic_type_group);
mainLayout->addWidget(_xic_range_group);
mainLayout->addWidget(_mz_group);
......@@ -32,20 +32,26 @@ XicSelectionWidget::XicSelectionWidget() : QDockWidget() {
setWindowTitle(tr("XIC extraction"));
}
XicSelectionWidget::~XicSelectionWidget() {
}
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);
QCheckBox * xic_type_max = new QCheckBox(tr("max xic type"));
xic_type_max->setChecked(true);
QCheckBox * xic_type_sum = new QCheckBox(tr("sum xic type"));
QButtonGroup * xic_type_buttons = new QButtonGroup();
xic_type_buttons->setExclusive(true);
xic_type_buttons->addButton(xic_type_max);
xic_type_buttons->addButton(xic_type_sum);
layout->addWidget(xic_type_max);
layout->addWidget(xic_type_sum);
_xic_type_group->setLayout(layout);
}
......@@ -55,28 +61,31 @@ 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);
QCheckBox * ppm_range = new QCheckBox(tr("ppm_range"));
ppm_range->setChecked(true);
QCheckBox * mz_range = new QCheckBox(tr("mz_range"));
QButtonGroup * xic_range_buttons = new QButtonGroup();
xic_range_buttons->setExclusive(true);
xic_range_buttons->addButton(ppm_range);
xic_range_buttons->addButton(mz_range);
layout->addWidget(ppm_range, 0, 0);
layout->addWidget(mz_range, 0, 1);
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);
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);
......@@ -87,13 +96,14 @@ XicSelectionWidget::create_xic_range_group() {
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);
QFormLayout * layout = new QFormLayout;
QDoubleSpinBox * mz_value = new QDoubleSpinBox;
mz_value->setMaximum(5000.0000);
mz_value->setSingleStep(10.0000);
QDoubleSpinBox * rt_value = new QDoubleSpinBox;
rt_value->setMaximum(5000.0000);
rt_value->setSingleStep(10.0000);
layout->addRow(tr("mz value to extract"), mz_value);
layout->addRow(tr("rt value to extract"), rt_value);
_mz_group->setLayout(layout);
......
......@@ -27,7 +27,12 @@
#ifndef XIC_SELECTION_WIDGET_H_
#define XIC_SELECTION_WIDGET_H_ 1
#include <QDockWidget>
#include <QDialog>
class QButtonGroup;
class QGroupBox;
class QDialogButtonBox;
/**
* \class XicSelectionWidget
......@@ -36,16 +41,17 @@
*
*/
class XicSelectionWidget : public QDockWidget {
class XicSelectionWidget : public QDialog {
Q_OBJECT
public :
XicSelectionWidget();
XicSelectionWidget(QWidget * parent = 0);
virtual ~XicSelectionWidget();
private slots :
private :
......@@ -53,7 +59,7 @@ class XicSelectionWidget : public QDockWidget {
void create_xic_range_group();
void create_mz_group();
QButtonGroup * _xic_type_group;
QGroupBox * _xic_type_group;
QGroupBox * _xic_range_group;
......
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