diff --git a/Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt b/Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt index 07abb239fd85679f56b5cf932cc298b358271263..56c932a6b357ed7e5c14380dcb2fb2da0b45c117 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt +++ b/Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt @@ -11,13 +11,13 @@ set ( SRC_FILES src/Indirect/CorrectionsTab.cpp src/Indirect/DensityOfStates.cpp src/Indirect/Elwin.cpp - src/Indirect/IDATab.cpp src/Indirect/ILLCalibration.cpp src/Indirect/ILLEnergyTransfer.cpp src/Indirect/IndirectBayes.cpp src/Indirect/IndirectBayesTab.cpp src/Indirect/IndirectCorrections.cpp src/Indirect/IndirectDataAnalysis.cpp + src/Indirect/IndirectDataAnalysisTab.cpp src/Indirect/IndirectDataReduction.cpp src/Indirect/IndirectDataReductionTab.cpp src/Indirect/IndirectDiffractionReduction.cpp @@ -99,7 +99,6 @@ set ( INC_FILES inc/MantidQtCustomInterfaces/DirectConvertToEnergy.h inc/MantidQtCustomInterfaces/DllConfig.h inc/MantidQtCustomInterfaces/Homer.h - inc/MantidQtCustomInterfaces/Indirect/IDATab.h inc/MantidQtCustomInterfaces/Indirect/AbsorptionCorrections.h inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.h inc/MantidQtCustomInterfaces/Indirect/CalcCorr.h @@ -113,6 +112,7 @@ set ( INC_FILES inc/MantidQtCustomInterfaces/Indirect/IndirectBayesTab.h inc/MantidQtCustomInterfaces/Indirect/IndirectCorrections.h inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h + inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h inc/MantidQtCustomInterfaces/Indirect/IndirectDataReduction.h inc/MantidQtCustomInterfaces/Indirect/IndirectDataReductionTab.h inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.h @@ -201,7 +201,6 @@ set ( MOC_FILES inc/MantidQtCustomInterfaces/Background.h inc/MantidQtCustomInterfaces/DataComparison.h inc/MantidQtCustomInterfaces/DirectConvertToEnergy.h inc/MantidQtCustomInterfaces/Homer.h - inc/MantidQtCustomInterfaces/Indirect/IDATab.h inc/MantidQtCustomInterfaces/Indirect/AbsorptionCorrections.h inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.h inc/MantidQtCustomInterfaces/Indirect/CalcCorr.h @@ -215,6 +214,7 @@ set ( MOC_FILES inc/MantidQtCustomInterfaces/Background.h inc/MantidQtCustomInterfaces/Indirect/IndirectBayesTab.h inc/MantidQtCustomInterfaces/Indirect/IndirectCorrections.h inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h + inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h inc/MantidQtCustomInterfaces/Indirect/IndirectDataReduction.h inc/MantidQtCustomInterfaces/Indirect/IndirectDataReductionTab.h inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.h diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui index 532b52a10fd30ff5e4fdda9352b65f5bf461803e..0cc347e24f3e44c954839bb8a0ea62812e0c7112 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui @@ -186,6 +186,9 @@ <property name="singleStep"> <double>0.100000000000000</double> </property> + <property name="value"> + <double>1.000000000000000</double> + </property> </widget> </item> <item> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h index 0292ea1986007c51d1711b49dc1425c4fc293805..0a8f60acd03db66326f56aca299f2751036ba161 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h @@ -2,7 +2,7 @@ #define MANTIDQTCUSTOMINTERFACESIDA_CONVFIT_H_ #include "ui_ConvFit.h" -#include "IDATab.h" +#include "IndirectDataAnalysisTab.h" #include "MantidAPI/MatrixWorkspace_fwd.h" #include "MantidAPI/CompositeFunction.h" @@ -12,7 +12,7 @@ namespace CustomInterfaces { namespace IDA { - class DLLExport ConvFit : public IDATab + class DLLExport ConvFit : public IndirectDataAnalysisTab { Q_OBJECT diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h index b75a04308c5082500b08408c84ed9864e4818681..f982c23ed3bdc7a03c253b25ddface858ad3bc72 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h @@ -3,7 +3,7 @@ #include "ui_Elwin.h" #include "MantidAPI/MatrixWorkspace_fwd.h" -#include "MantidQtCustomInterfaces/Indirect/IDATab.h" +#include "MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h" namespace MantidQt { @@ -11,7 +11,7 @@ namespace CustomInterfaces { namespace IDA { - class DLLExport Elwin : public IDATab + class DLLExport Elwin : public IndirectDataAnalysisTab { Q_OBJECT diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectCorrections.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectCorrections.ui index e8420b643d3ecb44db703a0ce744f198e1625153..fca2ec9288979f774e366a67d45499eafc06d3d4 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectCorrections.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectCorrections.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>850</width> + <width>700</width> <height>700</height> </rect> </property> @@ -16,7 +16,7 @@ <widget class="QWidget" name="centralwidget"> <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QTabWidget" name="twIDATabs"> + <widget class="QTabWidget" name="twTabs"> <property name="enabled"> <bool>true</bool> </property> @@ -141,7 +141,7 @@ </widget> </widget> <tabstops> - <tabstop>twIDATabs</tabstop> + <tabstop>twTabs</tabstop> <tabstop>pbHelp</tabstop> <tabstop>pbRun</tabstop> <tabstop>pbManageDirs</tabstop> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h index 16b42e12a4d4eeda76e821eb9033a50170f93f40..0d12c81a1f0f857051cb5dc803c8e06d10119283 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h @@ -36,20 +36,20 @@ namespace IDA static const unsigned int NUM_DECIMALS = 6; // Forward Declaration - class IDATab; + class IndirectDataAnalysisTab; /** * The IndirectDataAnalysis class is the main class that handles the interface and controls * its tabs. * - * Is a friend to the IDATab class. + * Is a friend to the IndirectDataAnalysisTab class. */ class IndirectDataAnalysis : public MantidQt::API::UserSubWindow { Q_OBJECT - /// Allow IDATab to have access. - friend class IDATab; + /// Allow IndirectDataAnalysisTab to have access. + friend class IndirectDataAnalysisTab; public: /// The name of the interface as registered into the factory @@ -96,7 +96,7 @@ namespace IDA Poco::NObserver<IndirectDataAnalysis, Mantid::Kernel::ConfigValChangeNotification> m_changeObserver; /// Map of unsigned int (TabChoice enum values) to tabs. - std::map<unsigned int, IDATab*> m_tabs; + std::map<unsigned int, IndirectDataAnalysisTab*> m_tabs; }; } // namespace IDA diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui index 239280eb8f07198a9fb29d70b6c481099994e940..ee4492af82d4add3dc7eaadb5459c52f8d238a8c 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>850</width> - <height>700</height> + <width>700</width> + <height>600</height> </rect> </property> <property name="windowTitle"> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h similarity index 81% rename from Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h rename to Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h index cdd86cc459279e5f279feed443ea028e83553fa2..bc1402ede91ddaf2ddacab57ef0c894725445845 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h @@ -46,13 +46,13 @@ namespace CustomInterfaces { namespace IDA { - class DLLExport IDATab : public IndirectTab + class DLLExport IndirectDataAnalysisTab : public IndirectTab { Q_OBJECT public: /// Constructor - IDATab(QWidget * parent = 0); + IndirectDataAnalysisTab(QWidget * parent = 0); /// Loads the tab's settings. void loadTabSettings(const QSettings & settings); @@ -64,11 +64,6 @@ namespace IDA protected: /// Function to run a string as python code void runPythonScript(const QString& pyInput); - /// Check the binning between two workspaces match - bool checkWorkspaceBinningMatches(Mantid::API::MatrixWorkspace_const_sptr left, - Mantid::API::MatrixWorkspace_const_sptr right); - /// Adds a unit conversion step to the algorithm queue - std::string addConvertUnitsStep(Mantid::API::MatrixWorkspace_sptr ws, const std::string & unitID, const std::string & suffix = "UNIT"); /// DoubleEditorFactory DoubleEditorFactory* m_dblEdFac; diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Iqt.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Iqt.h index 95fbf39837b272dbd5428729a59c3a9343ecfd7b..f88f38902ba1623b045ab9a884c0272a8523f05c 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Iqt.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Iqt.h @@ -2,7 +2,7 @@ #define MANTIDQTCUSTOMINTERFACESIDA_IQT_H_ #include "ui_Iqt.h" -#include "IDATab.h" +#include "IndirectDataAnalysisTab.h" namespace MantidQt { @@ -10,7 +10,7 @@ namespace CustomInterfaces { namespace IDA { - class DLLExport Iqt : public IDATab + class DLLExport Iqt : public IndirectDataAnalysisTab { Q_OBJECT diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IqtFit.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IqtFit.h index d6ec9d190a208578b65e3f0a17add80fd1c93bb4..b97c218dc8dfa11753229a92201512a0bf445cc8 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IqtFit.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IqtFit.h @@ -2,7 +2,7 @@ #define MANTIDQTCUSTOMINTERFACESIDA_IQTFIT_H_ #include "ui_IqtFit.h" -#include "IDATab.h" +#include "IndirectDataAnalysisTab.h" #include "MantidAPI/CompositeFunction.h" #include "MantidAPI/MatrixWorkspace_fwd.h" @@ -21,7 +21,7 @@ namespace CustomInterfaces { namespace IDA { - class DLLExport IqtFit : public IDATab + class DLLExport IqtFit : public IndirectDataAnalysisTab { Q_OBJECT diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h index d561a10ee3d63e6ec2fa0a53771fd88774a9a136..aea016307cda8f78143eecd01e7dd75212077159 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h @@ -2,7 +2,7 @@ #define MANTIDQTCUSTOMINTERFACESIDA_MSDFIT_H_ #include "ui_MSDFit.h" -#include "IDATab.h" +#include "IndirectDataAnalysisTab.h" namespace MantidQt { @@ -10,7 +10,7 @@ namespace CustomInterfaces { namespace IDA { - class DLLExport MSDFit : public IDATab + class DLLExport MSDFit : public IndirectDataAnalysisTab { Q_OBJECT diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp index 64fd9bcad1723a0ea1516d8ea8534d2c99c967ce..4d64f9a09be1b757859df468806500a9475d9e6a 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp @@ -28,7 +28,7 @@ namespace CustomInterfaces namespace IDA { ConvFit::ConvFit(QWidget * parent) : - IDATab(parent), + IndirectDataAnalysisTab(parent), m_stringManager(NULL), m_cfTree(NULL), m_fixedProps(), m_cfInputWS(), m_cfInputWSName(), diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp index 9e3c233044a3e9d9280a6b2a936b404bc7b7cf2c..c4548a75a1e2a8d52dc1008f3334989410d34087 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp @@ -22,7 +22,7 @@ namespace CustomInterfaces namespace IDA { Elwin::Elwin(QWidget * parent) : - IDATab(parent), + IndirectDataAnalysisTab(parent), m_elwTree(NULL) { m_uiForm.setupUi(parent); diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp deleted file mode 100644 index 6f9cd09fecb731e0ca795c808d882c30eac66db8..0000000000000000000000000000000000000000 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include "MantidQtCustomInterfaces/Indirect/IDATab.h" -#include "MantidAPI/MatrixWorkspace.h" -#include "MantidAPI/AnalysisDataService.h" -#include "boost/shared_ptr.hpp" - -#include <qwt_plot.h> -#include <qwt_plot_curve.h> -#include <QSettings> -#include <QString> - -using namespace Mantid::API; - -namespace MantidQt -{ -namespace CustomInterfaces -{ -namespace IDA -{ - /** - * Constructor. - * - * @param parent :: the parent widget (an IndirectDataAnalysis object). - */ - IDATab::IDATab(QWidget * parent) : IndirectTab(parent), - m_dblEdFac(NULL), m_blnEdFac(NULL), - m_parent(NULL) - { - m_parent = dynamic_cast<IndirectDataAnalysis*>(parent); - - // Create Editor Factories - m_dblEdFac = new DoubleEditorFactory(this); - m_blnEdFac = new QtCheckBoxFactory(this); - } - - - /** - * Loads the tab's settings. - * - * Calls overridden version of loadSettings() in child class. - * - * @param settings :: the QSettings object from which to load - */ - void IDATab::loadTabSettings(const QSettings & settings) - { - loadSettings(settings); - } - - - /** - * Slot that can be called when a user edits an input. - */ - void IDATab::inputChanged() - { - validate(); - } - - - /** - * Check that the binning between two workspaces matches. - * - * @param left :: left hand workspace for the equality operator - * @param right :: right hand workspace for the equality operator - * @return whether the binning matches - * @throws std::runtime_error if one of the workspaces is an invalid pointer - */ - bool IDATab::checkWorkspaceBinningMatches(MatrixWorkspace_const_sptr left, MatrixWorkspace_const_sptr right) - { - if (left && right) //check the workspaces actually point to something first - { - auto leftX = left->readX(0); - auto rightX = right->readX(0); - return std::equal(leftX.begin(), leftX.end(), rightX.begin()); - } - else - { - throw std::runtime_error("IDATab: One of the operands is an invalid MatrixWorkspace pointer"); - } - } - - - /** - * Adds a unit converstion step to the batch algorithm queue. - * - * @param ws Pointer to the workspace to convert - * @param unitID ID of unit to convert to - * @param suffix Suffix to append to output workspace name - * @return Name of output workspace - */ - std::string IDATab::addConvertUnitsStep(MatrixWorkspace_sptr ws, const std::string & unitID, const std::string & suffix) - { - std::string outputName = ws->name(); - - if(suffix != "UNIT") - outputName += suffix; - else - outputName += "_" + unitID; - - - IAlgorithm_sptr convertAlg = AlgorithmManager::Instance().create("ConvertUnits"); - convertAlg->initialize(); - - convertAlg->setProperty("InputWorkspace", ws->name()); - convertAlg->setProperty("OutputWorkspace", outputName); - convertAlg->setProperty("Target", unitID); - - std::string eMode = getEMode(ws); - convertAlg->setProperty("EMode", eMode); - - if(eMode == "Indirect") - convertAlg->setProperty("EFixed", getEFixed(ws)); - - m_batchAlgoRunner->addAlgorithm(convertAlg); - - return outputName; - } - -} // namespace IDA -} // namespace CustomInterfaces -} // namespace MantidQt diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectCorrections.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectCorrections.cpp index c719db2054aec567ef7aa1233a920aadaae1334b..ede5c518d03d90abb75c9b7a4bda8b44e75d5f89 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectCorrections.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectCorrections.cpp @@ -3,7 +3,7 @@ //---------------------- #include "MantidQtCustomInterfaces/Indirect/IndirectCorrections.h" -// IDATab subclasses: +// IndirectDataAnalysisTab subclasses: #include "MantidQtCustomInterfaces/Indirect/Elwin.h" #include "MantidQtCustomInterfaces/Indirect/MSDFit.h" #include "MantidQtCustomInterfaces/Indirect/Iqt.h" @@ -44,9 +44,9 @@ namespace IDA // Allows us to get a handle on a tab using an enum, for example "m_tabs[ELWIN]". // All tabs MUST appear here to be shown in interface. // We make the assumption that each map key corresponds to the order in which the tabs appear. - m_tabs.insert(std::make_pair(CALC_CORR, new CalcCorr(m_uiForm.twIDATabs->widget(CALC_CORR)))); - m_tabs.insert(std::make_pair(APPLY_CORR, new ApplyCorr(m_uiForm.twIDATabs->widget(APPLY_CORR)))); - m_tabs.insert(std::make_pair(ABSORPTION_CORRECTIONS, new AbsorptionCorrections(m_uiForm.twIDATabs->widget(ABSORPTION_CORRECTIONS)))); + m_tabs.insert(std::make_pair(CALC_CORR, new CalcCorr(m_uiForm.twTabs->widget(CALC_CORR)))); + m_tabs.insert(std::make_pair(APPLY_CORR, new ApplyCorr(m_uiForm.twTabs->widget(APPLY_CORR)))); + m_tabs.insert(std::make_pair(ABSORPTION_CORRECTIONS, new AbsorptionCorrections(m_uiForm.twTabs->widget(ABSORPTION_CORRECTIONS)))); } /** @@ -127,7 +127,7 @@ namespace IDA */ void IndirectCorrections::run() { - const unsigned int currentTab = m_uiForm.twIDATabs->currentIndex(); + const unsigned int currentTab = m_uiForm.twTabs->currentIndex(); m_tabs[currentTab]->runTab(); } @@ -154,7 +154,7 @@ namespace IDA */ void IndirectCorrections::exportTabPython() { - unsigned int currentTab = m_uiForm.twIDATabs->currentIndex(); + unsigned int currentTab = m_uiForm.twTabs->currentIndex(); m_tabs[currentTab]->exportPythonScript(); } diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysis.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysis.cpp index 7517574a98efdf580d92bcdb21d2d096d15eefab..93d75ccec5a6463f7c3a1b31699157a38f30ced0 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysis.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysis.cpp @@ -3,7 +3,7 @@ //---------------------- #include "MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.h" -// IDATab subclasses: +// IndirectDataAnalysisTab subclasses: #include "MantidQtCustomInterfaces/Indirect/Elwin.h" #include "MantidQtCustomInterfaces/Indirect/MSDFit.h" #include "MantidQtCustomInterfaces/Indirect/Iqt.h" diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysisTab.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysisTab.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa5f7a069f69ec64eebd32fbc1385697cce6e721 --- /dev/null +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDataAnalysisTab.cpp @@ -0,0 +1,59 @@ +#include "MantidQtCustomInterfaces/Indirect/IndirectDataAnalysisTab.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/AnalysisDataService.h" +#include "boost/shared_ptr.hpp" + +#include <qwt_plot.h> +#include <qwt_plot_curve.h> +#include <QSettings> +#include <QString> + +using namespace Mantid::API; + +namespace MantidQt +{ +namespace CustomInterfaces +{ +namespace IDA +{ + /** + * Constructor. + * + * @param parent :: the parent widget (an IndirectDataAnalysis object). + */ + IndirectDataAnalysisTab::IndirectDataAnalysisTab(QWidget * parent) : IndirectTab(parent), + m_dblEdFac(NULL), m_blnEdFac(NULL), + m_parent(NULL) + { + m_parent = dynamic_cast<IndirectDataAnalysis*>(parent); + + // Create Editor Factories + m_dblEdFac = new DoubleEditorFactory(this); + m_blnEdFac = new QtCheckBoxFactory(this); + } + + + /** + * Loads the tab's settings. + * + * Calls overridden version of loadSettings() in child class. + * + * @param settings :: the QSettings object from which to load + */ + void IndirectDataAnalysisTab::loadTabSettings(const QSettings & settings) + { + loadSettings(settings); + } + + + /** + * Slot that can be called when a user edits an input. + */ + void IndirectDataAnalysisTab::inputChanged() + { + validate(); + } + +} // namespace IDA +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Iqt.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Iqt.cpp index 40f013b7ce2d09126e40174bae83aaea38b4f6e9..2aa924acc9c0b65ebc42f7ffb7721f31385875e2 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Iqt.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Iqt.cpp @@ -24,7 +24,7 @@ namespace CustomInterfaces { namespace IDA { - Iqt::Iqt(QWidget * parent) : IDATab(parent), + Iqt::Iqt(QWidget * parent) : IndirectDataAnalysisTab(parent), m_furTree(NULL), m_furyResFileType() { diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IqtFit.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IqtFit.cpp index fb9e16d6f6dc5923f89ef04d90264af0ebe87a69..73551bd016c94b0fe116358e3a8051c4b20dd6a6 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IqtFit.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IqtFit.cpp @@ -29,7 +29,7 @@ namespace CustomInterfaces namespace IDA { IqtFit::IqtFit(QWidget * parent) : - IDATab(parent), + IndirectDataAnalysisTab(parent), m_stringManager(NULL), m_ffTree(NULL), m_ffRangeManager(NULL), m_fixedProps(), diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp index a2a31c7c5b7c85c11b4a678a29f632755f930d91..9820083fd191a7261e2e40d1344e33f062bd87de 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp @@ -22,7 +22,7 @@ namespace CustomInterfaces { namespace IDA { - MSDFit::MSDFit(QWidget * parent) : IDATab(parent), + MSDFit::MSDFit(QWidget * parent) : IndirectDataAnalysisTab(parent), m_currentWsName(""), m_msdTree(NULL) { m_uiForm.setupUi(parent);