Skip to content
Snippets Groups Projects
Commit d1cffd73 authored by Arturs Bekasovs's avatar Arturs Bekasovs
Browse files

Refs #8700. Namespace clean-up.

parent 11d6558e
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,8 @@ namespace MantidQt ...@@ -42,6 +42,8 @@ namespace MantidQt
namespace MantidWidgets namespace MantidWidgets
{ {
using namespace Mantid::API;
/** /**
* Constructor * Constructor
* @param parent :: The parent widget - must be an ApplicationWindow * @param parent :: The parent widget - must be an ApplicationWindow
...@@ -199,7 +201,7 @@ void MuonFitPropertyBrowser::doubleChanged(QtProperty* prop) ...@@ -199,7 +201,7 @@ void MuonFitPropertyBrowser::doubleChanged(QtProperty* prop)
*/ */
void MuonFitPropertyBrowser::populateFunctionNames() void MuonFitPropertyBrowser::populateFunctionNames()
{ {
const std::vector<std::string> names = Mantid::API::FunctionFactory::Instance().getKeys(); const std::vector<std::string> names = FunctionFactory::Instance().getKeys();
m_registeredFunctions.clear(); m_registeredFunctions.clear();
m_registeredPeaks.clear(); m_registeredPeaks.clear();
m_registeredBackgrounds.clear(); m_registeredBackgrounds.clear();
...@@ -209,7 +211,7 @@ void MuonFitPropertyBrowser::populateFunctionNames() ...@@ -209,7 +211,7 @@ void MuonFitPropertyBrowser::populateFunctionNames()
QString qfnName = QString::fromStdString(fnName); QString qfnName = QString::fromStdString(fnName);
if (qfnName == "MultiBG") continue; if (qfnName == "MultiBG") continue;
auto f = Mantid::API::FunctionFactory::Instance().createFunction(fnName); auto f = FunctionFactory::Instance().createFunction(fnName);
const std::vector<std::string> categories = f->categories(); const std::vector<std::string> categories = f->categories();
bool muon = false; bool muon = false;
for (size_t j=0; j<categories.size(); ++j) for (size_t j=0; j<categories.size(); ++j)
...@@ -221,13 +223,13 @@ void MuonFitPropertyBrowser::populateFunctionNames() ...@@ -221,13 +223,13 @@ void MuonFitPropertyBrowser::populateFunctionNames()
{ {
m_registeredFunctions << qfnName; m_registeredFunctions << qfnName;
} }
Mantid::API::IPeakFunction* pf = dynamic_cast<Mantid::API::IPeakFunction*>(f.get()); IPeakFunction* pf = dynamic_cast<IPeakFunction*>(f.get());
//Mantid::API::CompositeFunction* cf = dynamic_cast<Mantid::API::CompositeFunction*>(f.get()); //CompositeFunction* cf = dynamic_cast<CompositeFunction*>(f.get());
if (pf) if (pf)
{ {
m_registeredPeaks << qfnName; m_registeredPeaks << qfnName;
} }
else if (dynamic_cast<Mantid::API::IBackgroundFunction*>(f.get())) else if (dynamic_cast<IBackgroundFunction*>(f.get()))
{ {
m_registeredBackgrounds << qfnName; m_registeredBackgrounds << qfnName;
} }
...@@ -274,20 +276,20 @@ void MuonFitPropertyBrowser::fit() ...@@ -274,20 +276,20 @@ void MuonFitPropertyBrowser::fit()
funStr = (m_compositeFunction->getFunction(0))->asString(); funStr = (m_compositeFunction->getFunction(0))->asString();
} }
if ( Mantid::API::AnalysisDataService::Instance().doesExist(wsName+"_NormalisedCovarianceMatrix")) if ( AnalysisDataService::Instance().doesExist(wsName+"_NormalisedCovarianceMatrix"))
{ {
Mantid::API::FrameworkManager::Instance().deleteWorkspace(wsName+"_NormalisedCovarianceMatrix"); FrameworkManager::Instance().deleteWorkspace(wsName+"_NormalisedCovarianceMatrix");
} }
if ( Mantid::API::AnalysisDataService::Instance().doesExist(wsName+"_Parameters")) if ( AnalysisDataService::Instance().doesExist(wsName+"_Parameters"))
{ {
Mantid::API::FrameworkManager::Instance().deleteWorkspace(wsName+"_Parameters"); FrameworkManager::Instance().deleteWorkspace(wsName+"_Parameters");
} }
if ( Mantid::API::AnalysisDataService::Instance().doesExist(wsName+"_Workspace")) if ( AnalysisDataService::Instance().doesExist(wsName+"_Workspace"))
{ {
Mantid::API::FrameworkManager::Instance().deleteWorkspace(wsName+"_Workspace"); FrameworkManager::Instance().deleteWorkspace(wsName+"_Workspace");
} }
Mantid::API::IAlgorithm_sptr alg = Mantid::API::AlgorithmManager::Instance().create("Fit"); IAlgorithm_sptr alg = AlgorithmManager::Instance().create("Fit");
alg->initialize(); alg->initialize();
alg->setPropertyValue("Function",funStr); alg->setPropertyValue("Function",funStr);
if (rawData()) if (rawData())
...@@ -332,13 +334,13 @@ void MuonFitPropertyBrowser::showEvent(QShowEvent* e) ...@@ -332,13 +334,13 @@ void MuonFitPropertyBrowser::showEvent(QShowEvent* e)
* MatrixWorkspaces same size and that it isn't the generated raw file. * MatrixWorkspaces same size and that it isn't the generated raw file.
* @param ws :: The workspace * @param ws :: The workspace
*/ */
bool MuonFitPropertyBrowser::isWorkspaceValid(Mantid::API::Workspace_sptr ws)const bool MuonFitPropertyBrowser::isWorkspaceValid(Workspace_sptr ws)const
{ {
QString workspaceName(QString::fromStdString(ws->name() ) ); QString workspaceName(QString::fromStdString(ws->name() ) );
if ( (workspaceName.contains("_Raw") ) || (workspaceName.contains("MuonAnalysis") ) ) if ( (workspaceName.contains("_Raw") ) || (workspaceName.contains("MuonAnalysis") ) )
return false; return false;
if (dynamic_cast<Mantid::API::MatrixWorkspace*>(ws.get()) != 0) if (dynamic_cast<MatrixWorkspace*>(ws.get()) != 0)
return true; return true;
else else
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment