ALFCustomInstrumentPresenter.h 1.83 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
8
#ifndef MANTIDQT_CUSTOMINTERFACES_ALFCUSTOMINSTRUMENTPRESENTER_H_
#define MANTIDQT_CUSTOMINTERFACES_ALFCUSTOMINSTRUMENTPRESENTER_H_
9

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

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

#include <string>
19
20

namespace MantidQt {
21
namespace CustomInterfaces {
22

23
class MANTIDQT_DIRECT_DLL ALFCustomInstrumentPresenter
24
    : public MantidWidgets::BaseCustomInstrumentPresenter {
25
  Q_OBJECT
26
27

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

38
39
  void addInstrument() override;

40
41
protected:
  void loadSideEffects() override;
42

Anthony Lim's avatar
Anthony Lim committed
43
  std::pair<instrumentSetUp, instrumentObserverOptions> setupALFInstrument();
44

45
private:
46
  void setUpInstrumentAnalysisSplitter() override;
47

48
49
50
  void extractSingleTube();
  void averageTube();

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

60
#endif /* MANTIDQT_CUSTOMINTERFACES_ALFCUSTOMINSTRUMENTPRESENTER_H_ */