From fb4f6977103ef4427db199a93759809dd4f5331f Mon Sep 17 00:00:00 2001 From: Raquel Alvarez Banos Date: Fri, 20 Feb 2015 16:55:57 +0000 Subject: [PATCH] Re #7083 Add widget to select function of logvalue --- .../src/PlotAsymmetryByLogValue.cpp | 10 + .../PlotAsymmetryByLogValueDialog.ui | 678 +++++++++--------- .../src/PlotAsymmetryByLogValueDialog.cpp | 2 + 3 files changed, 362 insertions(+), 328 deletions(-) diff --git a/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp b/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp index bc9cb6bda5c6..c40e52dffe40 100644 --- a/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp +++ b/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp @@ -94,6 +94,16 @@ void PlotAsymmetryByLogValue::init() { boost::make_shared(options), "The calculation type: 'Integral' or 'Differential'."); + std::vector optionsLog; + optionsLog.push_back("Mean"); + optionsLog.push_back("Min"); + optionsLog.push_back("Max"); + optionsLog.push_back("First"); + optionsLog.push_back("Last"); + declareProperty("Function", "Last", + boost::make_shared(optionsLog), + "The calculation type: 'Integral' or 'Differential'."); + declareProperty( "TimeMin", EMPTY_DBL(), "The beginning of the time interval used in the calculations."); diff --git a/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/PlotAsymmetryByLogValueDialog.ui b/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/PlotAsymmetryByLogValueDialog.ui index 5d891ba75661..57ba9eee696c 100644 --- a/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/PlotAsymmetryByLogValueDialog.ui +++ b/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/PlotAsymmetryByLogValueDialog.ui @@ -1,351 +1,373 @@ - PlotAsymmetryByLogValueDialog - - - - 0 - 0 - 479 - 544 - - - - PlotAsymmetryByLogValue - - - - - - - - + PlotAsymmetryByLogValueDialog + + + + 0 + 0 + 479 + 544 + + + + PlotAsymmetryByLogValue + + - - - - - First run + + + - - - - - - - - - Browse - - - - + + + + + + + First run + + + + + + + + + + Browse + + + + + + + + + + + Last run + + + + + + + + + + Browse + + + + + + + + + + + Log value + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + Function + + + + + + + + 0 + 0 + + + + + + + + + + + + + + Output workspace + + + + + + + + + + + + Type + + + + + + + + 0 + 0 + + + + + + + + + + - - - - - Last run - - - - - - - - - - Browse + + + Periods - - - + + + + + + + Red + + + + + + + + + + Green + + + + + + + + + + - - - - - Log value - - - - - - - - 0 - 0 - - - - true + + + Grouping - - - + + + + + + + Forward spectra + + + + + + + false + + + + + + + Backward spectra + + + + + + + + + + - - - - - Output workspace + + + Time - - - - - - - - - - - Type - - - - - - - - 0 - 0 - - - - - - - + + + + + + + Min + + + + + + + + + + Max + + + + + + + + + + - - - - - - - Periods - - - - - - - Red + + + Dead Time Correction - - - - - - - - - Green - - - - - - - + + + + + QLayout::SetDefaultConstraint + + + + + Type + + + + + + + + 0 + 0 + + + + + + + + + + + 0 + + + + + File + + + + + + + + + + Browse + + + + + + + + - - - - - - - Grouping - - - - - - - Forward spectra - - - - - - - false - - - - - - - Backward spectra - - - - - - - - - - - - - - - Time - - - - - - - - Min - - - - - - - - - - Max + + + 6 - - - - - - - - - - - - - - Dead Time Correction - - - - - - QLayout::SetDefaultConstraint - - - - - Type - - - - - - - - 0 - 0 - - - - - - - - - - - 0 - - - - - File - - - - - - - - - - Browse - - - + + + + + 31 + 26 + + + + ? + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + OK + + + + + + + Cancel + + + - - - - - - - - 6 - - - - - - 31 - 26 - - - - ? - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - OK - - - - - - - Cancel - - - - - - - - firstRunBox - browseFirstButton - lastRunBox - browseLastButton - logBox - outWSBox - redBox - forwardBox - timeMinBox - - - + + + firstRunBox + browseFirstButton + lastRunBox + browseLastButton + logBox + outWSBox + redBox + forwardBox + timeMinBox + + + diff --git a/Code/Mantid/MantidQt/CustomDialogs/src/PlotAsymmetryByLogValueDialog.cpp b/Code/Mantid/MantidQt/CustomDialogs/src/PlotAsymmetryByLogValueDialog.cpp index 3d6fe444ee56..9d9acccbb437 100644 --- a/Code/Mantid/MantidQt/CustomDialogs/src/PlotAsymmetryByLogValueDialog.cpp +++ b/Code/Mantid/MantidQt/CustomDialogs/src/PlotAsymmetryByLogValueDialog.cpp @@ -66,6 +66,7 @@ void PlotAsymmetryByLogValueDialog::initLayout() tie(m_uiForm.firstRunBox, "FirstRun", m_uiForm.FirstRunLayout); tie(m_uiForm.lastRunBox, "LastRun", m_uiForm.LastRunLayout); tie(m_uiForm.logBox, "LogValue"); + tie(m_uiForm.typeBoxLog, "Function"); tie(m_uiForm.outWSBox, "OutputWorkspace", m_uiForm.OutputWSLayout); tie(m_uiForm.typeBox, "Type"); tie(m_uiForm.redBox, "Red"); @@ -96,6 +97,7 @@ void PlotAsymmetryByLogValueDialog::initLayout() // Fill ComboBoxes with allowed values fillAndSetComboBox("Type", m_uiForm.typeBox); + fillAndSetComboBox("Function", m_uiForm.typeBoxLog); fillAndSetComboBox("DeadTimeCorrType", m_uiForm.dtcType); // Fill log values from the file