Skip to content

Commit

Permalink
Issue 550: Start working on restructuring GUI events surrounding spec…
Browse files Browse the repository at this point in the history
…tra plots, peak groups, mass calc gui.
  • Loading branch information
PMSeitzer committed Jun 23, 2022
1 parent 8c01cc0 commit c8aab44
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
14 changes: 6 additions & 8 deletions src/maven/point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,24 @@ EicPoint::EicPoint(float x, float y, Peak* peak, MainWindow* mw)
if (_peak) {
_cSize += 20*(_peak->quality);
//mouse press events
connect(this, SIGNAL(peakSelected(Peak*)), mw, SLOT(showPeakInfo(Peak*)));
//connect(this, SIGNAL(peakSelected(Peak*)), mw, SLOT(showPeakInfo(Peak*)));

//If shift modifier is not down, clear out old selection
connect(this, SIGNAL(peakSelectedNoShiftModifier(Peak*)), mw->getEicWidget(), SLOT(clearPeakAreas()));
//connect(this, SIGNAL(peakSelectedNoShiftModifier(Peak*)), mw->getEicWidget(), SLOT(clearPeakAreas()));

connect(this, SIGNAL(peakSelected(Peak*)), mw->getEicWidget(), SLOT(showPeakArea(Peak*)));

//Issue 449: select only MS2 associated with a single peak
//connect(this, SIGNAL(peakSelected(Peak*)), mw->ms2ScansListWidget, SLOT(selectMs2Scans(Peak*)));
//connect(this, SIGNAL(peakSelected(Peak*)), mw->getEicWidget(), SLOT(showPeakArea(Peak*)));

//Issue 460: select all MS2 scans instead of single peak
connect(this, SIGNAL(groupClicked(PeakGroup*)), mw->ms2ScansListWidget, SLOT(selectMs2Scans(PeakGroup*)));
connect(this, SIGNAL(groupClicked(PeakGroup*)), mw->massCalcWidget, SLOT(setPeakGroup(PeakGroup*)));

//mouse hover events
connect(this, SIGNAL(peakGroupFocus(PeakGroup*)), mw->getEicWidget(), SLOT(setSelectedGroup(PeakGroup*)));
connect(this, SIGNAL(peakGroupFocus(PeakGroup*)), mw->getEicWidget()->scene(), SLOT(update()));

//Issue 456: hovering over a peak is tantamount to selecting it
connect(this, SIGNAL(peakGroupFocus(PeakGroup*)), mw->massCalcWidget, SLOT(setPeakGroup(PeakGroup*)));
connect(this, SIGNAL(peakGroupFocus(PeakGroup*)), mw->fragmentationSpectraWidget, SLOT(overlayPeakGroup(PeakGroup*)));
// connect(this, SIGNAL(peakGroupFocus(PeakGroup*)), mw->massCalcWidget, SLOT(setPeakGroup(PeakGroup*)));
// connect(this, SIGNAL(peakGroupFocus(PeakGroup*)), mw->fragmentationSpectraWidget, SLOT(overlayPeakGroup(PeakGroup*)));
}

//mouse press events
Expand Down
16 changes: 11 additions & 5 deletions src/maven/treedockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ void TreeDockWidget::showInfo() {
mainwindow->getSpectraWidget()->setScan(scan);
} else if (scan->mslevel == 2){
mainwindow->fragmentationSpectraWidget->setScan(scan);
mainwindow->massCalcWidget->setFragmentationScan(scan);

//TODO: Issue 550 Need to ensure that this is coming from the user
//mainwindow->massCalcWidget->setFragmentationScan(scan);
} else if (scan->mslevel == 3) {
mainwindow->ms3SpectraWidget->setScan(scan);
}
Expand Down Expand Up @@ -314,13 +316,15 @@ void TreeDockWidget::showInfo() {
minFractionScansForConsensus);

//Issue 550: SpectraWidget::setCurrentFragment() expects Fragment* sorted by mz
f->sortByMz();
f->consensus->sortByMz();

if (mslevel == 1){
mainwindow->getSpectraWidget()->setCurrentFragment(f->consensus, mslevel);
} else if (mslevel == 2){
mainwindow->fragmentationSpectraWidget->setCurrentFragment(f->consensus, mslevel);
mainwindow->massCalcWidget->setFragment(f->consensus);

//TODO: Issue 550 Either remove, or sync efforts with MS2-scan based selection
//mainwindow->massCalcWidget->setFragment(f->consensus);
} else if (mslevel == 3) {
mainwindow->ms3SpectraWidget->setCurrentFragment(f->consensus, mslevel);
}
Expand Down Expand Up @@ -385,11 +389,13 @@ void TreeDockWidget::showInfo() {
minFractionScansForConsensus);

//Issue 550: SpectraWidget::setCurrentFragment() expects Fragment* sorted by mz
f->sortByMz();
f->consensus->sortByMz();

if (mslevel == 2){
mainwindow->fragmentationSpectraWidget->setCurrentFragment(f->consensus, mslevel);
mainwindow->massCalcWidget->setFragment(f->consensus);

//TODO: Issue 550 Either remove, or sync efforts with MS2-scan based selection
//mainwindow->massCalcWidget->setFragment(f->consensus);
}

vector<float> rtsVector;
Expand Down

0 comments on commit c8aab44

Please sign in to comment.