diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index ee7bc639fd2815433814c06162028e4e957ad8d4..33ef4cafc28376520b798493d3329514f88c15cd 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -39,6 +39,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Main) { + // http://pappso.inra.fr/demande/ws/pappso_software/xtpcpp _p_app = QCoreApplication::instance(); ui->setupUi(this); setWindowTitle(QString("%1 %2").arg(SOFTWARE_NAME).arg(XTPCPP_VERSION)); @@ -72,20 +73,32 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Main) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_tandem_run_dialog, &TandemRunDialog::accepted, this, + connect(_p_tandem_run_dialog, + &TandemRunDialog::accepted, + this, &MainWindow::doAcceptedTandemRunDialog); - connect(_p_load_results_dialog, &LoadResultsDialog::accepted, this, + connect(_p_load_results_dialog, + &LoadResultsDialog::accepted, + this, &MainWindow::doAcceptedLoadResultDialog); - connect(_p_export_spreadsheet_dialog, &ExportSpreadsheetDialog::accepted, - this, &MainWindow::doAcceptedExportSpreadsheetDialog); + connect(_p_export_spreadsheet_dialog, + &ExportSpreadsheetDialog::accepted, + this, + &MainWindow::doAcceptedExportSpreadsheetDialog); #else // Qt4 code - connect(_p_tandem_run_dialog, SIGNAL(accepted()), this, + connect(_p_tandem_run_dialog, + SIGNAL(accepted()), + this, SLOT(doAcceptedTandemRunDialog())); - connect(_p_load_results_dialog, SIGNAL(accepted()), this, + connect(_p_load_results_dialog, + SIGNAL(accepted()), + this, SLOT(doAcceptedLoadResultDialog())); - connect(_p_export_spreadsheet_dialog, SIGNAL(accepted()), this, + connect(_p_export_spreadsheet_dialog, + SIGNAL(accepted()), + this, SLOT(doAcceptedExportSpreadsheetDialog())); #endif @@ -185,7 +198,8 @@ MainWindow::doAcceptedExportSpreadsheetDialog() settings.value("path/export_ods", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, tr("Save ODS file"), + this, + tr("Save ODS file"), QString("%1/untitled.ods").arg(default_location), tr("Open Document Spreadsheet (*.ods)")); @@ -356,9 +370,11 @@ MainWindow::selectXpipFile() QSettings settings; QString default_location = settings.value("path/xpipfile", "").toString(); - QString filename = QFileDialog::getOpenFileName( - this, tr("Open XPIP File"), default_location, - tr("xpip files (*.xpip);;all files (*)")); + QString filename = + QFileDialog::getOpenFileName(this, + tr("Open XPIP File"), + default_location, + tr("xpip files (*.xpip);;all files (*)")); if(filename.isEmpty()) { @@ -390,8 +406,10 @@ MainWindow::doActionSaveProject() QString filename = QFileDialog::getSaveFileName( - this, tr("Save XPIP file"), - QString("%1/untitled.xpip").arg(default_location), tr("XPIP (*.xpip)")); + this, + tr("Save XPIP file"), + QString("%1/untitled.xpip").arg(default_location), + tr("XPIP (*.xpip)")); if(filename.isEmpty()) { @@ -439,8 +457,10 @@ MainWindow::doActionSpectralCountingMcq() QString default_location = settings.value("path/scmcqfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, tr("Save spectral count TSV file"), - QString("%1/untitled.tsv").arg(default_location), tr("TSV (*.tsv)")); + this, + tr("Save spectral count TSV file"), + QString("%1/untitled.tsv").arg(default_location), + tr("TSV (*.tsv)")); if(filename.isEmpty()) { @@ -467,7 +487,8 @@ MainWindow::doActionFasta() settings.value("path/fastafile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, tr("Save FASTA file"), + this, + tr("Save FASTA file"), QString("%1/untitled.fasta").arg(default_location), tr("FASTA (*.fasta)")); @@ -532,7 +553,8 @@ MainWindow::doActionMassChroQ() QString default_location = settings.value("path/mcqfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, tr("Save MassChroqML file"), + this, + tr("Save MassChroqML file"), QString("%1/untitled.masschroqml").arg(default_location), tr("MassChroqML (*.masschroqml)")); @@ -569,7 +591,8 @@ MainWindow::doActionMassChroqPRM() settings.value("path/mcqprmfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, tr("Save MassChroqPRM file"), + this, + tr("Save MassChroqPRM file"), QString("%1/untitled.masschroqprm").arg(default_location), tr("MassChroqPRM (*.masschroqprm)")); @@ -606,7 +629,8 @@ MainWindow::doActionProticDb() settings.value("path/proticfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, tr("Save PROTICdbML file"), + this, + tr("Save PROTICdbML file"), QString("%1/untitled.proticdbml").arg(default_location), tr("PROTICdbML (*.proticdbml)"));