PeakOverlayViewFactory.h 2.48 KB
Newer Older
1
2
3
4
#ifndef MANTID_SLICEVIEWER_PEAKOVERLAY_VIEW_FACTORY_H_
#define MANTID_SLICEVIEWER_PEAKOVERLAY_VIEW_FACTORY_H_

#include "MantidKernel/System.h"
Owen Arnold's avatar
Owen Arnold committed
5
#include "MantidKernel/V3D.h"
Owen Arnold's avatar
Owen Arnold committed
6
#include "MantidGeometry/Crystal/PeakTransform.h"
7
#include "MantidQtSliceViewer/PeakOverlayView.h"
8
9
10
11
#include <boost/shared_ptr.hpp>

namespace Mantid
{
Owen Arnold's avatar
Owen Arnold committed
12
  namespace Geometry {
13
14
    // Forward dec.
    class IPeak;
Owen Arnold's avatar
Owen Arnold committed
15
16
17
  }
  namespace API {
    // Forward dec.
18
    class IPeaksWorkspace;
19
20
  }
}
21
22
23
24
25
26
27
28
29

namespace MantidQt
{
  namespace SliceViewer
  {
    /** Abstract view factory. For creating types of IPeakOverlay.
    
    @date 2012-08-24

30
    Copyright &copy; 2011 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

    This file is part of Mantid.

    Mantid is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    Mantid is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

47
    File change history is stored at: <https://github.com/mantidproject/mantid>
48
49
50
51
52
    Code Documentation is available at: <http://doxygen.mantidproject.org>
  */
    class DLLExport PeakOverlayViewFactory
    {
    public:
53
      /// Create a peak view from the index of a peak in the peaks workspace
Owen Arnold's avatar
Owen Arnold committed
54
      virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::Geometry::PeakTransform_const_sptr transform) const = 0;
55
56
57
58
      /// Destructor
      virtual ~PeakOverlayViewFactory()
      {
      }
Owen Arnold's avatar
Owen Arnold committed
59
60
61
62
      /// Get the plot x-axis label
      virtual std::string getPlotXLabel() const = 0;
      /// Get the plot y-axis label
      virtual std::string getPlotYLabel() const = 0;
Owen Arnold's avatar
Owen Arnold committed
63
64
      /// Get the Figure Of Merit for this factory
      virtual int FOM() const = 0;
65
66
      /// Same factory settings for a different peaks workspace
      virtual void swapPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace>& peaksWS) = 0;
67
    };
68
69
70

    /// Factory Shared Pointer typedef.
    typedef boost::shared_ptr<PeakOverlayViewFactory> PeakOverlayViewFactory_sptr;
71
72
73
  }
}

74

75
#endif /* MANTID_SLICEVIEWER_PEAKOVERLAY_VIEW_FACTORY_H_ */