Skip to content

Commit

Permalink
gui updates: load multiple libraries in library widge
Browse files Browse the repository at this point in the history
confirmation dialog when deleting all peaks from tablewidget
  • Loading branch information
eugenemel committed Apr 27, 2018
1 parent 2df87e4 commit 6bd62d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/maven/librarydialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ void LibraryMangerDialog::loadCompoundsFile() {
"All Known Formats(*.csv *.tab *.txt *.msp *.sptxt *.pepXML);;Tab Delimited(*.tab);;CSV File(*.csv);;NIST Library(*.msp);;SpectraST(*.sptxt) pepXML(*.pepXML)");

if ( filelist.size() == 0 || filelist[0].isEmpty() ) return;
loadCompoundsFile(filelist[0]);
for( QString filename: filelist) {
loadCompoundsFile(filename);
}
}

void LibraryMangerDialog::reloadMethodsFolder() {
Expand Down
8 changes: 7 additions & 1 deletion src/maven/tabledockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ TableDockWidget::TableDockWidget(MainWindow* mw, QString title, int numColms) {
QToolButton *btnX = new QToolButton(toolBar);
btnX->setIcon(style()->standardIcon(QStyle::SP_DialogCloseButton));
//btnX->setIcon(QIcon(rsrcPath + "/hide.png"));
connect(btnX, SIGNAL(clicked()),SLOT(hide()));
connect(btnX, SIGNAL(clicked()),this,SLOT(deleteAll()));

QLineEdit* filterEditor = new QLineEdit(toolBar);
filterEditor->setMinimumWidth(15);
Expand Down Expand Up @@ -435,6 +435,12 @@ QList<PeakGroup*> TableDockWidget::getGroups() {
}

void TableDockWidget::deleteAll() {

if (QMessageBox::No == QMessageBox::question(this, "Delete Confirmation",
"Do you want to delete all peakgroups from this table?", QMessageBox::Yes | QMessageBox::No)) {
return;
}

treeWidget->clear();
allgroups.clear();
this->hide();
Expand Down

0 comments on commit 6bd62d8

Please sign in to comment.