Skip to content
Snippets Groups Projects
Commit 3a2a3684 authored by Renne Thomas's avatar Renne Thomas
Browse files

handle group modification in MassChroQParam

parent 5e1b34e7
No related branches found
No related tags found
1 merge request!20Handle tdf for MsRunStatistics
......@@ -30,22 +30,12 @@
MassChroQParamWindow::MassChroQParamWindow(
MsIdentificationListWindow *parent, MsRunAlignmentGroupSp alignment_group)
MsIdentificationListWindow *parent)
: QWidget(), ui(new Ui::MassChroQParamView)
{
mp_identification_list_window = parent;
msp_alignment_group = alignment_group;
ui->setupUi(this);
foreach(MsRunSp ms_run, msp_alignment_group->getMsRunsInAlignmentGroup())
{
QListWidgetItem *new_item = new QListWidgetItem(ms_run->getSampleName());
ui->msruns_list->insertItem(0, new_item);
}
MsRunSp reference = msp_alignment_group->getMsRunReference();
if(reference != nullptr)
{
ui->reference_line->setText(reference->getSampleName());
}
}
......@@ -57,6 +47,17 @@ void
MassChroQParamWindow::setAlignmentGroup(MsRunAlignmentGroupSp alignment_group)
{
msp_alignment_group = alignment_group;
ui->msruns_list->clear();
foreach(MsRunSp ms_run, msp_alignment_group->getMsRunsInAlignmentGroup())
{
QListWidgetItem *new_item = new QListWidgetItem(ms_run->getSampleName());
ui->msruns_list->insertItem(0, new_item);
}
MsRunSp reference = msp_alignment_group->getMsRunReference();
if(reference != nullptr)
{
ui->reference_line->setText(reference->getSampleName());
}
}
......
......@@ -37,8 +37,7 @@ class MassChroQParamWindow : public QWidget
Q_OBJECT
public:
MassChroQParamWindow(MsIdentificationListWindow *parent,
MsRunAlignmentGroupSp alignment_group);
MassChroQParamWindow(MsIdentificationListWindow *parent);
~MassChroQParamWindow();
void setAlignmentGroup(MsRunAlignmentGroupSp alignment_group);
......
......@@ -399,7 +399,8 @@ MsIdentificationListWindow::openMassChroQParametersView(
qDebug();
if(mp_massChroQParamWindow == nullptr)
{
mp_massChroQParamWindow = new MassChroQParamWindow(this, alignment_group);
mp_massChroQParamWindow = new MassChroQParamWindow(this);
}
mp_massChroQParamWindow->setAlignmentGroup(alignment_group);
mp_massChroQParamWindow->show();
}
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