Commit a714c4e1 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Clang-format changes. Get project to build again on OSX.

parent f3ebfa21
......@@ -58,9 +58,9 @@ namespace MantidQt
GLActorConstVisitor &visitor,
VisitorAcceptRule rule = VisitAll) const override;
void addActor(GLActor*);
void removeActor(GLActor*);
int getNumberOfActors();
void addActor(GLActor *);
void removeActor(GLActor *);
int getNumberOfActors();
GLActor* getActor(int index);
void invalidateDisplayList()const;
private:
......
......@@ -76,9 +76,9 @@ namespace MantidQt
bool visit(GLActor *) override;
bool visit(ComponentActor *actor) override;
private:
bool m_showNonDet;
};
private:
bool m_showNonDet;
};
}//MantidWidgets
}//MantidQt
......
......@@ -69,10 +69,12 @@ namespace MantidQt
std::string type() const override {
return "ICompAssemblyActor";
} ///< Type of the GL object
int getNumberOfDetectors() const { return mNumberOfDetectors; }
int getNumberOfDetectors() const {
return mNumberOfDetectors;
}
protected:
int mNumberOfDetectors;
protected:
int mNumberOfDetectors;
Mantid::Kernel::V3D minBoundBox;
Mantid::Kernel::V3D maxBoundBox;
};
......
......@@ -61,8 +61,10 @@ namespace MantidQt
///< Destructor
~InstrumentActor() override;
///< Type of the GL object
virtual std::string type()const { return "InstrumentActor"; }
/// Draw the instrument in 3D
virtual std::string type() const {
return "InstrumentActor";
}
/// Draw the instrument in 3D
void draw(bool picking = false) const override;
/// Return the bounding box in 3D
void getBoundingBox(
......@@ -73,17 +75,20 @@ namespace MantidQt
/// Run visitors callback on each component
bool accept(GLActorVisitor &visitor,
VisitorAcceptRule rule = VisitAll) override;
/// Run visitors callback on each component (const version)
/// Run visitors callback on each component (const
/// version)
bool accept(
GLActorConstVisitor &visitor,
VisitorAcceptRule rule = VisitAll) const override;
/// Toggle the visibility of the child actors (if exist).
/// Toggle the visibility of the child actors (if
/// exist).
void setChildVisibility(bool) override;
/// Check if any child is visible
bool hasChildVisible() const override;
/// Get the underlying instrument
boost::shared_ptr<const Mantid::Geometry::Instrument> getInstrument() const;
/// Get the associated data workspace
boost::shared_ptr<const Mantid::Geometry::Instrument>
getInstrument() const;
/// Get the associated data workspace
boost::shared_ptr<const Mantid::API::MatrixWorkspace> getWorkspace() const;
/// Get the mask displayed but not yet applied as a MatrxWorkspace
boost::shared_ptr<Mantid::API::MatrixWorkspace> getMaskMatrixWorkspace() const;
......@@ -291,9 +296,12 @@ namespace MantidQt
bool visit(ObjCompAssemblyActor *actor) override;
bool visit(InstrumentActor *actor) override;
bool visit(RectangularDetectorActor *actor) override;
Mantid::Geometry::ComponentID getID()const { return m_id; }
private:
Mantid::Geometry::ComponentID m_id;
Mantid::Geometry::ComponentID getID() const {
return m_id;
}
private:
Mantid::Geometry::ComponentID m_id;
};
/**
......@@ -309,9 +317,9 @@ namespace MantidQt
using GLActorVisitor::visit;
bool visit(GLActor *) override;
private:
bool m_on;
};
private:
bool m_on;
};
/**
* Finds an actor with a particular ComponentID
......@@ -323,9 +331,10 @@ namespace MantidQt
: m_id(id), m_actor(NULL) {}
using GLActorVisitor::visit;
bool visit(GLActor *) override;
ComponentActor* getActor()const { return m_actor; }
private:
Mantid::Geometry::ComponentID m_id;
ComponentActor *getActor() const { return m_actor; }
private:
Mantid::Geometry::ComponentID m_id;
mutable ComponentActor* m_actor;
};
......
......@@ -46,9 +46,13 @@ namespace MantidQt
int columnCount(const QModelIndex &parent =
QModelIndex()) const override;
private:
const InstrumentActor *m_instrumentActor; ///< actor of instrument to which the model corresponds
};
private:
const InstrumentActor *m_instrumentActor; ///< actor of
///instrument
///to which
///the model
///corresponds
};
}//MantidWidgets
}//MantidQt
......
......@@ -93,8 +93,8 @@ namespace MantidQt
bool setDefaultView = true);
~InstrumentWidget() override;
QString getWorkspaceName() const;
std::string getWorkspaceNameStdString() const;
void renameWorkspace(const std::string &workspace);
std::string getWorkspaceNameStdString() const;
void renameWorkspace(const std::string &workspace);
SurfaceType getSurfaceType() const { return m_surfaceType; }
/// Get pointer to the projection surface
boost::shared_ptr<ProjectionSurface> getSurface() const;
......@@ -159,9 +159,9 @@ namespace MantidQt
void dropEvent(QDropEvent *e) override;
bool eventFilter(QObject *obj, QEvent *ev) override;
public slots:
void tabChanged(int);
void componentSelected(Mantid::Geometry::ComponentID id);
public slots:
void tabChanged(int);
void componentSelected(Mantid::Geometry::ComponentID id);
void executeAlgorithm(const QString &, const QString &);
void executeAlgorithm(Mantid::API::IAlgorithm_sptr);
......
......@@ -66,9 +66,9 @@ namespace MantidQt
explicit InstrumentWidgetMaskTab(InstrumentWidget *instrWidget);
void initSurface() override;
void setMode(Mode mode);
void selectTool(Activity tool);
void selectTool(Activity tool);
signals:
signals:
void executeAlgorithm(const QString&, const QString&);
public slots:
......@@ -106,9 +106,9 @@ namespace MantidQt
protected:
void showEvent(QShowEvent *) override;
void clearProperties();
void setProperties();
boost::shared_ptr<Mantid::API::MatrixWorkspace> createMaskWorkspace(bool invertMask, bool temp = false);
void clearProperties();
void setProperties();
boost::shared_ptr<Mantid::API::MatrixWorkspace> createMaskWorkspace(bool invertMask, bool temp = false);
void saveMaskingToWorkspace(bool invertMask = false);
void saveMaskingToFile(bool invertMask = false);
void saveMaskingToCalFile(bool invertMask = false);
......
......@@ -62,9 +62,9 @@ namespace MantidQt
void loadSettings(const QSettings &settings) override;
bool addToDisplayContextMenu(QMenu &) const override;
void selectTool(const ToolType tool);
boost::shared_ptr<ProjectionSurface> getSurface() const;
boost::shared_ptr<ProjectionSurface> getSurface() const;
public slots:
public slots:
void setTubeXUnits(int units);
void changedIntegrationRange(double, double);
private slots:
......@@ -83,10 +83,10 @@ namespace MantidQt
void savePlotToWorkspace();
private:
void showEvent(QShowEvent *) override;
QColor getShapeBorderColor() const;
QColor getShapeBorderColor() const;
/* Pick tab controls */
OneCurvePlot* m_plot; ///< Miniplot to display data in the detectors
/* Pick tab controls */
OneCurvePlot* m_plot; ///< Miniplot to display data in the detectors
QLabel *m_activeTool; ///< Displays a tip on which tool is currently selected
QPushButton *m_zoom; ///< Button switching on navigation mode
QPushButton *m_one; ///< Button switching on single detector selection mode
......
......@@ -38,9 +38,10 @@ namespace MantidQt
void initSurface() override;
void saveSettings(QSettings &) const override;
void loadSettings(const QSettings &) override;
void setupColorBarScaling(const MantidColorMap&, double);
GraphOptions::ScaleType getScaleType()const;
void setScaleType(GraphOptions::ScaleType type);
void setupColorBarScaling(const MantidColorMap &,
double);
GraphOptions::ScaleType getScaleType() const;
void setScaleType(GraphOptions::ScaleType type);
void setAxis(const QString& axisName);
bool areAxesOn()const;
void setupColorBar(const MantidColorMap&, double, double, double, bool);
......@@ -79,9 +80,9 @@ namespace MantidQt
private:
void showEvent(QShowEvent *) override;
QMenu* createPeaksMenu();
QFrame * setupAxisFrame();
void setPrecisionMenuItemChecked(int n);
QMenu *createPeaksMenu();
QFrame *setupAxisFrame();
void setPrecisionMenuItemChecked(int n);
void enable3DSurface(bool on);
QPointF getUCorrection() const;
......
......@@ -21,13 +21,14 @@ namespace MantidQt
public:
explicit InstrumentWidgetTreeTab(InstrumentWidget *instrWidget);
void initSurface() override;
public slots:
void selectComponentByName(const QString& name);
private:
public slots:
void selectComponentByName(const QString &name);
private:
void showEvent(QShowEvent *) override;
/// Widget to display instrument tree
InstrumentTreeWidget* m_instrumentTree;
};
/// Widget to display instrument tree
InstrumentTreeWidget *m_instrumentTree;
};
}//MantidWidgets
}//MantidQt
......
......@@ -25,10 +25,15 @@ namespace MantidQt
public:
explicit MantidGLWidget(QWidget *parent = 0); ///< Constructor
~MantidGLWidget() override; ///< Destructor
void setSurface(boost::shared_ptr<ProjectionSurface> surface);
boost::shared_ptr<ProjectionSurface> getSurface() { return m_surface; }
void
setSurface(boost::shared_ptr<ProjectionSurface>
surface);
boost::shared_ptr<ProjectionSurface>
getSurface() {
return m_surface;
}
void setBackgroundColor(QColor);
void setBackgroundColor(QColor);
QColor currentBackgroundColor() const;
void saveToFile(const QString & filename);
//int getLightingState() const {return m_lightingState;}
......@@ -41,8 +46,8 @@ namespace MantidQt
protected:
void initializeGL() override;
void resetWidget();
void MakeObject();
void resetWidget();
void MakeObject();
void paintEvent(QPaintEvent *event) override;
void resizeGL(int, int) override;
void
......@@ -56,8 +61,9 @@ namespace MantidQt
void enterEvent(QEvent *) override;
void leaveEvent(QEvent *) override;
void draw();
void checkGLError(const QString& funName);
private:
void checkGLError(const QString &funName);
private:
void setRenderingOptions();
//int m_lightingState; ///< 0 = light off; 2 = light on
......
......@@ -57,8 +57,8 @@ namespace MantidQt
} ///< Type of the GL object
void draw(bool picking = false)
const override; ///< Method that defines
///ObjComponent geometry. Calls
///ObjComponent draw method
/// ObjComponent geometry. Calls
/// ObjComponent draw method
// virtual void getBoundingBox(Mantid::Kernel::V3D&
// minBound,Mantid::Kernel::V3D& maxBound)const;
void setColors() override;
......@@ -68,9 +68,11 @@ namespace MantidQt
GLActorConstVisitor &visitor,
VisitorAcceptRule rule = VisitAll) const override;
private:
void setDetectorColor(unsigned char* data, size_t i, GLColor c)const; ///< set colour to a detector
void setDataColors() const;
private:
void setDetectorColor(
unsigned char *data, size_t i,
GLColor c) const; ///< set colour to a detector
void setDataColors() const;
void setPickColors() const;
void generateTexture(unsigned char* data, unsigned int& id) const;
/// Swap between drawing counts and drawing detector code colours
......
......@@ -58,17 +58,17 @@ namespace MantidQt
} ///< Type of the GL object
void draw(bool picking = false)
const override; ///< Method that defines
///ObjComponent geometry. Calls
///ObjComponent draw method
/// ObjComponent geometry. Calls
/// ObjComponent draw method
void getBoundingBox(
Mantid::Kernel::V3D &minBound,
Mantid::Kernel::V3D &maxBound) const override;
void setColors() override;
void setColor(const GLColor& c) { m_dataColor = c; }
void setColor(const GLColor &c) { m_dataColor = c; }
private:
void setPickColor(const GLColor& c) { m_pickColor = c; }
private:
void setPickColor(const GLColor& c) { m_pickColor = c; }
GLColor m_dataColor;
GLColor m_pickColor;
......
......@@ -27,9 +27,11 @@ namespace MantidQt
public:
explicit OneCurvePlot(QWidget *parent);
~OneCurvePlot() override;
void setData(const double* x, const double* y, int dataSize, const std::string& xUnits = "");
void setLabel(const QString& label);
QString label()const { return m_label; }
void setData(const double *x, const double *y,
int dataSize,
const std::string &xUnits = "");
void setLabel(const QString &label);
QString label()const { return m_label; }
void setYAxisLabelRotation(double degrees);
void addPeakLabel(const PeakMarker2D*);
void clearPeakLabels();
......@@ -61,8 +63,8 @@ namespace MantidQt
void mouseReleaseEvent(QMouseEvent *) override;
private:
QwtPlotCurve* m_curve;
QString m_label; ///< label to identify stored curve
QwtPlotCurve *m_curve;
QString m_label; ///< label to identify stored curve
QwtPlotZoomer* m_zoomer; ///< does zooming
int m_x0; ///< save x coord of last left mouse click
int m_y0; ///< save y coord of last left mouse click
......@@ -84,9 +86,9 @@ namespace MantidQt
const QwtScaleMap &yMap,
const QRect &canvasRect) const override;
private:
const PeakMarker2D* m_marker;
const OneCurvePlot* m_plot;
private:
const PeakMarker2D *m_marker;
const OneCurvePlot* m_plot;
};
}//MantidWidgets
......
......@@ -19,9 +19,11 @@ namespace MantidQt
const char *what() const throw() override {
return m_msg.c_str();
}
static bool check(const std::string& funName);
static bool hasError(const std::string& funName) { return check(funName); }
static std::ostream& log();
static bool check(const std::string &funName);
static bool hasError(const std::string &funName) {
return check(funName);
}
static std::ostream& log();
static std::ostream& logDebug();
private:
......
......@@ -56,13 +56,13 @@ namespace MantidQt
double &, double &,
double &) const override;
protected:
void rotate(const UnwrappedDetector &udet,
Mantid::Kernel::Quat &R) const override;
//void drawCustom(QPainter *painter) const;
protected:
void rotate(const UnwrappedDetector &udet,
Mantid::Kernel::Quat &R) const override;
// void drawCustom(QPainter *painter) const;
// Setup the projection axes
void setupAxes();
// Setup the projection axes
void setupAxes();
// Setup the projection axes
void setupBasisAxes(const Mantid::Kernel::V3D &zaxis, Mantid::Kernel::V3D &xaxis, Mantid::Kernel::V3D &yaxis) const;
// Find all flat banks of detectors.
......
......@@ -38,9 +38,9 @@ namespace MantidQt
}
void addToPath(QPainterPath &path) const override;
/* --- Own public methods --- */
/// Set new marker size to s
void setMarkerSize(const int& s);
/// Get marker size
/// Set new marker size to s
void setMarkerSize(const int &s);
/// Get marker size
int getMarkerSize()const { return m_markerSize; }
/// Get default marker size
static int getDefaultMarkerSize() { return g_defaultMarkerSize; }
......@@ -64,9 +64,9 @@ namespace MantidQt
/* --- Implemented Shape2D protected virtual methods --- */
void drawShape(QPainter &painter) const override;
void refit() override {}
/* --- Own protected methods --- */
void drawCircle(QPainter& painter)const;
void drawDiamond(QPainter& painter)const;
/* --- Own protected methods --- */
void drawCircle(QPainter &painter) const;
void drawDiamond(QPainter& painter)const;
void drawSquare(QPainter& painter)const;
private:
......
......@@ -127,8 +127,8 @@ namespace MantidQt
void clear() override;
/// Create the markers
void createMarkers(const PeakMarker2D::Style &style);
void addMarker(PeakMarker2D *m);
void createMarkers(const PeakMarker2D::Style &style);
void addMarker(PeakMarker2D *m);
QList<PeakMarker2D *> getMarkersWithID(int detID) const;
int getNumberPeaks() const;
Mantid::Geometry::IPeak &getPeak(int);
......@@ -153,10 +153,10 @@ namespace MantidQt
const std::string &wsName,
const Mantid::API::Workspace_sptr ws) override;
PeakMarker2D::Style getCurrentStyle() const;
void recreateMarkers(const PeakMarker2D::Style &style);
PeakMarker2D::Style getCurrentStyle() const;
void recreateMarkers(const PeakMarker2D::Style &style);
QMultiHash<int, PeakMarker2D *>
QMultiHash<int, PeakMarker2D *>
m_det2marker; ///< detector ID to PeakMarker2D map
mutable QList<PeakHKL> m_labels;
boost::shared_ptr<Mantid::API::IPeaksWorkspace>
......
......@@ -31,9 +31,9 @@ namespace MantidQt
~Projection3D() override;
RectF getSurfaceBounds() const override;
void setViewDirection(const QString& vd);
void set3DAxesState(bool on);
void setWireframe(bool on);
void setViewDirection(const QString &vd);
void set3DAxesState(bool on);
void setWireframe(bool on);
void componentSelected(
Mantid::Geometry::ComponentID = NULL) override;
......@@ -44,9 +44,9 @@ namespace MantidQt
QString getInfoText() const override;
signals:
void finishedMove();
void finishedMove();
protected slots:
protected slots:
void initTranslation(int x, int y);
void translate(int x, int y);
void initZoom(int x, int y);
......@@ -62,10 +62,10 @@ namespace MantidQt
bool picking = false) const override;
void changeColorMap() override;
void drawAxes(double axis_length = 100.0)const;
void setLightingModel(bool picking)const;
void drawAxes(double axis_length = 100.0) const;
void setLightingModel(bool picking) const;
bool m_drawAxes;
bool m_drawAxes;
bool m_wireframe;
Viewport m_viewport;
......
......@@ -77,9 +77,10 @@ namespace MantidQt
/// Destructor
~ProjectionSurface() override;
/// Resets the instrument actor.
void resetInstrumentActor(const InstrumentActor* rootActor);
void
resetInstrumentActor(const InstrumentActor *rootActor);
//-----------------------------------
//-----------------------------------
// Public virtual methods
//-----------------------------------
......
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