Commit 5f008949 authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #11868. Complete move

parent eb707112
#ifndef MANTID_SLICEVIEWER_CONCRETEPEAKSPRESENTER_H_
#define MANTID_SLICEVIEWER_CONCRETEPEAKSPRESENTER_H_
#include "MantidAPI/PeakTransform.h"
#include "MantidAPI/PeakTransformFactory.h"
#include "MantidGeometry/Crystal/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransformFactory.h"
#include "MantidQtSliceViewer/PeaksPresenter.h"
#include "MantidQtSliceViewer/PeakOverlayViewFactory.h"
#include "MantidAPI/MDGeometry.h"
......@@ -31,7 +31,7 @@ public:
PeakOverlayViewFactory_sptr viewFactory,
Mantid::API::IPeaksWorkspace_sptr peaksWS,
boost::shared_ptr<Mantid::API::MDGeometry> mdWS,
Mantid::API::PeakTransformFactory_sptr transformFactory);
Mantid::Geometry::PeakTransformFactory_sptr transformFactory);
void reInitialize(Mantid::API::IPeaksWorkspace_sptr peaksWS);
virtual ~ConcretePeaksPresenter();
virtual void update();
......@@ -66,9 +66,9 @@ private:
/// Peaks workspace.
boost::shared_ptr<const Mantid::API::IPeaksWorkspace> m_peaksWS;
/// Transform factory
boost::shared_ptr<Mantid::API::PeakTransformFactory> m_transformFactory;
boost::shared_ptr<Mantid::Geometry::PeakTransformFactory> m_transformFactory;
/// Peak transformer
Mantid::API::PeakTransform_sptr m_transform;
Mantid::Geometry::PeakTransform_sptr m_transform;
/// current slicing point.
PeakBoundingBox m_slicePoint;
/// Viewable Peaks
......
......@@ -4,7 +4,7 @@
#include "MantidKernel/System.h"
#include <string>
#include <vector>
#include "MantidAPI/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransform.h"
namespace MantidQt
{
......@@ -117,7 +117,7 @@ namespace MantidQt
/// Serialize as set of comma separated values
std::string toExtentsString() const;
/// Transform the box.
void transformBox(Mantid::API::PeakTransform_sptr transform);
void transformBox(Mantid::Geometry::PeakTransform_sptr transform);
/// Make a new box based on the slice
PeakBoundingBox makeSliceBox(const double& sliceDelta) const;
};
......
......@@ -61,7 +61,7 @@ namespace SliceViewer
/// Update the view.
virtual void updateView();
/// Move the position of the peak, by using a different configuration of the existing origin indexes.
void movePosition(Mantid::API::PeakTransform_sptr peakTransform);
void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform);
/// Change foreground colour
virtual void changeForegroundColour(const QColor);
/// Change background colour
......
......@@ -38,9 +38,9 @@ namespace MantidQt
class DLLExport PeakOverlayMultiCrossFactory : public PeakOverlayViewFactoryBase
{
public:
PeakOverlayMultiCrossFactory(boost::shared_ptr<Mantid::API::MDGeometry> mdWS, Mantid::API::PeakTransform_const_sptr transform, Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const size_t colourNumber=0);
PeakOverlayMultiCrossFactory(boost::shared_ptr<Mantid::API::MDGeometry> mdWS, Mantid::Geometry::PeakTransform_const_sptr transform, Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const size_t colourNumber=0);
virtual ~PeakOverlayMultiCrossFactory();
virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::API::PeakTransform_const_sptr transform) const;
virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::Geometry::PeakTransform_const_sptr transform) const;
virtual int FOM() const;
virtual void swapPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace>& peaksWS);
private:
......
......@@ -61,7 +61,7 @@ namespace SliceViewer
/// Update the view.
virtual void updateView();
/// Move the position of the peak, by using a different configuration of the existing origin indexes.
void movePosition(Mantid::API::PeakTransform_sptr peakTransform);
void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform);
/// Change foreground colour
virtual void changeForegroundColour(const QColor);
/// Change background colour
......
......@@ -44,7 +44,7 @@ namespace MantidQt
public:
PeakOverlayMultiSphereFactory(Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const size_t colourNumber=0);
virtual ~PeakOverlayMultiSphereFactory();
virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::API::PeakTransform_const_sptr transform) const;
virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::Geometry::PeakTransform_const_sptr transform) const;
virtual int FOM() const;
virtual void swapPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace>& peaksWS);
};
......
......@@ -3,7 +3,7 @@
#include "MantidKernel/System.h"
#include "MantidKernel/V2D.h"
#include "MantidAPI/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransform.h"
#include "MantidQtSliceViewer/PeakPalette.h"
#include "MantidQtSliceViewer/PeakBoundingBox.h"
#include <QPointF>
......@@ -49,7 +49,7 @@ namespace MantidQt
/// Show the view.
virtual void showView() = 0;
/// Move the peak overlay to a new position.
virtual void movePosition(Mantid::API::PeakTransform_sptr peakTransform) = 0;
virtual void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform) = 0;
/// Change foreground colour
virtual void changeForegroundColour(const QColor) = 0;
/// Change background colour
......
......@@ -3,16 +3,18 @@
#include "MantidKernel/System.h"
#include "MantidKernel/V3D.h"
#include "MantidAPI/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransform.h"
#include "MantidQtSliceViewer/PeakOverlayView.h"
#include <boost/shared_ptr.hpp>
namespace Mantid
{
namespace API
{
namespace Geometry {
// Forward dec.
class IPeak;
}
namespace API {
// Forward dec.
class IPeaksWorkspace;
}
}
......@@ -49,7 +51,7 @@ namespace MantidQt
{
public:
/// Create a peak view from the index of a peak in the peaks workspace
virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::API::PeakTransform_const_sptr transform) const = 0;
virtual boost::shared_ptr<PeakOverlayView> createView(Mantid::Geometry::PeakTransform_const_sptr transform) const = 0;
/// Destructor
virtual ~PeakOverlayViewFactory()
{
......
......@@ -10,12 +10,15 @@
namespace Mantid
{
namespace API
{
namespace Geometry {
// Forward dec.
class IPeaksWorkspace;
class PeakTransform;
}
namespace API{
// Forward dec.
class IPeaksWorkspace;
}
}
namespace MantidQt
......
......@@ -4,7 +4,7 @@
#include "MantidKernel/System.h"
#include "MantidKernel/V3D.h"
#include "MantidKernel/ClassMacros.h"
#include "MantidAPI/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransform.h"
#include "MantidQtSliceViewer/PeakOverlayView.h"
namespace MantidQt
......@@ -37,7 +37,7 @@ namespace MantidQt
/// Setter for the slice point.
void setSlicePoint(const double&);
/// Transform the coordinates.
void movePosition(Mantid::API::PeakTransform_sptr peakTransform);
void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform);
/// Draw
CrossPeakPrimitives draw(const double& windowHeight, const double& windowWidth) const;
/// Get the bounding box.
......
......@@ -4,7 +4,7 @@
#include "MantidKernel/System.h"
#include "MantidKernel/V3D.h"
#include "MantidKernel/ClassMacros.h"
#include "MantidAPI/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransform.h"
#include "MantidQtSliceViewer/PeakOverlayView.h"
#include <boost/optional.hpp>
......@@ -44,7 +44,7 @@ namespace MantidQt
/// Setter for the slice point.
void setSlicePoint(const double&);
/// Transform the coordinates.
void movePosition(Mantid::API::PeakTransform_sptr peakTransform);
void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform);
/// Draw
SphericalPeakPrimitives draw(const double& windowHeight, const double& windowWidth, const double& viewWidth, const double& viewHeight) const;
......
......@@ -10,11 +10,13 @@
// Forward declarations
namespace Mantid
{
namespace API
{
class IPeaksWorkspace;
namespace Geometry {
class IPeak;
}
namespace API {
class IPeaksWorkspace;
}
}
namespace MantidQt
......@@ -164,7 +166,7 @@ namespace MantidQt
mutable int m_dataCachePeakIndex;
QString findColumnName(const int colIndex) const;
void updateDataCache(const Mantid::API::IPeak& peak, const int row) const;
void updateDataCache(const Mantid::Geometry::IPeak& peak, const int row) const;
/// Collection of data for viewing.
boost::shared_ptr<const Mantid::API::IPeaksWorkspace> m_peaksWS;
......
......@@ -6,7 +6,7 @@
#include "DllOption.h"
#include "MantidAPI/IMDIterator.h"
#include "MantidAPI/IMDWorkspace.h"
#include "MantidAPI/PeakTransformSelector.h"
#include "MantidGeometry/Crystal/PeakTransformSelector.h"
#include "MantidGeometry/MDGeometry/MDHistoDimension.h"
#include "MantidKernel/Logger.h"
#include "MantidKernel/VMD.h"
......@@ -353,7 +353,7 @@ private:
DimensionSliceWidget* m_peaksSliderWidget;
/// Object for choosing a PeakTransformFactory based on the workspace type.
Mantid::API::PeakTransformSelector m_peakTransformSelector;
Mantid::Geometry::PeakTransformSelector m_peakTransformSelector;
static const QString NoNormalizationKey;
static const QString VolumeNormalizationKey;
......
......@@ -2,7 +2,7 @@
#include "MantidAPI/IPeaksWorkspace.h"
#include <stdexcept>
using Mantid::API::PeakTransform_sptr;
using Mantid::Geometry::PeakTransform_sptr;
namespace MantidQt {
namespace SliceViewer {
......
......@@ -2,7 +2,7 @@
#include "MantidQtSliceViewer/UpdateableOnDemand.h"
#include "MantidQtSliceViewer/ZoomableOnDemand.h"
#include "MantidAPI/IPeaksWorkspace.h"
#include "MantidAPI/IPeak.h"
#include "MantidGeometry/Crystal/IPeak.h"
#include "MantidAPI/IMDWorkspace.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/IAlgorithm.h"
......@@ -114,7 +114,7 @@ void ConcretePeaksPresenter::checkWorkspaceCompatibilities(
ConcretePeaksPresenter::ConcretePeaksPresenter(
PeakOverlayViewFactory_sptr viewFactory, IPeaksWorkspace_sptr peaksWS,
boost::shared_ptr<MDGeometry> mdWS,
Mantid::API::PeakTransformFactory_sptr transformFactory)
Mantid::Geometry::PeakTransformFactory_sptr transformFactory)
: m_viewFactory(viewFactory), m_peaksWS(peaksWS),
m_transformFactory(transformFactory),
m_transform(transformFactory->createDefaultTransform()), m_slicePoint(),
......@@ -263,7 +263,7 @@ bool ConcretePeaksPresenter::configureMappingTransform() {
m_transform = temp;
showAll();
transformSucceeded = true;
} catch (PeakTransformException &) {
} catch (Mantid::Geometry::PeakTransformException &) {
hideAll();
}
return transformSucceeded;
......
......@@ -233,7 +233,7 @@ namespace MantidQt
* Transform the box. Permanent change the box left, right, top, bottom, front and back according to the transform.
* @param transform : Transform to use.
*/
void PeakBoundingBox::transformBox(Mantid::API::PeakTransform_sptr transform)
void PeakBoundingBox::transformBox(Mantid::Geometry::PeakTransform_sptr transform)
{
using Mantid::Kernel::V3D;
// Front bottom left
......
......@@ -7,7 +7,7 @@
#include <QMouseEvent>
using namespace Mantid::Kernel;
using namespace Mantid::API;
using namespace Mantid::Geometry;
namespace MantidQt
......
......@@ -2,7 +2,7 @@
#include "MantidQtSliceViewer/PeakOverlayMultiCross.h"
#include "MantidQtSliceViewer/PhysicalCrossPeak.h"
#include "MantidKernel/V3D.h"
#include "MantidAPI/IPeak.h"
#include "MantidGeometry/Crystal/IPeak.h"
#include "MantidAPI/IMDWorkspace.h"
#include "MantidAPI/IMDEventWorkspace.h"
#include "MantidAPI/IMDHistoWorkspace.h"
......
......@@ -7,7 +7,7 @@
#include <QMouseEvent>
using namespace Mantid::Kernel;
using namespace Mantid::API;
using namespace Mantid::Geometry;
namespace MantidQt
{
......
......@@ -46,13 +46,13 @@ namespace MantidQt
}
}
boost::shared_ptr<PeakOverlayView> PeakOverlayMultiSphereFactory::createView(Mantid::API::PeakTransform_const_sptr transform) const
boost::shared_ptr<PeakOverlayView> PeakOverlayMultiSphereFactory::createView(Mantid::Geometry::PeakTransform_const_sptr transform) const
{
// Construct all physical peaks
VecPhysicalSphericalPeak physicalPeaks(m_peaksWS->rowCount());
for(size_t i = 0; i < physicalPeaks.size(); ++i)
{
const IPeak& peak = m_peaksWS->getPeak(static_cast<int>(i));
const Mantid::Geometry::IPeak& peak = m_peaksWS->getPeak(static_cast<int>(i));
auto position = transform->transformPeak(peak);
physicalPeaks[i] = boost::make_shared<PhysicalSphericalPeak>(position, m_peakRadius[i], m_backgroundInnerRadius[i], m_backgroundOuterRadius[i]);
}
......
Supports Markdown
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