ALFCustomInstrumentPresenter.h 1.65 KB
Newer Older
1
2
3
4
5
6
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
//     NScD Oak Ridge National Laboratory, European Spallation Source
//     & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8

9
#include "MantidQtWidgets/InstrumentView/BaseCustomInstrumentPresenter.h"
10
#include "MantidQtWidgets/InstrumentView/PlotFitAnalysisPanePresenter.h"
11

12
13
#include "ALFCustomInstrumentModel.h"
#include "ALFCustomInstrumentView.h"
14
#include "DllConfig.h"
15
16
17
#include "MantidQtWidgets/Common/ObserverPattern.h"

#include <string>
18
19

namespace MantidQt {
20
namespace CustomInterfaces {
21

Anthony Lim's avatar
Anthony Lim committed
22
class  MANTIDQT_DIRECT_DLL ALFCustomInstrumentPresenter
23
    : public MantidWidgets::BaseCustomInstrumentPresenter {
24
  Q_OBJECT
25
26

public:
27
28
29
  ALFCustomInstrumentPresenter(
      ALFCustomInstrumentView *view, ALFCustomInstrumentModel *model,
      MantidWidgets::PlotFitAnalysisPanePresenter *analysisPane);
30
  ~ALFCustomInstrumentPresenter() {
31
32
33
    delete m_extractSingleTubeObserver;
    delete m_averageTubeObserver;
    delete m_analysisPane;
Anthony Lim's avatar
Anthony Lim committed
34
35
    delete m_model;
  };
36

37
38
  void addInstrument() override;

39
40
protected:
  void loadSideEffects() override;
41

Anthony Lim's avatar
Anthony Lim committed
42
  std::pair<instrumentSetUp, instrumentObserverOptions> setupALFInstrument();
43
public:
44
  void setUpInstrumentAnalysisSplitter() override;
45

46
47
48
  void extractSingleTube();
  void averageTube();

49
private:
50
51
  ALFCustomInstrumentView *m_view;
  ALFCustomInstrumentModel *m_model;
52
  MantidWidgets::PlotFitAnalysisPanePresenter *m_analysisPane;
53
54
  VoidObserver *m_extractSingleTubeObserver;
  VoidObserver *m_averageTubeObserver;
55
56
57
};
} // namespace CustomInterfaces
} // namespace MantidQt