Commit 96c1c045 authored by Anthony Lim's avatar Anthony Lim
Browse files

refs #26544 ALFView redhat compiler error fixes

parent e5f34daf
......@@ -122,7 +122,7 @@ void ALFView_model::storeSingleTube(const std::string &name) {
AnalysisDataService::Instance().remove(CURVES);
}
std::string ALFView_model::WSName() {
const std::string name = m_instrumentName + std::to_string(getCurrentRun());
std::string name = m_instrumentName + std::to_string(getCurrentRun());
return EXTRACTEDWS + name;
}
......
......@@ -21,7 +21,7 @@ class ALFView_model : public BaseInstrumentModel {
public:
ALFView_model();
~ALFView_model(){};
virtual ~ALFView_model(){};
std::pair<int, std::string> loadData(const std::string &name) override;
std::map<std::string, bool> isDataValid();
void transformData();
......
......@@ -94,12 +94,14 @@ ALFView_presenter::setupALFInstrument() {
void ALFView_presenter::extractSingleTube() {
m_model->extractSingleTube();
m_analysisPane->addSpectrum(m_model->WSName());
const std::string WSName = m_model->WSName();
m_analysisPane->addSpectrum(WSName);
}
void ALFView_presenter::averageTube() {
m_model->averageTube();
m_analysisPane->addSpectrum(m_model->WSName());
const std::string WSName = m_model->WSName();
m_analysisPane->addSpectrum(WSName);
}
} // namespace CustomInterfaces
......
......@@ -30,7 +30,7 @@ void ALFView_view::setUpInstrument(
m_extractSingleTubeObservable = new Observable();
m_averageTubeObservable = new Observable();
auto instrumentWidget = new MantidWidgets::InstrumentWidget("ALFData");
auto instrumentWidget = new MantidWidgets::InstrumentWidget(QString::fromStdString(fileName));
instrumentWidget->removeTab("Instrument");
instrumentWidget->removeTab("Draw");
instrumentWidget->hideHelp();
......
......@@ -17,8 +17,8 @@ namespace CustomInterfaces {
BaseInstrumentPresenter::BaseInstrumentPresenter(BaseInstrumentView *view,
BaseInstrumentModel *model,
QWidget *analysisPaneView)
: m_view(view), m_model(model), m_analysisPaneView(analysisPaneView),
m_currentRun(0), m_currentFile(""), m_loadRunObserver(nullptr) {
: m_view(view), m_model(model),
m_currentRun(0), m_currentFile(""), m_loadRunObserver(nullptr), m_analysisPaneView(analysisPaneView) {
m_loadRunObserver = new VoidObserver();
m_model->loadEmptyInstrument();
}
......
......@@ -45,7 +45,9 @@ public:
setUpInstrument(const std::string &fileName,
std::vector<std::function<bool(std::map<std::string, bool>)>>
&instrument);
virtual void addObserver(std::tuple<std::string, Observer *> &listener){};
virtual void addObserver(std::tuple<std::string, Observer *> &listener) {
void(*listener);
};
void setupInstrumentAnalysisSplitters(QWidget *analysis);
void setupHelp();
public slots:
......
......@@ -49,7 +49,7 @@ void PlotFitAnalysisPanePresenter::addFunction(
m_view->addFunction(func);
}
void PlotFitAnalysisPanePresenter::addSpectrum(std::string &wsName) {
void PlotFitAnalysisPanePresenter::addSpectrum(const std::string &wsName) {
m_currentName = wsName;
m_view->addSpectrum(wsName);
}
......
......@@ -30,7 +30,7 @@ public:
std::string getCurrentWS() { return m_currentName; };
void clearCurrentWS() { m_currentName = ""; };
void doFit();
void addSpectrum(std::string &wsName);
void addSpectrum(const std::string &wsName);
void addFunction(Mantid::API::IFunction_sptr func);
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment