Commit 5e655e0d authored by Martyn Gigg's avatar Martyn Gigg Committed by Peterson, Peter
Browse files

Run pre-commit on all files

Fixes unformatted code after a bug in the call
to precommit was fixed recently
parent b226eb80
...@@ -20,39 +20,34 @@ namespace MantidQt { ...@@ -20,39 +20,34 @@ namespace MantidQt {
namespace MantidWidgets { namespace MantidWidgets {
namespace BankRenderingHelpers { namespace BankRenderingHelpers {
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW std::pair<size_t, size_t> EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW std::pair<size_t, size_t> getCorrectedTextureSize(const size_t width,
getCorrectedTextureSize(const size_t width, const size_t height); const size_t height);
/** Render GridDetector Bank as 6 bitmaps for all layers or one bitmap for the /** Render GridDetector Bank as 6 bitmaps for all layers or one bitmap for the
selected layer Makes OpenGL calls for drawing the bank in an OpenGL window as selected layer Makes OpenGL calls for drawing the bank in an OpenGL window as
textures. NB glBegin() and glEnd() are called within this function. textures. NB glBegin() and glEnd() are called within this function.
*/ */
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void renderGridBankLayer(const Mantid::Geometry::ComponentInfo &compInfo,
renderGridBankLayer(const Mantid::Geometry::ComponentInfo &compInfo,
size_t index, size_t layer); size_t index, size_t layer);
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void renderGridBankOutline(const Mantid::Geometry::ComponentInfo &compInfo,
renderGridBankOutline(const Mantid::Geometry::ComponentInfo &compInfo,
size_t index); size_t index);
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void renderGridBankFull(const Mantid::Geometry::ComponentInfo &compInfo,
renderGridBankFull(const Mantid::Geometry::ComponentInfo &compInfo,
size_t index, detail::GridTextureFace gridFace); size_t index, detail::GridTextureFace gridFace);
/** Render RectangularDetector Bank as bitmap texture /** Render RectangularDetector Bank as bitmap texture
Makes OpenGL calls for drawing the bank in an OpenGL window. NB glBegin() and Makes OpenGL calls for drawing the bank in an OpenGL window. NB glBegin() and
glEnd() are called within this function. glEnd() are called within this function.
*/ */
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void renderRectangularBank(const Mantid::Geometry::ComponentInfo &compInfo,
renderRectangularBank(const Mantid::Geometry::ComponentInfo &compInfo,
size_t index); size_t index);
/** Render Structured Detector Bank as quads /** Render Structured Detector Bank as quads
Makes OpenGL calls for drawing the bank in an OpenGL window. NB glBegin() and Makes OpenGL calls for drawing the bank in an OpenGL window. NB glBegin() and
glEnd() are called within this function. glEnd() are called within this function.
*/ */
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW void renderStructuredBank(const Mantid::Geometry::ComponentInfo &compInfo,
renderStructuredBank(const Mantid::Geometry::ComponentInfo &compInfo,
size_t index, const std::vector<GLColor> &color); size_t index, const std::vector<GLColor> &color);
} // namespace BankRenderingHelpers } // namespace BankRenderingHelpers
} // namespace MantidWidgets } // namespace MantidWidgets
......
...@@ -25,29 +25,21 @@ namespace MantidWidgets { ...@@ -25,29 +25,21 @@ namespace MantidWidgets {
namespace detail { namespace detail {
class BankTextureBuilder { class BankTextureBuilder {
public: public:
BankTextureBuilder(const Mantid::Geometry::ComponentInfo &compInfo, BankTextureBuilder(const Mantid::Geometry::ComponentInfo &compInfo, size_t index);
size_t index);
~BankTextureBuilder(); ~BankTextureBuilder();
void buildColorTextures(const std::vector<GLColor> &colors, void buildColorTextures(const std::vector<GLColor> &colors, bool isUsingLayer = false, size_t layer = 0);
bool isUsingLayer = false, size_t layer = 0); void buildPickTextures(const std::vector<GLColor> &colors, bool isUsingLayer = false, size_t layer = 0);
void buildPickTextures(const std::vector<GLColor> &colors, void uploadTextures(bool picking, GridTextureFace gridFace = GridTextureFace::Front);
bool isUsingLayer = false, size_t layer = 0);
void uploadTextures(bool picking,
GridTextureFace gridFace = GridTextureFace::Front);
void bindTextures(bool picking) const; void bindTextures(bool picking) const;
void unbindTextures() const; void unbindTextures() const;
private: private:
void buildOpenGLTextures(bool picking, const std::vector<GLColor> &colors, void buildOpenGLTextures(bool picking, const std::vector<GLColor> &colors, bool isUsingLayer, size_t layer);
bool isUsingLayer, size_t layer);
void buildTubeBankTextures(const std::vector<GLColor> &colors, bool picking); void buildTubeBankTextures(const std::vector<GLColor> &colors, bool picking);
void buildGridBankFull(const std::vector<GLColor> &colors, bool picking); void buildGridBankFull(const std::vector<GLColor> &colors, bool picking);
void buildGridBankLayer(const std::vector<GLColor> &colors, bool picking, void buildGridBankLayer(const std::vector<GLColor> &colors, bool picking, size_t layer);
size_t layer); void buildGridBankTextures(const std::vector<GLColor> &colors, bool picking, bool isUsingLayer, size_t layer);
void buildGridBankTextures(const std::vector<GLColor> &colors, bool picking, void buildRectangularBankTextures(const std::vector<GLColor> &colors, bool picking);
bool isUsingLayer, size_t layer);
void buildRectangularBankTextures(const std::vector<GLColor> &colors,
bool picking);
void uploadTubeBankTextures(bool picking); void uploadTubeBankTextures(bool picking);
void uploadGridBankTexture(bool picking, GridTextureFace gridFace); void uploadGridBankTexture(bool picking, GridTextureFace gridFace);
void uploadRectangularBankTextures(bool picking); void uploadRectangularBankTextures(bool picking);
......
...@@ -28,11 +28,9 @@ using Mantid::Geometry::Instrument; ...@@ -28,11 +28,9 @@ using Mantid::Geometry::Instrument;
using namespace MantidQt; using namespace MantidQt;
using namespace MantidQt::MantidWidgets; using namespace MantidQt::MantidWidgets;
class MockBaseCustomInstrumentView class MockBaseCustomInstrumentView : public MantidQt::MantidWidgets::IBaseCustomInstrumentView {
: public MantidQt::MantidWidgets::IBaseCustomInstrumentView {
public: public:
explicit MockBaseCustomInstrumentView(const std::string &instrument, explicit MockBaseCustomInstrumentView(const std::string &instrument, QWidget *parent = nullptr) {
QWidget *parent = nullptr) {
(void)instrument; (void)instrument;
(void)parent; (void)parent;
}; };
...@@ -45,21 +43,16 @@ public: ...@@ -45,21 +43,16 @@ public:
MOCK_METHOD1(setInstrumentWidget, void(InstrumentWidget *instrument)); MOCK_METHOD1(setInstrumentWidget, void(InstrumentWidget *instrument));
MOCK_METHOD0(getInstrumentView, MantidWidgets::InstrumentWidget *()); MOCK_METHOD0(getInstrumentView, MantidWidgets::InstrumentWidget *());
MOCK_METHOD2( MOCK_METHOD2(setUpInstrument, void(const std::string &fileName,
setUpInstrument, std::vector<std::function<bool(std::map<std::string, bool>)>> &instrument));
void(const std::string &fileName, MOCK_METHOD1(addObserver, void(std::tuple<std::string, Observer *> &listener));
std::vector<std::function<bool(std::map<std::string, bool>)>>
&instrument));
MOCK_METHOD1(addObserver,
void(std::tuple<std::string, Observer *> &listener));
MOCK_METHOD1(setupInstrumentAnalysisSplitters, void(QWidget *analysis)); MOCK_METHOD1(setupInstrumentAnalysisSplitters, void(QWidget *analysis));
MOCK_METHOD0(setupHelp, void()); MOCK_METHOD0(setupHelp, void());
// override getQWidget // override getQWidget
MOCK_METHOD0(getQWidget, QWidget *()); MOCK_METHOD0(getQWidget, QWidget *());
}; };
class MockBaseCustomInstrumentModel class MockBaseCustomInstrumentModel : public MantidQt::MantidWidgets::IBaseCustomInstrumentModel {
: public MantidQt::MantidWidgets::IBaseCustomInstrumentModel {
public: public:
explicit MockBaseCustomInstrumentModel(){}; explicit MockBaseCustomInstrumentModel(){};
~MockBaseCustomInstrumentModel(){}; ~MockBaseCustomInstrumentModel(){};
...@@ -80,15 +73,12 @@ public: ...@@ -80,15 +73,12 @@ public:
// Allows us to turn on and off mocks to functions from the presenter // Allows us to turn on and off mocks to functions from the presenter
// do not repeat testing // do not repeat testing
class PartMockBaseCustomInstrumentPresenter class PartMockBaseCustomInstrumentPresenter : public BaseCustomInstrumentPresenter {
: public BaseCustomInstrumentPresenter {
public: public:
explicit PartMockBaseCustomInstrumentPresenter( explicit PartMockBaseCustomInstrumentPresenter(IBaseCustomInstrumentView *view, IBaseCustomInstrumentModel *model,
IBaseCustomInstrumentView *view, IBaseCustomInstrumentModel *model,
IPlotFitAnalysisPanePresenter *analysis) IPlotFitAnalysisPanePresenter *analysis)
: BaseCustomInstrumentPresenter(view, model, analysis), : BaseCustomInstrumentPresenter(view, model, analysis), m_initInstrument(0), m_load(0), m_layout(0),
m_initInstrument(0), m_load(0), m_layout(0), m_sideEffects(0), m_sideEffects(0), m_mockInitInstrument(false), m_mockLoad(false), m_mockLayout(false),
m_mockInitInstrument(false), m_mockLoad(false), m_mockLayout(false),
m_mockSideEffects(false){}; m_mockSideEffects(false){};
~PartMockBaseCustomInstrumentPresenter(){}; ~PartMockBaseCustomInstrumentPresenter(){};
...@@ -98,8 +88,7 @@ public: ...@@ -98,8 +88,7 @@ public:
void setMockLayout() { m_mockLayout = true; }; void setMockLayout() { m_mockLayout = true; };
void setMockSideEffects() { m_mockSideEffects = true; }; void setMockSideEffects() { m_mockSideEffects = true; };
// override functions so we can call mocked versions // override functions so we can call mocked versions
void initInstrument(std::pair<instrumentSetUp, instrumentObserverOptions> void initInstrument(std::pair<instrumentSetUp, instrumentObserverOptions> *setUp = nullptr) override {
*setUp = nullptr) override {
if (m_mockInitInstrument) { if (m_mockInitInstrument) {
m_initInstrument += 1; m_initInstrument += 1;
} else { } else {
...@@ -107,8 +96,7 @@ public: ...@@ -107,8 +96,7 @@ public:
}; };
} }
void initLayout(std::pair<instrumentSetUp, instrumentObserverOptions> *setup = void initLayout(std::pair<instrumentSetUp, instrumentObserverOptions> *setup = nullptr) override final {
nullptr) override final {
if (m_mockLayout == true) { if (m_mockLayout == true) {
m_layout += 1; m_layout += 1;
} else { } else {
...@@ -139,14 +127,9 @@ public: ...@@ -139,14 +127,9 @@ public:
int getLoadSideEffectsCount() { return m_sideEffects; }; int getLoadSideEffectsCount() { return m_sideEffects; };
// allow tests to get at protected/private functions/members // allow tests to get at protected/private functions/members
void setUpInstrumentAnalysisSplitter() override { void setUpInstrumentAnalysisSplitter() override { BaseCustomInstrumentPresenter::setUpInstrumentAnalysisSplitter(); };
BaseCustomInstrumentPresenter::setUpInstrumentAnalysisSplitter(); void loadRunNumber() override { BaseCustomInstrumentPresenter::loadRunNumber(); };
}; std::pair<instrumentSetUp, instrumentObserverOptions> *setupInstrument() override {
void loadRunNumber() override {
BaseCustomInstrumentPresenter::loadRunNumber();
};
std::pair<instrumentSetUp, instrumentObserverOptions> *
setupInstrument() override {
return BaseCustomInstrumentPresenter::setupInstrument(); return BaseCustomInstrumentPresenter::setupInstrument();
}; };
......
...@@ -33,8 +33,7 @@ class BinDialog : public QDialog { ...@@ -33,8 +33,7 @@ class BinDialog : public QDialog {
public: public:
explicit BinDialog(QWidget *parent = nullptr); explicit BinDialog(QWidget *parent = nullptr);
~BinDialog() override; ~BinDialog() override;
void setIntegralMinMax(double /*minBin*/, double /*maxBin*/, void setIntegralMinMax(double /*minBin*/, double /*maxBin*/, bool /*useEverything*/);
bool /*useEverything*/);
signals: signals:
/// This signal is sent when changing the bin range selected. /// This signal is sent when changing the bin range selected.
/// Parameters are: min, max, and a bool set to true to mean "everything" /// Parameters are: min, max, and a bool set to true to mean "everything"
......
...@@ -39,8 +39,7 @@ public: ...@@ -39,8 +39,7 @@ public:
~InstrumentRenderer(); ~InstrumentRenderer();
void renderInstrument(const std::vector<bool> &visibleComps, bool showGuides, void renderInstrument(const std::vector<bool> &visibleComps, bool showGuides, bool picking = false);
bool picking = false);
void reset(); void reset();
...@@ -67,8 +66,7 @@ public: ...@@ -67,8 +66,7 @@ public:
private: private:
void resetColors(); void resetColors();
void resetPickColors(); void resetPickColors();
void draw(const std::vector<bool> &visibleComps, bool showGuides, void draw(const std::vector<bool> &visibleComps, bool showGuides, bool picking);
bool picking);
void drawGridBank(size_t bankIndex, bool picking); void drawGridBank(size_t bankIndex, bool picking);
void drawRectangularBank(size_t bankIndex, bool picking); void drawRectangularBank(size_t bankIndex, bool picking);
void drawStructuredBank(size_t bankIndex, bool picking); void drawStructuredBank(size_t bankIndex, bool picking);
......
...@@ -33,8 +33,7 @@ class BinDialog; ...@@ -33,8 +33,7 @@ class BinDialog;
/** /**
* Implements the Render tab in InstrumentWidget. * Implements the Render tab in InstrumentWidget.
*/ */
class EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW InstrumentWidgetRenderTab class EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW InstrumentWidgetRenderTab : public InstrumentWidgetTab {
: public InstrumentWidgetTab {
Q_OBJECT Q_OBJECT
public: public:
...@@ -48,8 +47,7 @@ public: ...@@ -48,8 +47,7 @@ public:
void setScaleType(ColorMap::ScaleType type); void setScaleType(ColorMap::ScaleType type);
void setAxis(const QString &axisName); void setAxis(const QString &axisName);
bool areAxesOn() const; bool areAxesOn() const;
void setupColorBar(const ColorMap & /*cmap*/, double /*minValue*/, void setupColorBar(const ColorMap & /*cmap*/, double /*minValue*/, double /*maxValue*/, double /*minPositive*/,
double /*maxValue*/, double /*minPositive*/,
bool /*autoscaling*/); bool /*autoscaling*/);
/// Load the render window tab settings from file. /// Load the render window tab settings from file.
virtual void loadFromProject(const std::string &lines) override; virtual void loadFromProject(const std::string &lines) override;
......
...@@ -23,9 +23,7 @@ namespace MantidWidgets { ...@@ -23,9 +23,7 @@ namespace MantidWidgets {
class InstrumentWidget; class InstrumentWidget;
class ProjectionSurface; class ProjectionSurface;
class EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW InstrumentWidgetTab class EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW InstrumentWidgetTab : public QFrame, public InstrumentWidgetTypes {
: public QFrame,
public InstrumentWidgetTypes {
Q_OBJECT Q_OBJECT
public: public:
explicit InstrumentWidgetTab(InstrumentWidget *parent); explicit InstrumentWidgetTab(InstrumentWidget *parent);
...@@ -39,9 +37,7 @@ public: ...@@ -39,9 +37,7 @@ public:
virtual void loadSettings(const QSettings & /*unused*/) {} virtual void loadSettings(const QSettings & /*unused*/) {}
/// Add tab-specific items to the context menu /// Add tab-specific items to the context menu
/// Return true if at least 1 item was added or false otherwise. /// Return true if at least 1 item was added or false otherwise.
virtual bool addToDisplayContextMenu(QMenu & /*unused*/) const { virtual bool addToDisplayContextMenu(QMenu & /*unused*/) const { return false; }
return false;
}
/// Get the projection surface /// Get the projection surface
std::shared_ptr<ProjectionSurface> getSurface() const; std::shared_ptr<ProjectionSurface> getSurface() const;
/// Load state for the widget tab from a project file /// Load state for the widget tab from a project file
......
...@@ -30,8 +30,7 @@ public: ...@@ -30,8 +30,7 @@ public:
explicit MiniPlotQwt(QWidget *parent); explicit MiniPlotQwt(QWidget *parent);
~MiniPlotQwt() override; ~MiniPlotQwt() override;
void setXLabel(QString xunit); void setXLabel(QString xunit);
void setData(std::vector<double> x, std::vector<double> y, QString xunit, void setData(std::vector<double> x, std::vector<double> y, QString xunit, QString curveLabel);
QString curveLabel);
QString label() const { return m_label; } QString label() const { return m_label; }
void setYAxisLabelRotation(double degrees); void setYAxisLabelRotation(double degrees);
void addPeakLabel(const PeakMarker2D * /*marker*/); void addPeakLabel(const PeakMarker2D * /*marker*/);
...@@ -79,8 +78,7 @@ private: ...@@ -79,8 +78,7 @@ private:
class PeakLabel : public QwtPlotItem { class PeakLabel : public QwtPlotItem {
public: public:
PeakLabel(const PeakMarker2D *m, const MiniPlotQwt *plot) PeakLabel(const PeakMarker2D *m, const MiniPlotQwt *plot) : m_marker(m), m_plot(plot) {}
: m_marker(m), m_plot(plot) {}
void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRect &canvasRect) const override; const QRect &canvasRect) const override;
......
...@@ -48,18 +48,15 @@ private: ...@@ -48,18 +48,15 @@ private:
*/ */
class PanelsSurface : public UnwrappedSurface { class PanelsSurface : public UnwrappedSurface {
public: public:
PanelsSurface(const InstrumentActor *rootActor, PanelsSurface(const InstrumentActor *rootActor, const Mantid::Kernel::V3D &origin, const Mantid::Kernel::V3D &axis);
const Mantid::Kernel::V3D &origin,
const Mantid::Kernel::V3D &axis);
~PanelsSurface() override; ~PanelsSurface() override;
void init() override; void init() override;
void project(const Mantid::Kernel::V3D & /*pos*/, double & /*u*/, void project(const Mantid::Kernel::V3D & /*pos*/, double & /*u*/, double & /*v*/, double & /*uscale*/,
double & /*v*/, double & /*uscale*/,
double & /*vscale*/) const override; double & /*vscale*/) const override;
protected: protected:
boost::optional<std::pair<std::vector<size_t>, Mantid::Kernel::V3D>> boost::optional<std::pair<std::vector<size_t>, Mantid::Kernel::V3D>> findFlatPanels(size_t rootIndex,
findFlatPanels(size_t rootIndex, std::vector<bool> &visited); std::vector<bool> &visited);
void processStructured(size_t rootIndex); void processStructured(size_t rootIndex);
...@@ -67,22 +64,18 @@ protected: ...@@ -67,22 +64,18 @@ protected:
void processGrid(size_t rootIndex); void processGrid(size_t rootIndex);
std::pair<std::vector<size_t>, Mantid::Kernel::V3D> std::pair<std::vector<size_t>, Mantid::Kernel::V3D> processUnstructured(size_t rootIndex, std::vector<bool> &visited);
processUnstructured(size_t rootIndex, std::vector<bool> &visited);
void rotate(const UnwrappedDetector &udet, void rotate(const UnwrappedDetector &udet, Mantid::Kernel::Quat &R) const override;
Mantid::Kernel::Quat &R) const override;
// Setup the projection axes // Setup the projection axes
void setupAxes(); void setupAxes();
// Add a flat bank // Add a flat bank
void addFlatBankOfDetectors(const Mantid::Kernel::V3D &normal, void addFlatBankOfDetectors(const Mantid::Kernel::V3D &normal, const std::vector<size_t> &detectors);
const std::vector<size_t> &detectors);
void constructFromComponentInfo(); void constructFromComponentInfo();
Mantid::Kernel::Quat calcBankRotation(const Mantid::Kernel::V3D &detPos, Mantid::Kernel::Quat calcBankRotation(const Mantid::Kernel::V3D &detPos, Mantid::Kernel::V3D normal) const;
Mantid::Kernel::V3D normal) const;
// Add a detector from an assembly // Add a detector from an assembly
void addDetector(size_t detIndex, const Mantid::Kernel::V3D &refPos, void addDetector(size_t detIndex, const Mantid::Kernel::V3D &refPos, int bankIndex,
int bankIndex, const Mantid::Kernel::Quat &rotation); const Mantid::Kernel::Quat &rotation);
// Spread the banks over the projection plane // Spread the banks over the projection plane
void spreadBanks(); void spreadBanks();
// Find index of the largest bank // Find index of the largest bank
......
...@@ -56,19 +56,13 @@ private: ...@@ -56,19 +56,13 @@ private:
/// Helper class for scaling peak markers to intensities. /// Helper class for scaling peak markers to intensities.
class AbstractIntensityScale { class AbstractIntensityScale {
public: public:
explicit AbstractIntensityScale( explicit AbstractIntensityScale(const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws) { setPeaksWorkspace(pws); }
const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws) {
setPeaksWorkspace(pws);
}
virtual ~AbstractIntensityScale() {} virtual ~AbstractIntensityScale() {}
void void setPeaksWorkspace(const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws);
setPeaksWorkspace(const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws);
virtual PeakMarker2D::Style virtual PeakMarker2D::Style getScaledMarker(double intensity, const PeakMarker2D::Style &baseStyle) const = 0;
getScaledMarker(double intensity,
const PeakMarker2D::Style &baseStyle) const = 0;
protected: protected:
double m_maxIntensity = 0.0; double m_maxIntensity = 0.0;
...@@ -78,15 +72,12 @@ protected: ...@@ -78,15 +72,12 @@ protected:
/// Default intensity scale leaves all markers unchanged. /// Default intensity scale leaves all markers unchanged.
class DefaultIntensityScale : public AbstractIntensityScale { class DefaultIntensityScale : public AbstractIntensityScale {
public: public:
explicit DefaultIntensityScale( explicit DefaultIntensityScale(const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws)
const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws)
: AbstractIntensityScale(pws) {} : AbstractIntensityScale(pws) {}
protected: protected:
/// Returns the base style unmodified. /// Returns the base style unmodified.
PeakMarker2D::Style PeakMarker2D::Style getScaledMarker(double intensity, const PeakMarker2D::Style &baseStyle) const override {
getScaledMarker(double intensity,
const PeakMarker2D::Style &baseStyle) const override {
UNUSED_ARG(intensity); UNUSED_ARG(intensity);
return baseStyle; return baseStyle;
...@@ -97,14 +88,11 @@ protected: ...@@ -97,14 +88,11 @@ protected:
/// strong, very strong). /// strong, very strong).
class QualitativeIntensityScale : public AbstractIntensityScale { class QualitativeIntensityScale : public AbstractIntensityScale {
public: public:
explicit QualitativeIntensityScale( explicit QualitativeIntensityScale(const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws)
const std::shared_ptr<Mantid::API::IPeaksWorkspace> &pws)
: AbstractIntensityScale(pws) {} : AbstractIntensityScale(pws) {}
protected: protected:
PeakMarker2D::Style PeakMarker2D::Style getScaledMarker(double intensity, const PeakMarker2D::Style &baseStyle) const override;
getScaledMarker(double intensity,
const PeakMarker2D::Style &baseStyle) const override;
private: private:
// cppcheck-suppress unusedPrivateFunction // cppcheck-suppress unusedPrivateFunction
...@@ -117,12 +105,10 @@ private: ...@@ -117,12 +105,10 @@ private:
/** /**
* Class for managing peak markers on an unwrapped instrument surface. * Class for managing peak markers on an unwrapped instrument surface.
*/ */
class PeakOverlay : public Shape2DCollection, class PeakOverlay : public Shape2DCollection, public MantidQt::API::WorkspaceObserver {
public MantidQt::API::WorkspaceObserver {
Q_OBJECT