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

Remove clang-format changes to MantidQt/* and MantidPlot/*

parent 483c041a
......@@ -17,9 +17,9 @@ namespace MantidQt
CaptionLabel(const QString& caption, QWidget* parent);
void mousePressEvent(QMouseEvent *e) override;
void paintEvent(QPaintEvent *event) override;
bool isCollapsed() const { return m_collapsed; }
void collapse();
void expand();
bool isCollapsed()const { return m_collapsed; }
void collapse();
void expand();
signals:
void collapseOrExpand(bool);
private:
......
......@@ -43,9 +43,9 @@ namespace MantidQt
void mousePressEvent(QMouseEvent *) override;
void mouseMoveEvent(QMouseEvent *) override;
void mouseReleaseEvent(QMouseEvent *) override;
void updateScale();
void setMinValueText(double);
void setMaxValueText(double);
void updateScale();
void setMinValueText(double);
void setMaxValueText(double);
private slots:
void scaleOptionsChanged(int);
void nPowerChanged(double);
......
......@@ -67,8 +67,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
void setChildVisibility(bool) override;
bool hasChildVisible() const override;
bool accept(GLActorVisitor &visitor,
......@@ -78,11 +78,9 @@ namespace MantidQt
VisitorAcceptRule rule = VisitAll) const override;
void setColors() override;
protected:
mutable std::vector<ObjComponentActor *>
mChildObjCompActors; ///< List of ObjComponent
///Actors
mutable std::vector<ICompAssemblyActor*> mChildCompAssemActors; ///< List of CompAssembly Actors
protected:
mutable std::vector<ObjComponentActor*> mChildObjCompActors; ///< List of ObjComponent Actors
mutable std::vector<ICompAssemblyActor*> mChildCompAssemActors; ///< List of CompAssembly Actors
private:
void AppendBoundingBox(const Mantid::Kernel::V3D& minBound, const Mantid::Kernel::V3D& maxBound);
};
......
......@@ -60,11 +60,9 @@ namespace MantidQt
bool accept(
GLActorConstVisitor &visitor,
VisitorAcceptRule rule = VisitAll) const override;
boost::shared_ptr<const Mantid::Geometry::IComponent>
getComponent() const;
boost::shared_ptr<const Mantid::Geometry::IObjComponent>
getObjComponent() const;
boost::shared_ptr<const Mantid::Geometry::IDetector> getDetector() const;
boost::shared_ptr<const Mantid::Geometry::IComponent> getComponent() const;
boost::shared_ptr<const Mantid::Geometry::IObjComponent> getObjComponent() const;
boost::shared_ptr<const Mantid::Geometry::IDetector> getDetector() const;
boost::shared_ptr<const Mantid::Geometry::ObjCompAssembly> getObjCompAssembly() const;
boost::shared_ptr<const Mantid::Geometry::CompAssembly> getCompAssembly() const;
virtual void setColors() {}
......
......@@ -77,8 +77,8 @@ namespace MantidQt
///< Virtual destructor
~GLActor() override;
/// Toggle the visibility of the actor.
virtual void setVisibility(bool on) { m_visible = on; }
/// Toggle the visibility of the child actors (if exist).
virtual void setVisibility(bool on) { m_visible = on; }
/// Toggle the visibility of the child actors (if exist).
virtual void setChildVisibility(bool on) { setVisibility(on); }
/// Check if any child is visible
virtual bool hasChildVisible() const { return true; }
......
......@@ -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,12 +69,10 @@ 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,10 +61,8 @@ 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(
......@@ -75,20 +73,17 @@ 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;
......@@ -296,12 +291,9 @@ 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;
};
/**
......@@ -317,9 +309,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
......@@ -331,10 +323,9 @@ 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,13 +46,9 @@ 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,10 +38,9 @@ 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);
......@@ -80,9 +79,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,14 +21,13 @@ 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,15 +25,10 @@ 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;}
......@@ -46,8 +41,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
......@@ -61,9 +56,8 @@ 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,11 +68,9 @@ 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,11 +27,9 @@ 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();
......@@ -63,8 +61,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
......@@ -86,9 +84,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,11 +19,9 @@ 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:
......
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