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

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

parent f3ebfa21
......@@ -59,10 +59,10 @@ public:
double transformValue(double value) const;
QwtText label(double value) const override;
int labelNumericPrecision(){return d_prec;};
void setNumericPrecision(int prec){d_prec = prec;};
int labelNumericPrecision() { return d_prec; };
void setNumericPrecision(int prec) { d_prec = prec; };
int majorTicksStyle()const{return d_majTicks;};
int majorTicksStyle()const{return d_majTicks;};
void setMajorTicksStyle(TicksStyle type){d_majTicks = type;};
int minorTicksStyle()const{return d_minTicks;};
......@@ -97,7 +97,7 @@ protected:
void drawLabel(QPainter *painter, double value) const override;
void drawTick(QPainter *p, double value, int len) const override;
void drawBackbone(QPainter *painter) const override;
void drawBreak(QPainter *) const;
void drawBreak(QPainter *) const;
private:
//! Pointer to the parent plot
......
......@@ -100,9 +100,9 @@ signals:
private:
bool eventFilter(QObject *, QEvent *) override;
void mouseDblClicked(const QwtScaleWidget *, const QPoint &);
void mouseClicked(const QwtScaleWidget *scale, const QPoint &pos) ;
void mouseRightClicked(const QwtScaleWidget *scale, const QPoint &pos);
void mouseDblClicked(const QwtScaleWidget *, const QPoint &);
void mouseClicked(const QwtScaleWidget *scale, const QPoint &pos);
void mouseRightClicked(const QwtScaleWidget *scale, const QPoint &pos);
bool d_title_selected;
bool d_labels_selected;
......
......@@ -52,18 +52,19 @@ class ScreenPickerTool : public QwtPlotPicker, public PlotToolInterface
ScreenPickerTool(Graph *graph, const QObject *status_target=NULL, const char *status_slot="");
~ScreenPickerTool() override;
signals:
/** Emitted whenever a new message should be presented to the user.
*
* You don't have to connect to this signal if you alreay specified a reciever during initialization.
*/
void statusText(const QString&);
signals:
/** Emitted whenever a new message should be presented to the user.
*
* You don't have to connect to this signal if you alreay specified a reciever
*during initialization.
*/
void statusText(const QString&);
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
void append(const QPoint &point) override;
QwtText trackerText(const QPoint &) const override;
QwtText trackerText(const QwtDoublePoint &) const override;
QwtPlotMarker d_selection_marker;
QwtPlotMarker d_selection_marker;
};
/**Plot tool for drawing arbitrary points.
......@@ -77,9 +78,9 @@ class DrawPointTool : public ScreenPickerTool
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
void appendPoint(const QwtDoublePoint &point);
DataCurve *d_curve;
Table *d_table;
void appendPoint(const QwtDoublePoint &point);
DataCurve *d_curve;
Table *d_table;
ApplicationWindow *d_app;
};
......
......@@ -101,12 +101,12 @@ class SelectionMoveResizer : public QWidget
explicit SelectionMoveResizer(QWidget *target);
//! Clean up after myself.
~SelectionMoveResizer() override;
/**\brief React on geometry changes of parent and targets.
*/
/**\brief React on geometry changes of parent and targets.
*/
bool eventFilter(QObject *o, QEvent *e) override;
//! Returns true if w is one of targets, false else.
bool contains(QWidget *w) const { return d_widgets.contains(w); };
//! Returns true if m is one of targets, false else.
//! Returns true if w is one of targets, false else.
bool contains(QWidget *w) const { return d_widgets.contains(w); };
//! Returns true if m is one of targets, false else.
bool contains(LegendWidget *m) const { return d_legend_markers.contains(m); };
//! Returns true if m is one of targets, false else.
bool contains(ArrowMarker *m) const { return d_line_markers.contains(m); };
......@@ -148,33 +148,38 @@ class SelectionMoveResizer : public QWidget
*/
void paintEvent(QPaintEvent *e) override;
/**\brief Mouse button presses start move/resize operations.
*
* Clicks outside of #d_bounding_rect or with anything else than the left button
* are propagated to the parent as usual.
*/
*
* Clicks outside of #d_bounding_rect or with anything else than
*the left button
* are propagated to the parent as usual.
*/
void mousePressEvent(QMouseEvent *e) override;
/**\brief Mouse movements need to be monitored for updating the frame during operation.
*
* When no operation is in progress, the mouse cursor is updated based on its position
* before the event is passed on to the parent.
*/
/**\brief Mouse movements need to be monitored for updating the
*frame during operation.
*
* When no operation is in progress, the mouse cursor is updated
*based on its position
* before the event is passed on to the parent.
*/
void mouseMoveEvent(QMouseEvent *e) override;
/**\brief Mouse releases end the current operation and apply it to the targets.
*
* When there is no operation in progress, the event is passed on to the parent.
*/
/**\brief Mouse releases end the current operation and apply it
*to the targets.
*
* When there is no operation in progress, the event is passed
*on to the parent.
*/
void mouseReleaseEvent(QMouseEvent *e) override;
/**\brief Allow keyboard-based moving of the selection.
*
* Unused keys are passed on to the parent.
*/
*
* Unused keys are passed on to the parent.
*/
void keyPressEvent(QKeyEvent *e) override;
//! Ignore double-clicks so that they can be used by my parent.
void mouseDoubleClickEvent(QMouseEvent *e) override;
private:
//! Size of resize handle in pixels.
static const int handler_size = 10;
private:
//! Size of resize handle in pixels.
static const int handler_size = 10;
//! Return one of the rectangles to be filled for starting resize operations.
static const QRect handlerRect(QRect rect, Operation op);
//! Apply operation specified by #d_op and #d_op_dp to in.
......
......@@ -49,8 +49,8 @@ class SigmoidalFit : public Fit
void guessInitialValues() override;
void setLogistic(bool on = true);
private:
void init();
private:
void init();
void calculateFitCurveData(double *X, double *Y) override;
bool d_logistic;
......
......@@ -49,8 +49,8 @@ public:
public slots:
void accept() override;
void setFunction(Graph3D *);
void setParametricSurface(Graph3D *);
void setFunction(Graph3D *);
void setParametricSurface(Graph3D *);
private slots:
void clearList();
......
......@@ -134,18 +134,18 @@ public slots:
bool isEmptyColumn(int col);
void print() override;
void print(const QString& fileName);
void print(const QString &fileName);
void exportPDF(const QString &fileName) override;
//! \name Event Handlers
//@{
//@{
bool eventFilter(QObject *object, QEvent *e) override;
void customEvent(QEvent *e) override;
//@}v
//! \name Column Operations
//@{
void removeCol();
//! \name Column Operations
//@{
void removeCol();
void removeCol(const QStringList& list);
void insertCol();
void insertCols(int start, int count);
......@@ -318,7 +318,7 @@ public slots:
std::string saveToProject(ApplicationWindow *app) override;
std::string saveTableMetadata();
void restore(QString& spec);
void restore(QString &spec);
//! This changes the general background color (color of the table widget, not the cells)
void setBackgroundColor(const QColor& col);
......@@ -341,10 +341,11 @@ public slots:
const int fileVersion) override;
void restore(const QStringList &lst) override;
//! This slot notifies the main application that the table has been modified. Triggers the update of 2D plots.
void notifyChanges();
//! This slot notifies the main application that the table has been
// modified. Triggers the update of 2D plots.
void notifyChanges();
//! Notifies the main application that the width of a table column has been modified by the user.
//! Notifies the main application that the width of a table column has been modified by the user.
void colWidthModified(int, int, int);
//! is this table editable
......
......@@ -57,8 +57,8 @@ private slots:
void setPlotDesignation(int i);
void accept() override;
void apply();
void updateDisplay(int item);
void enablePrecision(int f);
void updateDisplay(int item);
void enablePrecision(int f);
void setNumericFormat(int type, int prec, bool allRightColumns);
void setDayFormat(const QString& format, bool allRightColumns);
void setMonthFormat(const QString& format, bool allRightColumns);
......
......@@ -90,8 +90,8 @@ private slots:
//! Accept changes and close dialog
void accept() override;
//! Apply changes
void apply();
void setDefaultValues();
void apply();
void setDefaultValues();
void updateTransparency(int alpha);
......
......@@ -50,8 +50,8 @@ public slots:
private:
void closeEvent(QCloseEvent *e) override;
QString d_initial_text;
QWidget *d_target;
QString d_initial_text;
QWidget *d_target;
};
#endif
......@@ -48,6 +48,6 @@ signals:
private:
bool eventFilter(QObject *, QEvent *) override;
QwtTextLabel *title;
bool d_selected;
QwtTextLabel *title;
bool d_selected;
};
......@@ -58,12 +58,13 @@ class TranslateCurveTool : public QObject, public PlotToolInterface
int rtti() const override {
return PlotToolInterface::Rtti_TranslateCurveTool;
};
signals:
/**\brief Emitted whenever a new message should be presented to the user.
*
* You don't have to connect to this signal if you alreay specified a reciever during initialization.
*/
void statusText(const QString&);
signals:
/**\brief Emitted whenever a new message should be presented to the user.
*
* You don't have to connect to this signal if you alreay specified a reciever
*during initialization.
*/
void statusText(const QString&);
public slots:
//! Select curve to translate, using the specified point as base point.
void selectCurvePoint(QwtPlotCurve *curve, int point_index);
......
......@@ -44,21 +44,22 @@ public:
const QString& endCol1, const QString& endCol2, int startRow, int endRow);
~VectorCurve() override;
enum Position{Tail, Middle, Head};
enum Position { Tail, Middle, Head };
void copy(const VectorCurve *vc);
void copy(const VectorCurve *vc);
QwtDoubleRect boundingRect() const override;
using DataCurve::draw; // Unhide base class method (avoids Intel compiler warning)
using DataCurve::draw; // Unhide base class method (avoids Intel
// compiler warning)
void draw(QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, int from, int to) const override;
void drawVector(QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, int from, int to) const;
const QwtScaleMap &yMap, int from, int to) const;
void drawArrowHead(QPainter *p, int xs, int ys, int xe, int ye) const;
double theta(int x0, int y0, int x1, int y1) const;
void drawArrowHead(QPainter *p, int xs, int ys, int xe, int ye) const;
double theta(int x0, int y0, int x1, int y1) const;
QString vectorEndXAColName(){return d_end_x_a;};
QString vectorEndYMColName(){return d_end_y_m;};
......
......@@ -48,10 +48,10 @@ namespace MantidQt
IndirectSimulationTab(QWidget * parent = 0);
~IndirectSimulationTab() override;
virtual void loadSettings(const QSettings& settings) = 0;
};
} // namespace CustomInterfaces
virtual void
loadSettings(const QSettings &settings) = 0;
};
} // namespace CustomInterfaces
} // namespace Mantid
#endif
......@@ -52,8 +52,8 @@ namespace MantidQt
explicit BinDialog(QWidget *parent = 0);
~BinDialog() override;
void setIntegralMinMax(double, double, bool);
signals:
/// This signal is sent when changing the bin range selected.
signals:
/// This signal is sent when changing the bin range selected.
/// Parameters are: min, max, and a bool set to true to mean "everything"
void IntegralMinMax(double, double, bool);
......
......@@ -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,9 +78,11 @@ 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,9 +60,11 @@ 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; }
......
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