diff --git a/MantidPlot/src/ApplicationWindow.cpp b/MantidPlot/src/ApplicationWindow.cpp index 3bf29626590495c6dea3253c82cd9f161d23d31a..82f3674fc890738918b5110b3fc62efc1fc38538 100644 --- a/MantidPlot/src/ApplicationWindow.cpp +++ b/MantidPlot/src/ApplicationWindow.cpp @@ -1231,9 +1231,6 @@ void ApplicationWindow::initMainMenu() { decayMenu = new QMenu(this); decayMenu->setObjectName("decayMenu"); - multiPeakMenu = new QMenu(this); - multiPeakMenu->setObjectName("multiPeakMenu"); - analysisMenu = new QMenu(this); analysisMenu->setObjectName("analysisMenu"); connect(analysisMenu, SIGNAL(aboutToShow()), this, @@ -8187,7 +8184,7 @@ void ApplicationWindow::showCursor() { /** Switch on the multi-peak selecting tool for fitting * with the Fit algorithm of multiple peaks on a single background - */ + */ void ApplicationWindow::selectMultiPeak(bool showFitPropertyBrowser) { MultiLayer *plot = dynamic_cast<MultiLayer *>(activeWindow(MultiLayerWindow)); if (!plot) @@ -9283,12 +9280,6 @@ void ApplicationWindow::analysisMenuAboutToShow() { analysisMenu->addAction(actionFitGauss); analysisMenu->addAction(actionFitLorentz); - // The tool doesn't work yet (DataPickerTool) - // multiPeakMenu->clear(); - // multiPeakMenu = analysisMenu->addMenu (tr("Fit &Multi-peak")); - // multiPeakMenu->addAction(actionMultiPeakGauss); - // multiPeakMenu->addAction(actionMultiPeakLorentz); - analysisMenu->addSeparator(); analysisMenu->addAction(actionShowFitDialog); } else if (isOfType(w, "Matrix")) { @@ -12894,14 +12885,6 @@ void ApplicationWindow::createActions() { new QAction(QIcon(getQPixmap("boxPlot_xpm")), tr("&Box Plot"), this); connect(actionBoxPlot, SIGNAL(activated()), this, SLOT(plotBoxDiagram())); - actionMultiPeakGauss = new QAction(tr("&Gaussian..."), this); - connect(actionMultiPeakGauss, SIGNAL(activated()), this, - SLOT(fitMultiPeakGauss())); - - actionMultiPeakLorentz = new QAction(tr("&Lorentzian..."), this); - connect(actionMultiPeakLorentz, SIGNAL(activated()), this, - SLOT(fitMultiPeakLorentz())); - actionHomePage = new QAction(tr("&Mantid Homepage"), this); // Mantid change connect(actionHomePage, SIGNAL(activated()), this, SLOT(showHomePage())); @@ -13453,8 +13436,6 @@ void ApplicationWindow::translateActionsStrings() { actionBoxPlot->setText(tr("&Box Plot")); actionBoxPlot->setToolTip(tr("Box and whiskers plot")); - actionMultiPeakGauss->setMenuText(tr("&Gaussian...")); - actionMultiPeakLorentz->setMenuText(tr("&Lorentzian...")); actionHomePage->setMenuText(tr("&Mantid Homepage")); // Mantid change actionHelpBugReports->setText(tr("Report a &Bug")); actionAskHelp->setText(tr("Ask for Help")); @@ -14049,50 +14030,6 @@ void ApplicationWindow::disregardCol() { t->setPlotDesignation(Table::None); } -void ApplicationWindow::fitMultiPeakGauss() { - fitMultiPeak((int)MultiPeakFit::Gauss); -} - -void ApplicationWindow::fitMultiPeakLorentz() { - fitMultiPeak((int)MultiPeakFit::Lorentz); -} - -void ApplicationWindow::fitMultiPeak(int profile) { - MultiLayer *plot = dynamic_cast<MultiLayer *>(activeWindow(MultiLayerWindow)); - if (!plot) - return; - if (plot->isEmpty()) { - QMessageBox::warning( - this, tr("MantidPlot - Warning"), // Mantid - tr("<h4>There are no plot layers available in this window.</h4>" - "<p><h4>Please add a layer and try again!</h4>")); - btnPointer->setChecked(true); - return; - } - - Graph *g = dynamic_cast<Graph *>(plot->activeGraph()); - if (!g || !g->validCurvesDataSize()) - return; - - if (g->isPiePlot()) { - QMessageBox::warning( - this, tr("MantidPlot - Warning"), // Mantid - tr("This functionality is not available for pie plots!")); - return; - } else { - bool ok; - int peaks = QInputDialog::getInteger(this, - tr("MantidPlot - Enter the number of peaks"), // Mantid - tr("Peaks"), 2, 2, 1000000, 1, &ok); - if (ok && peaks) { - g->setActiveTool( - new MultiPeakFitTool(g, this, (MultiPeakFit::PeakProfile)profile, - peaks, info, SLOT(setText(const QString &)))); - displayBar->show(); - } - } -} - void ApplicationWindow::showHomePage() { QDesktopServices::openUrl(QUrl("http://www.mantidproject.org")); } diff --git a/MantidPlot/src/ApplicationWindow.h b/MantidPlot/src/ApplicationWindow.h index cdcff45cfb0f909eb1100bb940466430542c05e9..06582d69dcdf52f230004dac48a9565a2ac2e923 100644 --- a/MantidPlot/src/ApplicationWindow.h +++ b/MantidPlot/src/ApplicationWindow.h @@ -652,9 +652,9 @@ public slots: void fitSigmoidal(); void fitGauss(); void fitLorentz(); - void fitMultiPeak(int profile); - void fitMultiPeakGauss(); - void fitMultiPeakLorentz(); + //void fitMultiPeak(int profile); + //void fitMultiPeakGauss(); + //void fitMultiPeakLorentz(); //@} //! \name Calculus @@ -1403,7 +1403,7 @@ private: QAction *actionNormalizeTable, *actionConvolute, *actionDeconvolute, *actionCorrelate, *actionAutoCorrelate; QAction *actionSetAscValues, *actionSetRandomValues; QAction *actionSetXCol, *actionSetYCol, *actionSetZCol, *actionSetLabelCol, *actionDisregardCol, *actionSetXErrCol, *actionSetYErrCol; - QAction *actionBoxPlot, *actionMultiPeakGauss, *actionMultiPeakLorentz, *actionCheckUpdates; + QAction *actionBoxPlot, /**actionMultiPeakGauss, *actionMultiPeakLorentz,*/ *actionCheckUpdates; QAction *actionDonate, *actionHomePage, *actionDownloadManual, *actionTechnicalSupport, *actionTranslations; QAction *actionHelpForums, *actionHelpBugReports, *actionAskHelp; QAction *actionShowPlotDialog, *actionShowScaleDialog;