ALFCustomInstrumentPresenter.h 1.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
// 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 +
#ifndef MANTIDQT_CUSTOMINTERFACES_ALFVIEWPRESENTER_H_
#define MANTIDQT_CUSTOMINTERFACES_ALFVIEWPRESENTER_H_

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
  ALFCustomInstrumentPresenter(ALFCustomInstrumentView *view, ALFCustomInstrumentModel *model,
29
                    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

44
private:
45
  void setUpInstrumentAnalysisSplitter() override;
46

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

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
58
59

#endif /* MANTIDQT_CUSTOMINTERFACES_ALFVIEWPRESENTER_H_ */