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

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

parent 483c041a
...@@ -114,9 +114,8 @@ public: ...@@ -114,9 +114,8 @@ public:
QwtDoubleRect boundingRect() const override; QwtDoubleRect boundingRect() const override;
void setBoundingRect(double xs, double ys, double xe, double ye); void setBoundingRect(double xs, double ys, double xe, double ye);
//! Recalculates the bounding rectangle in values coordinates using the //! Recalculates the bounding rectangle in values coordinates using the pixel coordinats when the scales change
//pixel coordinats when the scales change void updateBoundingRect();
void updateBoundingRect();
//! Returns the state of #d_editable. //! Returns the state of #d_editable.
bool editable() const { return d_editable; } bool editable() const { return d_editable; }
...@@ -129,10 +128,10 @@ public: ...@@ -129,10 +128,10 @@ public:
private: private:
void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRect &r) const override; const QRect &r) const override;
double theta(int xs, int ys, int xe, int ye) const; double theta(int xs, int ys, int xe, int ye) const;
//! Flag specifying if the start arrow is visible //! Flag specifying if the start arrow is visible
bool d_start_arrow; bool d_start_arrow;
//! Flag specifying if the end arrow is visible //! Flag specifying if the end arrow is visible
bool d_end_arrow; bool d_end_arrow;
......
...@@ -46,10 +46,10 @@ public: ...@@ -46,10 +46,10 @@ public:
QwtDoubleRect boundingRect() const override; QwtDoubleRect boundingRect() const override;
QwtSymbol::Style minStyle() { return min_style; }; QwtSymbol::Style minStyle(){return min_style;};
void setMinStyle(QwtSymbol::Style s) { min_style = s; }; void setMinStyle(QwtSymbol::Style s){min_style = s;};
QwtSymbol::Style maxStyle(){return max_style;}; QwtSymbol::Style maxStyle(){return max_style;};
void setMaxStyle(QwtSymbol::Style s){max_style = s;}; void setMaxStyle(QwtSymbol::Style s){max_style = s;};
void setMeanStyle(QwtSymbol::Style s){mean_style = s;}; void setMeanStyle(QwtSymbol::Style s){mean_style = s;};
...@@ -82,10 +82,9 @@ private: ...@@ -82,10 +82,9 @@ private:
void draw(QPainter *painter, const QwtScaleMap &xMap, void draw(QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, int from, int to) const override; const QwtScaleMap &yMap, int from, int to) const override;
void drawBox(QPainter *painter, const QwtScaleMap &xMap, void drawBox(QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, double *dat, int size) const; const QwtScaleMap &yMap, double *dat, int size) const;
using DataCurve::drawSymbols; // Unhide base class method (avoids Intel using DataCurve::drawSymbols; // Unhide base class method (avoids Intel compiler warning)
// compiler warning) void drawSymbols(QPainter *painter, const QwtScaleMap &xMap,
void drawSymbols(QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, double *dat, int size) const; const QwtScaleMap &yMap, double *dat, int size) const;
QwtSymbol::Style min_style, max_style, mean_style, p99_style, p1_style; QwtSymbol::Style min_style, max_style, mean_style, p99_style, p1_style;
......
...@@ -44,10 +44,10 @@ class CanvasPicker: public QObject ...@@ -44,10 +44,10 @@ class CanvasPicker: public QObject
public: public:
explicit CanvasPicker(Graph *plot); explicit CanvasPicker(Graph *plot);
bool eventFilter(QObject *, QEvent *) override; bool eventFilter(QObject *, QEvent *) override;
void selectPoints(int n); void selectPoints(int n);
void selectPeak(const QPoint &p); void selectPeak(const QPoint& p);
//! Disable editing of #d_editing_marker on a TAB-key event. //! Disable editing of #d_editing_marker on a TAB-key event.
/**\brief Called by Graph::focusNextPrevChild () /**\brief Called by Graph::focusNextPrevChild ()
*/ */
void disableEditing(); void disableEditing();
......
...@@ -58,8 +58,8 @@ public: ...@@ -58,8 +58,8 @@ public:
ContourLinesEditor(const QLocale& locale = QLocale::system(), int precision = 6, QWidget* parent = 0); ContourLinesEditor(const QLocale& locale = QLocale::system(), int precision = 6, QWidget* parent = 0);
~ContourLinesEditor() override; ~ContourLinesEditor() override;
//! Use this function to initialize the values. //! Use this function to initialize the values.
void setSpectrogram(Spectrogram *sp); void setSpectrogram(Spectrogram *sp);
//! Updates levels in the target spectrogram and replots it. //! Updates levels in the target spectrogram and replots it.
void updateContourLevels(); void updateContourLevels();
void updateContourPens(); void updateContourPens();
//! Updates cell items when spectrogram contour lines changed. //! Updates cell items when spectrogram contour lines changed.
......
...@@ -41,9 +41,9 @@ public: ...@@ -41,9 +41,9 @@ public:
bool setDataFromTable(Table *t, const QString &signalColName, bool setDataFromTable(Table *t, const QString &signalColName,
const QString &responseColName, int = 1, const QString &responseColName, int = 1,
int = -1) override; int = -1) override;
//! Returns the size of the signal data set //! Returns the size of the signal data set
int signalDataSize() { return d_n_signal; }; int signalDataSize(){return d_n_signal;};
//! Returns the size of the response data set //! Returns the size of the response data set
int responseDataSize(){return d_n_response;}; int responseDataSize(){return d_n_response;};
protected: protected:
...@@ -54,9 +54,9 @@ protected: ...@@ -54,9 +54,9 @@ protected:
private: private:
void output() override; void output() override;
//! Size of the signal data set //! Size of the signal data set
int d_n_signal; int d_n_signal;
//! Size of the response data set //! Size of the response data set
int d_n_response; int d_n_response;
}; };
......
...@@ -98,7 +98,7 @@ public: ...@@ -98,7 +98,7 @@ public:
}; };
bool fatalError(const QXmlParseException &) override { return false; }; bool fatalError(const QXmlParseException &) override { return false; };
QString errorString() const override { return errorStr; }; QString errorString() const override { return errorStr; };
QString parentName() { return d_widget_name; }; QString parentName(){return d_widget_name;};
private: private:
bool metFitTag; bool metFitTag;
......
...@@ -50,28 +50,26 @@ class DataPickerTool : public QwtPlotPicker, public PlotToolInterface ...@@ -50,28 +50,26 @@ class DataPickerTool : public QwtPlotPicker, public PlotToolInterface
~DataPickerTool() override; ~DataPickerTool() override;
Mode getMode()const{return d_mode;} Mode getMode()const{return d_mode;}
bool eventFilter(QObject *obj, QEvent *event) override; bool eventFilter(QObject *obj, QEvent *event) override;
bool keyEventFilter(QKeyEvent *ke); bool keyEventFilter(QKeyEvent *ke);
QwtPlotCurve *selectedCurve() const { return d_selected_curve; } QwtPlotCurve *selectedCurve() const { return d_selected_curve; }
int rtti() const override { int rtti() const override {
return PlotToolInterface::Rtti_DataPicker; return PlotToolInterface::Rtti_DataPicker;
}; };
signals: signals:
/** Emitted whenever a new message should be presented to the user. /** 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 * You don't have to connect to this signal if you alreay specified a reciever during initialization.
*during initialization. */
*/ void statusText(const QString&);
void statusText(const QString&);
//! Emitted whenever a new data point has been selected. //! Emitted whenever a new data point has been selected.
void selected(QwtPlotCurve*, int); void selected(QwtPlotCurve*, int);
protected: protected:
void append(const QPoint &point) override; void append(const QPoint &point) override;
void setSelection(QwtPlotCurve *curve, int point_index); void setSelection(QwtPlotCurve *curve, int point_index);
private:
private: ApplicationWindow *d_app;
ApplicationWindow *d_app;
QwtPlotMarker d_selection_marker; QwtPlotMarker d_selection_marker;
Mode d_mode; Mode d_mode;
QwtPlotCurve *d_selected_curve; QwtPlotCurve *d_selected_curve;
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
public slots: public slots:
void accept() override; void accept() override;
void setCurveNames(const QStringList &names); void setCurveNames(const QStringList& names);
void setOperationType(ApplicationWindow::Analysis operation){d_operation = operation;} void setOperationType(ApplicationWindow::Analysis operation){d_operation = operation;}
void setCurentDataSet(const QString& s); void setCurentDataSet(const QString& s);
......
...@@ -46,8 +46,8 @@ class ExponentialFit : public Fit ...@@ -46,8 +46,8 @@ class ExponentialFit : public Fit
return par[0] * exp(-par[1] * x) + par[2]; return par[0] * exp(-par[1] * x) + par[2];
}; };
private: private:
void init(); void init();
void customizeFitResults() override; void customizeFitResults() override;
void calculateFitCurveData(double *X, double *Y) override; void calculateFitCurveData(double *X, double *Y) override;
...@@ -69,8 +69,8 @@ class TwoExpFit : public Fit ...@@ -69,8 +69,8 @@ class TwoExpFit : public Fit
par[4]; par[4];
}; };
private: private:
void init(); void init();
void customizeFitResults() override; void customizeFitResults() override;
void calculateFitCurveData(double *X, double *Y) override; void calculateFitCurveData(double *X, double *Y) override;
}; };
...@@ -90,8 +90,8 @@ class ThreeExpFit : public Fit ...@@ -90,8 +90,8 @@ class ThreeExpFit : public Fit
par[4] * exp(-x * par[5]) + par[6]; par[4] * exp(-x * par[5]) + par[6];
}; };
private: private:
void init(); void init();
void customizeFitResults() override; void customizeFitResults() override;
void calculateFitCurveData(double *X, double *Y) override; void calculateFitCurveData(double *X, double *Y) override;
}; };
......
...@@ -81,8 +81,8 @@ private slots: ...@@ -81,8 +81,8 @@ private slots:
protected slots: protected slots:
//! Accept changes //! Accept changes
void accept() override; void accept() override;
//! Display help //! Display help
void help(); void help();
}; };
#endif // ExportDialog_H #endif // ExportDialog_H
...@@ -47,9 +47,8 @@ class Filter : public QObject ...@@ -47,9 +47,8 @@ class Filter : public QObject
Filter(ApplicationWindow *parent, Graph *g = 0, const QString& name = QString()); Filter(ApplicationWindow *parent, Graph *g = 0, const QString& name = QString());
~Filter() override; ~Filter() override;
//! Actually does the job. Should be reimplemented in derived //! Actually does the job. Should be reimplemented in derived classes.
// classes. virtual bool run();
virtual bool run();
virtual void setDataCurve(int curve, double start, double end); virtual void setDataCurve(int curve, double start, double end);
bool setDataFromCurve(const QString& curveTitle, Graph *g = 0); bool setDataFromCurve(const QString& curveTitle, Graph *g = 0);
......
...@@ -60,26 +60,24 @@ class Fit : public Filter ...@@ -60,26 +60,24 @@ class Fit : public Filter
Fit(ApplicationWindow *parent, Table *t, const QString& name = QString()); Fit(ApplicationWindow *parent, Table *t, const QString& name = QString());
~Fit() override; ~Fit() override;
//! Actually does the fit. Should be reimplemented in derived //! Actually does the fit. Should be reimplemented in derived classes.
// classes. virtual void fit();
virtual void fit();
bool run() override { bool run() override {
fit(); fit();
return true; return true;
}; };
//! Sets the data set to be used for weighting //! Sets the data set to be used for weighting
bool setWeightingData(WeightingMethod w, bool setWeightingData(WeightingMethod w, const QString& colName = QString::null);
const QString &colName = QString::null);
void setDataCurve(int curve, double start, double end) override; void setDataCurve(int curve, double start, double end) override;
bool setDataFromTable(Table *t, const QString &xColName, bool setDataFromTable(Table *t, const QString &xColName,
const QString &yColName, int from = 1, const QString &yColName, int from = 1,
int to = -1) override; int to = -1) override;
QString resultFormula() { return d_result_formula; }; QString resultFormula(){return d_result_formula;};
QString formula() { return d_formula; }; QString formula(){return d_formula;};
virtual void setFormula(const QString&){}; virtual void setFormula(const QString&){};
int numParameters(){return d_p;}; int numParameters(){return d_p;};
QStringList parameterNames(){return d_param_names;}; QStringList parameterNames(){return d_param_names;};
...@@ -102,9 +100,9 @@ class Fit : public Filter ...@@ -102,9 +100,9 @@ class Fit : public Filter
QString legendInfo() override; QString legendInfo() override;
//! Returns a vector with the fit results //! Returns a vector with the fit results
double *results() { return d_results; }; double* results(){return d_results;};
//! Returns a vector with the standard deviations of the results //! Returns a vector with the standard deviations of the results
double* errors(); double* errors();
//! Returns the sum of squares of the residuals from the best-fit line //! Returns the sum of squares of the residuals from the best-fit line
......
...@@ -59,9 +59,9 @@ public: ...@@ -59,9 +59,9 @@ public:
return new FunctionCurve(*this); return new FunctionCurve(*this);
} }
double startRange() { return d_from; }; double startRange(){return d_from;};
double endRange() { return d_to; }; double endRange(){return d_to;};
void setRange(double from, double to); void setRange(double from, double to);
QStringList formulas(){return d_formulas;}; QStringList formulas(){return d_formulas;};
void setFormulas(const QStringList& lst){d_formulas = lst;}; void setFormulas(const QStringList& lst){d_formulas = lst;};
......
...@@ -80,9 +80,9 @@ protected slots: ...@@ -80,9 +80,9 @@ protected slots:
public slots: public slots:
void accept() override; void accept() override;
void acceptFunction(); void acceptFunction();
void acceptParametric(); void acceptParametric();
void acceptPolar(); void acceptPolar();
void setCurveToModify(Graph *g, int curve); void setCurveToModify(Graph *g, int curve);
void insertParamFunctionsList(const QStringList& xList, const QStringList& yList); void insertParamFunctionsList(const QStringList& xList, const QStringList& yList);
void insertPolarFunctionsList(const QStringList& rList, const QStringList& thetaList); void insertPolarFunctionsList(const QStringList& rList, const QStringList& thetaList);
......
...@@ -67,14 +67,8 @@ public: ...@@ -67,14 +67,8 @@ public:
Graph3D (const QString& label, QWidget* parent, const char* name=0, Qt::WFlags f=0); Graph3D (const QString& label, QWidget* parent, const char* name=0, Qt::WFlags f=0);
~Graph3D() override; ~Graph3D() override;
enum PlotType { Scatter = 0, Trajectory = 1, Bars = 2, Ribbon = 3 }; enum PlotType{Scatter = 0, Trajectory = 1, Bars = 2, Ribbon = 3};
enum PointStyle { enum PointStyle{None = 0, Dots = 1, VerticalBars = 2, HairCross = 3, Cones = 4};
None = 0,
Dots = 1,
VerticalBars = 2,
HairCross = 3,
Cones = 4
};
public slots: public slots:
void copy(Graph3D* g); void copy(Graph3D* g);
...@@ -124,9 +118,9 @@ public slots: ...@@ -124,9 +118,9 @@ public slots:
//@{ //@{
bool eventFilter(QObject *object, QEvent *e) override; bool eventFilter(QObject *object, QEvent *e) override;
void resizeEvent(QResizeEvent *) override; void resizeEvent(QResizeEvent *) override;
void scaleFonts(double factor); void scaleFonts(double factor);
void setIgnoreFonts(bool ok) { ignoreFonts = ok; }; void setIgnoreFonts(bool ok){ignoreFonts = ok;};
//@} //@}
//! \name Axes //! \name Axes
//@{ //@{
...@@ -247,8 +241,7 @@ public slots: ...@@ -247,8 +241,7 @@ public slots:
void print() override; void print() override;
void copyImage(); void copyImage();
void exportImage(const QString &fileName, int quality = 100, void exportImage(const QString& fileName, int quality = 100, bool transparent = false);
bool transparent = false);
void exportPDF(const QString &fileName) override; void exportPDF(const QString &fileName) override;
void exportVector(const QString& fileName); void exportVector(const QString& fileName);
void exportToFile(const QString& fileName); void exportToFile(const QString& fileName);
...@@ -257,9 +250,9 @@ public slots: ...@@ -257,9 +250,9 @@ public slots:
const int fileVersion) override; const int fileVersion) override;
std::string saveToProject(ApplicationWindow *app) override; std::string saveToProject(ApplicationWindow *app) override;
void zoomChanged(double); void zoomChanged(double);
void rotationChanged(double, double, double); void rotationChanged(double, double, double);
void scaleChanged(double, double, double); void scaleChanged(double, double, double);
void shiftChanged(double, double, double); void shiftChanged(double, double, double);
//! \name Colors //! \name Colors
...@@ -413,9 +406,9 @@ public: ...@@ -413,9 +406,9 @@ public:
const QString& zFormula, SurfacePlot& pw); const QString& zFormula, SurfacePlot& pw);
Triple operator()(double u, double v) override; Triple operator()(double u, double v) override;
unsigned int rows() { return d_rows; }; unsigned int rows(){return d_rows;};
unsigned int columns() { return d_columns; }; unsigned int columns(){return d_columns;};
void setMesh (unsigned int columns, unsigned int rows); void setMesh (unsigned int columns, unsigned int rows);
bool uPeriodic(){return d_u_periodic;}; bool uPeriodic(){return d_u_periodic;};
bool vPeriodic(){return d_v_periodic;}; bool vPeriodic(){return d_v_periodic;};
......
...@@ -63,12 +63,11 @@ public: ...@@ -63,12 +63,11 @@ public:
private: private:
void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRect &rect) const override; const QRect &rect) const override;
void drawLines(QPainter *painter, const QRect &rect, void drawLines(QPainter *painter, const QRect &rect, Qt::Orientation orientation, const QwtScaleMap &map,
Qt::Orientation orientation, const QwtScaleMap &map, const QwtValueList &values) const;
const QwtValueList &values) const;
QPen d_maj_pen_y; QPen d_maj_pen_y;
QPen d_min_pen_y; QPen d_min_pen_y;
int mrkX, mrkY;//x=0 et y=0 line markers keys int mrkX, mrkY;//x=0 et y=0 line markers keys
}; };
......
...@@ -47,9 +47,9 @@ public: ...@@ -47,9 +47,9 @@ public:
protected slots: protected slots:
void accept() override; void accept() override;
void update(); void update();
void adjustHeight(int width); void adjustHeight(int width);
void adjustWidth(int height); void adjustWidth(int height);
signals: signals:
void setGeometry(int, int, int, int); void setGeometry(int, int, int, int);
......
...@@ -93,8 +93,8 @@ public: ...@@ -93,8 +93,8 @@ public:
protected slots: protected slots:
void closeEvent(QCloseEvent *) override; void closeEvent(QCloseEvent *) override;
//! Update which options are visible and enabled based on the output format. //! Update which options are visible and enabled based on the output format.
void updateAdvancedOptions(const QString &filter); void updateAdvancedOptions (const QString &filter);
}; };
#endif #endif
...@@ -73,12 +73,10 @@ public: ...@@ -73,12 +73,10 @@ public:
//! Return bounding rectangle in plot coordinates. //! Return bounding rectangle in plot coordinates.
QwtDoubleRect boundingRect() const override; QwtDoubleRect boundingRect() const override;
//! Set position (xValue() and yValue()), right and bottom values giving //! Set position (xValue() and yValue()), right and bottom values giving everything in plot coordinates.
// everything in plot coordinates. void setBoundingRect(double left, double top, double right, double bottom);
void setBoundingRect(double left, double top, double right,
double bottom);
double right(){return d_x_right;}; double right(){return d_x_right;};
double bottom(){return d_y_bottom;}; double bottom(){return d_y_bottom;};
//! Return #d_size. //! Return #d_size.
...@@ -110,9 +108,9 @@ private: ...@@ -110,9 +108,9 @@ private:
void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRect &r) const override; const QRect &r) const override;
QPoint d_pos; //!< The position in paint coordinates. QPoint d_pos; //!< The position in paint coordinates.
QPixmap d_pic; //!< The pixmap to be drawn. QPixmap d_pic; //!< The pixmap to be drawn.
QSize d_size; //!< The size (in paint coordinates) to which #d_pic will be scaled in draw(). QSize d_size; //!< The size (in paint coordinates) to which #d_pic will be scaled in draw().
QString d_file_name; //!< The file from which the image was loaded. QString d_file_name; //!< The file from which the image was loaded.
double d_x_right; //!< The right side position in scale coordinates. double d_x_right; //!< The right side position in scale coordinates.
double d_y_bottom; //!< The bottom side position in scale coordinates. double d_y_bottom; //!< The bottom side position in scale coordinates.
......
...@@ -165,8 +165,8 @@ private: ...@@ -165,8 +165,8 @@ private:
void closeEvent(QCloseEvent *) override; void closeEvent(QCloseEvent *) override;
//! Initialise #d_advanced_options and everything it contains. //! Initialise #d_advanced_options and everything it contains.
void initAdvancedOptions(); void initAdvancedOptions();
void setNewWindowsOnly(bool on);