Skip to content
Snippets Groups Projects
Commit 807338b8 authored by Jose Borreguero's avatar Jose Borreguero
Browse files

Refs #30885 resolved to casting pointer


Signed-off-by: default avatarJose Borreguero <borreguero@gmail.com>
parent 372087b5
No related branches found
No related tags found
No related merge requests found
...@@ -211,8 +211,8 @@ mtd_add_qt_library(TARGET_NAME MantidQtWidgetsInstrumentView ...@@ -211,8 +211,8 @@ mtd_add_qt_library(TARGET_NAME MantidQtWidgetsInstrumentView
../../../Framework/DataObjects/inc ../../../Framework/DataObjects/inc
LINK_LIBS LINK_LIBS
${CORE_MANTIDLIBS} ${CORE_MANTIDLIBS}
PythonInterfaceCore
DataObjects DataObjects
PythonInterfaceCore
${POCO_LIBRARIES} ${POCO_LIBRARIES}
${OPENGL_gl_LIBRARY} ${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY} ${OPENGL_glu_LIBRARY}
......
...@@ -117,10 +117,10 @@ private slots: ...@@ -117,10 +117,10 @@ private slots:
void singleComponentTouched(size_t pickID); void singleComponentTouched(size_t pickID);
void singleComponentPicked(size_t pickID); void singleComponentPicked(size_t pickID);
void alignPeaks(const std::vector<Mantid::Kernel::V3D> &planePeaks, void alignPeaks(const std::vector<Mantid::Kernel::V3D> &planePeaks,
const Mantid::DataObjects::Peak *peak); const Mantid::Geometry::IPeak *peak);
void comparePeaks( void comparePeaks(
const std::pair<std::vector<Mantid::DataObjects::Peak *>, const std::pair<std::vector<Mantid::Geometry::IPeak *>,
std::vector<Mantid::DataObjects::Peak *>> &peaks); std::vector<Mantid::Geometry::IPeak *>> &peaks);
void updateSelectionInfoDisplay(); void updateSelectionInfoDisplay();
void shapeCreated(); void shapeCreated();
void updatePlotMultipleDetectors(); void updatePlotMultipleDetectors();
...@@ -209,16 +209,16 @@ public: ...@@ -209,16 +209,16 @@ public:
public slots: public slots:
void displayInfo(size_t pickID); void displayInfo(size_t pickID);
void displayComparePeaksInfo( void displayComparePeaksInfo(
const std::pair<std::vector<Mantid::DataObjects::Peak *>, const std::pair<std::vector<Mantid::Geometry::IPeak *>,
std::vector<Mantid::DataObjects::Peak *>> &peaks); std::vector<Mantid::Geometry::IPeak *>> &peaks);
void displayAlignPeaksInfo(const std::vector<Mantid::Kernel::V3D> &planePeaks, void displayAlignPeaksInfo(const std::vector<Mantid::Kernel::V3D> &planePeaks,
const Mantid::DataObjects::Peak *peak); const Mantid::Geometry::IPeak *peak);
void clear(); void clear();
private: private:
QString displayDetectorInfo(size_t index); QString displayDetectorInfo(size_t index);
QString displayNonDetectorInfo(Mantid::Geometry::ComponentID compID); QString displayNonDetectorInfo(Mantid::Geometry::ComponentID compID);
QString displayPeakInfo(Mantid::DataObjects::Peak *peak); QString displayPeakInfo(Mantid::Geometry::IPeak *peak);
QString displayPeakAngles(const std::pair<Mantid::Geometry::IPeak *, QString displayPeakAngles(const std::pair<Mantid::Geometry::IPeak *,
Mantid::Geometry::IPeak *> &peaks); Mantid::Geometry::IPeak *> &peaks);
QString getPeakOverlayInfo(); QString getPeakOverlayInfo();
......
...@@ -758,14 +758,14 @@ void InstrumentWidgetPickTab::singleComponentPicked(size_t pickID) { ...@@ -758,14 +758,14 @@ void InstrumentWidgetPickTab::singleComponentPicked(size_t pickID) {
} }
void InstrumentWidgetPickTab::comparePeaks( void InstrumentWidgetPickTab::comparePeaks(
const std::pair<std::vector<Mantid::DataObjects::Peak *>, const std::pair<std::vector<Mantid::Geometry::IPeak *>,
std::vector<Mantid::DataObjects::Peak *>> &peaks) { std::vector<Mantid::Geometry::IPeak *>> &peaks) {
m_infoController->displayComparePeaksInfo(peaks); m_infoController->displayComparePeaksInfo(peaks);
} }
void InstrumentWidgetPickTab::alignPeaks( void InstrumentWidgetPickTab::alignPeaks(
const std::vector<Mantid::Kernel::V3D> &planePeaks, const std::vector<Mantid::Kernel::V3D> &planePeaks,
const Mantid::DataObjects::Peak *peak) { const Mantid::Geometry::IPeak *peak) {
m_infoController->displayAlignPeaksInfo(planePeaks, peak); m_infoController->displayAlignPeaksInfo(planePeaks, peak);
} }
...@@ -1005,8 +1005,9 @@ QString ComponentInfoController::displayNonDetectorInfo( ...@@ -1005,8 +1005,9 @@ QString ComponentInfoController::displayNonDetectorInfo(
} }
QString QString
ComponentInfoController::displayPeakInfo(Mantid::DataObjects::Peak *peak) { ComponentInfoController::displayPeakInfo(Mantid::Geometry::IPeak *ipeak) {
std::stringstream text; std::stringstream text;
auto peak = static_cast<Mantid::DataObjects::Peak*>(ipeak);
auto instrument = peak->getInstrument(); auto instrument = peak->getInstrument();
auto sample = instrument->getSample()->getPos(); auto sample = instrument->getSample()->getPos();
auto source = instrument->getSource()->getPos(); auto source = instrument->getSource()->getPos();
...@@ -1042,8 +1043,8 @@ QString ComponentInfoController::displayPeakAngles( ...@@ -1042,8 +1043,8 @@ QString ComponentInfoController::displayPeakAngles(
} }
void ComponentInfoController::displayComparePeaksInfo( void ComponentInfoController::displayComparePeaksInfo(
const std::pair<std::vector<Mantid::DataObjects::Peak *>, const std::pair<std::vector<Mantid::Geometry::IPeak *>,
std::vector<Mantid::DataObjects::Peak *>> &peaks) { std::vector<Mantid::Geometry::IPeak *>> &peaks) {
std::stringstream text; std::stringstream text;
text << "Comparison Information\n"; text << "Comparison Information\n";
...@@ -1068,7 +1069,7 @@ void ComponentInfoController::displayComparePeaksInfo( ...@@ -1068,7 +1069,7 @@ void ComponentInfoController::displayComparePeaksInfo(
void ComponentInfoController::displayAlignPeaksInfo( void ComponentInfoController::displayAlignPeaksInfo(
const std::vector<Mantid::Kernel::V3D> &planePeaks, const std::vector<Mantid::Kernel::V3D> &planePeaks,
const Mantid::DataObjects::Peak *peak) { const Mantid::Geometry::IPeak *ipeak) {
using Mantid::Kernel::V3D; using Mantid::Kernel::V3D;
...@@ -1080,6 +1081,7 @@ void ComponentInfoController::displayAlignPeaksInfo( ...@@ -1080,6 +1081,7 @@ void ComponentInfoController::displayAlignPeaksInfo(
// find projection of beam direction onto plane // find projection of beam direction onto plane
// this is so we always orientate to a common reference direction // this is so we always orientate to a common reference direction
auto peak = static_cast<const Mantid::DataObjects::Peak*>(ipeak);
const auto instrument = peak->getInstrument(); const auto instrument = peak->getInstrument();
const auto samplePos = instrument->getSample()->getPos(); const auto samplePos = instrument->getSample()->getPos();
const auto sourcePos = instrument->getSource()->getPos(); const auto sourcePos = instrument->getSource()->getPos();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment