diff --git a/MantidQt/API/inc/MantidQtAPI/AlgorithmPropertiesWidget.h b/MantidQt/API/inc/MantidQtAPI/AlgorithmPropertiesWidget.h index de49490f66a78804bf8a361a6f9e5cccd7eed577..92bfaa743d7cd547e9a173e79b96187ffd576e14 100644 --- a/MantidQt/API/inc/MantidQtAPI/AlgorithmPropertiesWidget.h +++ b/MantidQt/API/inc/MantidQtAPI/AlgorithmPropertiesWidget.h @@ -53,8 +53,8 @@ namespace API public: AlgorithmPropertiesWidget(QWidget * parent = NULL); - virtual ~AlgorithmPropertiesWidget(); - + ~AlgorithmPropertiesWidget() override; + void setInputHistory(MantidQt::API::AbstractAlgorithmInputHistory * inputHistory); void initLayout(); diff --git a/MantidQt/API/inc/MantidQtAPI/AlgorithmRunner.h b/MantidQt/API/inc/MantidQtAPI/AlgorithmRunner.h index e5cef07e6d2357b28edb4441843d5ccd5a76e184..a1ebe05a85c9f460bb832822a21a156ebdff6f11 100644 --- a/MantidQt/API/inc/MantidQtAPI/AlgorithmRunner.h +++ b/MantidQt/API/inc/MantidQtAPI/AlgorithmRunner.h @@ -52,8 +52,8 @@ namespace API public: explicit AlgorithmRunner(QObject * parent = 0); - virtual ~AlgorithmRunner(); - + ~AlgorithmRunner() override; + void cancelRunningAlgorithm(); void startAlgorithm(Mantid::API::IAlgorithm_sptr alg); diff --git a/MantidQt/API/inc/MantidQtAPI/BatchAlgorithmRunner.h b/MantidQt/API/inc/MantidQtAPI/BatchAlgorithmRunner.h index 6c8efb5d1f7fb13d6aef2f0302743298ec7e177e..f3249a5b985c5012ac718f8f95569f9684fce89c 100644 --- a/MantidQt/API/inc/MantidQtAPI/BatchAlgorithmRunner.h +++ b/MantidQt/API/inc/MantidQtAPI/BatchAlgorithmRunner.h @@ -64,7 +64,7 @@ namespace API typedef std::pair<Mantid::API::IAlgorithm_sptr, AlgorithmRuntimeProps> ConfiguredAlgorithm; explicit BatchAlgorithmRunner(QObject * parent = 0); - virtual ~BatchAlgorithmRunner(); + ~BatchAlgorithmRunner() override; /// Adds an algorithm to the execution queue void addAlgorithm(Mantid::API::IAlgorithm_sptr algo, AlgorithmRuntimeProps props = AlgorithmRuntimeProps()); diff --git a/MantidQt/API/inc/MantidQtAPI/BoolPropertyWidget.h b/MantidQt/API/inc/MantidQtAPI/BoolPropertyWidget.h index c5f2e0b54ae0d7a90b59dac79edb030388caa593..bee428c8638f93830a8774606366ca40acaff4b5 100644 --- a/MantidQt/API/inc/MantidQtAPI/BoolPropertyWidget.h +++ b/MantidQt/API/inc/MantidQtAPI/BoolPropertyWidget.h @@ -43,12 +43,12 @@ namespace API public: BoolPropertyWidget(Mantid::Kernel::PropertyWithValue<bool> * prop, QWidget * parent = NULL, QGridLayout * layout = NULL, int row=-1); - virtual ~BoolPropertyWidget(); - QString getValue() const; - virtual void setValueImpl(const QString & value); + ~BoolPropertyWidget() override; + QString getValue() const override; + void setValueImpl(const QString &value) override; ///@return the main widget of this combo of widgets - QWidget * getMainWidget() {return m_checkBox; } + QWidget *getMainWidget() override { return m_checkBox; } protected: /// Checkbox widget diff --git a/MantidQt/API/inc/MantidQtAPI/FilePropertyWidget.h b/MantidQt/API/inc/MantidQtAPI/FilePropertyWidget.h index 068cf29f472b07586f0a4b13f364820231279c49..b4635b309526566f80151373bd9a52645d78651a 100644 --- a/MantidQt/API/inc/MantidQtAPI/FilePropertyWidget.h +++ b/MantidQt/API/inc/MantidQtAPI/FilePropertyWidget.h @@ -45,8 +45,8 @@ namespace API public: FilePropertyWidget(Mantid::Kernel::Property * prop, QWidget * parent = NULL, QGridLayout * layout = NULL, int row=-1); - virtual ~FilePropertyWidget(); - + ~FilePropertyWidget() override; + static QString openFileDialog(Mantid::Kernel::Property * baseProp); static QStringList openMultipleFileDialog(Mantid::Kernel::Property * baseProp); diff --git a/MantidQt/API/inc/MantidQtAPI/GenericDialog.h b/MantidQt/API/inc/MantidQtAPI/GenericDialog.h index 8c00b5a31be4e2b27adf737dfbf1c770945fcf4f..78f5f3885cf78f6760edb9893a0765c12dd7b5e5 100644 --- a/MantidQt/API/inc/MantidQtAPI/GenericDialog.h +++ b/MantidQt/API/inc/MantidQtAPI/GenericDialog.h @@ -61,15 +61,15 @@ public: // Constructor GenericDialog(QWidget* parent = 0); // Destructor - virtual ~GenericDialog(); + ~GenericDialog() override; protected slots: - virtual void accept(); + void accept() override; private: - virtual void initLayout(); + void initLayout() override; - void parseInput(); + void parseInput() override; /// Widget containing all the PropertyWidgets AlgorithmPropertiesWidget * m_algoPropertiesWidget; diff --git a/MantidQt/API/inc/MantidQtAPI/MantidHelpInterface.h b/MantidQt/API/inc/MantidQtAPI/MantidHelpInterface.h index c7f4da234a5eff40811453664345256d584c6635..6256b3444067581968a15cb826a9de1fa5403a06 100644 --- a/MantidQt/API/inc/MantidQtAPI/MantidHelpInterface.h +++ b/MantidQt/API/inc/MantidQtAPI/MantidHelpInterface.h @@ -45,7 +45,7 @@ public: /// Default constructor MantidHelpInterface(); /// Default destructor. - virtual ~MantidHelpInterface(); + ~MantidHelpInterface() override; virtual void showPage(const std::string & url=std::string()); virtual void showPage(const QString & url); diff --git a/MantidQt/API/inc/MantidQtAPI/OptionsPropertyWidget.h b/MantidQt/API/inc/MantidQtAPI/OptionsPropertyWidget.h index 4cf71d622c700f7794099fb330edf4993e5de25d..0cb5b19972cb7c0a31ef790a9a2b6ea31589d097 100644 --- a/MantidQt/API/inc/MantidQtAPI/OptionsPropertyWidget.h +++ b/MantidQt/API/inc/MantidQtAPI/OptionsPropertyWidget.h @@ -44,13 +44,12 @@ namespace API public: OptionsPropertyWidget(Mantid::Kernel::Property * prop, QWidget * parent = NULL, QGridLayout * layout = NULL, int row=-1); - virtual ~OptionsPropertyWidget(); - QString getValue() const; - virtual void setValueImpl(const QString & value); + ~OptionsPropertyWidget() override; + QString getValue() const override; + void setValueImpl(const QString &value) override; ///@return the main widget of this combo of widgets - QWidget * getMainWidget() {return m_combo; } - + QWidget *getMainWidget() override { return m_combo; } protected: /// Label (name of the property) diff --git a/MantidQt/API/inc/MantidQtAPI/PowerScaleEngine.h b/MantidQt/API/inc/MantidQtAPI/PowerScaleEngine.h index b0002cca4370c47a116df82c736f756d23cd4da3..4ccc7a4122643e638f8326599fe42765efbfe1ac 100644 --- a/MantidQt/API/inc/MantidQtAPI/PowerScaleEngine.h +++ b/MantidQt/API/inc/MantidQtAPI/PowerScaleEngine.h @@ -39,10 +39,13 @@ class EXPORT_OPT_MANTIDQT_API PowerScaleTransformation: public ScaleTransformati { public: PowerScaleTransformation(const ScaleEngine *engine):ScaleTransformation(engine), nth_power(engine->nthPower()){}; - virtual double xForm(double x, double, double, double p1, double p2) const; - virtual double invXForm(double x, double s1, double s2, double p1, double p2) const; - QwtScaleTransformation* copy() const; - virtual ~PowerScaleTransformation(); + double xForm(double x, double, double, double p1, + double p2) const override; + double invXForm(double x, double s1, double s2, double p1, + double p2) const override; + QwtScaleTransformation *copy() const override; + ~PowerScaleTransformation() override; + private: double nth_power; }; @@ -54,16 +57,16 @@ private: class EXPORT_OPT_MANTIDQT_API PowerScaleEngine: public QwtScaleEngine { public: - virtual void autoScale(int maxSteps, - double &x1, double &x2, double &stepSize) const; + void autoScale(int maxSteps, double &x1, double &x2, + double &stepSize) const override; - virtual QwtScaleDiv divideScale(double x1, double x2, - int numMajorSteps, int numMinorSteps, - double stepSize = 0.0) const; + QwtScaleDiv divideScale(double x1, double x2, int numMajorSteps, + int numMinorSteps, + double stepSize = 0.0) const override; - virtual QwtScaleTransformation *transformation() const; + QwtScaleTransformation *transformation() const override; - virtual ~PowerScaleEngine(); + ~PowerScaleEngine() override; protected: QwtDoubleInterval align(const QwtDoubleInterval&, diff --git a/MantidQt/API/inc/MantidQtAPI/PropertyWidget.h b/MantidQt/API/inc/MantidQtAPI/PropertyWidget.h index 23164a70ec5fa40f97678acee9bd92a65c5499fc..5d25dc8205a9a9aed10b27620ed3bfe3b4dd24c5 100644 --- a/MantidQt/API/inc/MantidQtAPI/PropertyWidget.h +++ b/MantidQt/API/inc/MantidQtAPI/PropertyWidget.h @@ -31,15 +31,15 @@ namespace API /// Constructor ClickableLabel(QWidget * parent); /// Destructor - ~ClickableLabel(); - + ~ClickableLabel() override; + signals: /// Signal emitted when a user clicks the label. void clicked(); protected: /// Catches the mouse press event and emits the signal. - void mousePressEvent(QMouseEvent * event); + void mousePressEvent(QMouseEvent *event) override; }; /** Base class for widgets that will set @@ -75,8 +75,8 @@ signals: enum Info { INVALID, REPLACE, RESTORE }; PropertyWidget(Mantid::Kernel::Property * prop, QWidget * parent = NULL, QGridLayout * layout = NULL, int row=-1); - virtual ~PropertyWidget(); - + ~PropertyWidget() override; + bool inGrid() const; /// Return the value of the property given the GUI state. @@ -90,7 +90,7 @@ signals: virtual QWidget * getMainWidget() = 0; void setEnabled(bool val); - void setVisible(bool val); + void setVisible(bool val) override; /// @return the Layout object that these widget(s) are in. QGridLayout * getGridLayout() diff --git a/MantidQt/API/inc/MantidQtAPI/QScienceSpinBox.h b/MantidQt/API/inc/MantidQtAPI/QScienceSpinBox.h index ffb249261b9415ca23d8104507fe5bbdd3cd490f..f0e65fa54fee36b3530fd9290505662c0718e5ce 100644 --- a/MantidQt/API/inc/MantidQtAPI/QScienceSpinBox.h +++ b/MantidQt/API/inc/MantidQtAPI/QScienceSpinBox.h @@ -21,8 +21,8 @@ public: int decimals() const; void setDecimals(int value); - QString textFromValue(double value) const; - double valueFromText(const QString &text) const; + QString textFromValue(double value) const override; + double valueFromText(const QString &text) const override; void setLogSteps(bool logSteps); @@ -38,11 +38,11 @@ private: bool isIntermediateValue(const QString &str) const; QVariant validateAndInterpret(QString &input, int &pos, QValidator::State &state) const; - QValidator::State validate(QString &text, int &pos) const; - void fixup(QString &input) const; + QValidator::State validate(QString &text, int &pos) const override; + void fixup(QString &input) const override; QString stripped(const QString &t, int *pos) const; double round(double value) const; - void stepBy(int steps); + void stepBy(int steps) override; public slots: void stepDown(); diff --git a/MantidQt/API/inc/MantidQtAPI/QtSignalChannel.h b/MantidQt/API/inc/MantidQtAPI/QtSignalChannel.h index b598204b47d0944f731d8d7c1384c3014f2b0b97..f9773c978cd5de412040a1b8ed70a8ecefc0ab39 100644 --- a/MantidQt/API/inc/MantidQtAPI/QtSignalChannel.h +++ b/MantidQt/API/inc/MantidQtAPI/QtSignalChannel.h @@ -47,7 +47,7 @@ namespace MantidQt /// Default constructor QtSignalChannel(const QString & source = ""); /// Destructor - ~QtSignalChannel(); + ~QtSignalChannel() override; /// If set, only Mantid log messages from this source are emitted void setSource(const QString & source); @@ -55,7 +55,7 @@ namespace MantidQt inline const QString & source() const { return m_source; } /// Converts the Poco::Message to a Qt signal - void log(const Poco::Message& msg); + void log(const Poco::Message &msg) override; public slots: /// Set the log level for all loggers diff --git a/MantidQt/API/inc/MantidQtAPI/RepoModel.h b/MantidQt/API/inc/MantidQtAPI/RepoModel.h index f630804187fa97a659a7f9f8212ed5b0346f6c28..dc6795432da263f5ef7fa436d83f7b58841488cd 100644 --- a/MantidQt/API/inc/MantidQtAPI/RepoModel.h +++ b/MantidQt/API/inc/MantidQtAPI/RepoModel.h @@ -140,7 +140,7 @@ private: class UploadForm: public QDialog{ public: UploadForm(const QString & file2upload, QWidget * parent = 0); - virtual ~UploadForm(); + ~UploadForm() override; QString email(); QString author(); QString comment(); @@ -163,7 +163,7 @@ private: class DeleteQueryBox : public QMessageBox{ public: DeleteQueryBox(const QString & path, QWidget* parent = 0); - virtual ~DeleteQueryBox(); + ~DeleteQueryBox() override; QString comment(); private: QTextEdit * comment_te; @@ -173,26 +173,26 @@ public: /// constructor RepoModel(QObject *parent = 0); /// destructor - ~RepoModel(); + ~RepoModel() override; /// access to the ScriptRepository data - QVariant data(const QModelIndex & index, int role)const; + QVariant data(const QModelIndex &index, int role) const override; /// information on the available interaction - Qt::ItemFlags flags(const QModelIndex & index) const; + Qt::ItemFlags flags(const QModelIndex &index) const override; /// header strings QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const; + int role = Qt::DisplayRole) const override; /// access to the index QModelIndex index(int row, int column, - const QModelIndex &parent = QModelIndex()) const; + const QModelIndex &parent = QModelIndex()) const override; /// access to parent - QModelIndex parent(const QModelIndex &index) const; + QModelIndex parent(const QModelIndex &index) const override; //// provide the number of the rows - int rowCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; /// provide the nubmer of the coluns - int columnCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; /// change data bool setData(const QModelIndex &index, const QVariant &value, - int role = Qt::EditRole); + int role = Qt::EditRole) override; static const QString & localOnlySt(); static const QString & remoteOnlySt(); diff --git a/MantidQt/API/inc/MantidQtAPI/SelectionNotificationService.h b/MantidQt/API/inc/MantidQtAPI/SelectionNotificationService.h index 6936028668a0457dcf8be0a365214307a4831df3..be793d990e5f3f18cf0e8333420a894bfc74e1de 100644 --- a/MantidQt/API/inc/MantidQtAPI/SelectionNotificationService.h +++ b/MantidQt/API/inc/MantidQtAPI/SelectionNotificationService.h @@ -59,7 +59,7 @@ namespace MantidQt SelectionNotificationServiceImpl(); /// private constructor, since SelectionNotificationService is a singleton - virtual ~SelectionNotificationServiceImpl(); + ~SelectionNotificationServiceImpl() override; friend struct Mantid::Kernel::CreateUsingNew<SelectionNotificationServiceImpl>; }; diff --git a/MantidQt/API/inc/MantidQtAPI/SyncedCheckboxes.h b/MantidQt/API/inc/MantidQtAPI/SyncedCheckboxes.h index b35712dd41908af55d22f35a090f49e1c40d282f..eb89341dde1da2fdb2c473eaf24a63fbea38bdbf 100644 --- a/MantidQt/API/inc/MantidQtAPI/SyncedCheckboxes.h +++ b/MantidQt/API/inc/MantidQtAPI/SyncedCheckboxes.h @@ -48,7 +48,7 @@ namespace API public: SyncedCheckboxes(QAction * menu, QAbstractButton * button, bool checked = false); - virtual ~SyncedCheckboxes(); + ~SyncedCheckboxes() override; void toggle(bool val); void setEnabled(bool val); void setVisible(bool val); diff --git a/MantidQt/API/inc/MantidQtAPI/TextPropertyWidget.h b/MantidQt/API/inc/MantidQtAPI/TextPropertyWidget.h index 96e80aef307a6de9ced073e7b560e1eb03ff0fc7..ff5750190930dbce1685d8274b56e0129c3f1172 100644 --- a/MantidQt/API/inc/MantidQtAPI/TextPropertyWidget.h +++ b/MantidQt/API/inc/MantidQtAPI/TextPropertyWidget.h @@ -43,12 +43,12 @@ namespace API public: TextPropertyWidget(Mantid::Kernel::Property * prop, QWidget * parent = NULL, QGridLayout * layout = NULL, int row=-1); - virtual ~TextPropertyWidget(); - QString getValue() const; - virtual void setValueImpl(const QString & value); + ~TextPropertyWidget() override; + QString getValue() const override; + void setValueImpl(const QString &value) override; ///@return the main widget of this combo of widgets - QWidget * getMainWidget() {return m_textbox; } + QWidget *getMainWidget() override { return m_textbox; } protected: /// Label (name of the property) diff --git a/MantidQt/API/inc/MantidQtAPI/UserSubWindow.h b/MantidQt/API/inc/MantidQtAPI/UserSubWindow.h index c6af6cf424acdfd24f36af90e92ca292a0d2f01f..5d191cf619e98a036b79fa5180dfbedd1e3cb73c 100644 --- a/MantidQt/API/inc/MantidQtAPI/UserSubWindow.h +++ b/MantidQt/API/inc/MantidQtAPI/UserSubWindow.h @@ -94,7 +94,7 @@ public: /// DefaultConstructor UserSubWindow(QWidget* parent = 0); /// Destructor - virtual ~UserSubWindow(); + ~UserSubWindow() override; /// Create the layout of the widget. Can only be called once. void initializeLayout(); /// Run local Python init code. Calls overridable function in specialized interface diff --git a/MantidQt/API/inc/MantidQtAPI/VatesViewerInterface.h b/MantidQt/API/inc/MantidQtAPI/VatesViewerInterface.h index d0aff750b83ac059d8e12a5d3091601d2d438b27..14829fda8e43799d8a4924ca6a8d1b5766821bbd 100644 --- a/MantidQt/API/inc/MantidQtAPI/VatesViewerInterface.h +++ b/MantidQt/API/inc/MantidQtAPI/VatesViewerInterface.h @@ -54,7 +54,7 @@ public: */ VatesViewerInterface(QWidget *parent); /// Default destructor. - virtual ~VatesViewerInterface(); + ~VatesViewerInterface() override; /** * Function to create the source from the given workspace. * @param workspaceName the name of the workspace to visualize diff --git a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h index 7fa049722408b4433241af5a12741eafa1d0072b..549da7a97f3c3ff960a1e0481345e291885fee33 100644 --- a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h +++ b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h @@ -56,11 +56,11 @@ public: /// Constructor LoadAsciiDialog(QWidget *parent = 0); /// Destruktor - ~LoadAsciiDialog(); + ~LoadAsciiDialog() override; protected: /// This does the work and must be overridden in each deriving class - void initLayout(); + void initLayout() override; protected slots: void browseClicked(); diff --git a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadDAEDialog.h b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadDAEDialog.h index 5aa35e68dce3c9e1462cde6b52ba084754a00d55..0bfef5d0fda4947826e917cd4c0ed0deeb36b37a 100644 --- a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadDAEDialog.h +++ b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadDAEDialog.h @@ -56,11 +56,11 @@ public: /// Constructor LoadDAEDialog(QWidget *parent = 0); /// Destruktor - ~LoadDAEDialog(); + ~LoadDAEDialog() override; protected: /// This does the work and must be overridden in each deriving class - void initLayout(); + void initLayout() override; private: /* GUI components */ diff --git a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadRawDialog.h b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadRawDialog.h index fbd4e6b170b0eb40b4518bd72258975a7fec7e10..b68a321a0fd7843b6c137078066b8d21f6db892e 100644 --- a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadRawDialog.h +++ b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadRawDialog.h @@ -57,14 +57,14 @@ public: /// Constructor LoadRawDialog(QWidget *parent = 0); ///Destructor - ~LoadRawDialog(); + ~LoadRawDialog() override; private: /** @name Virtual functions. */ //@{ /// Create the layout - void initLayout(); + void initLayout() override; //@} private slots: diff --git a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/MantidGLWidget.h b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/MantidGLWidget.h index f78715ad70a5d9e7e291f013c75e1263bb0cd413..da4336564c415240ddf0a63adfba44bf4f0a4de0 100644 --- a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/MantidGLWidget.h +++ b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/MantidGLWidget.h @@ -61,18 +61,18 @@ public: ///Default constructor MantidGLWidget(QWidget *parent = 0); ///Destructor - ~MantidGLWidget(); - + ~MantidGLWidget() override; + /// Set the Mantid geometry object void setDisplayObject(boost::shared_ptr<Mantid::Geometry::Object> object); protected: /// Initialize the renderer - void initializeGL(); + void initializeGL() override; /// Set up the viewport - void resizeGL(int width, int height); + void resizeGL(int width, int height) override; /// Render the scene - void paintGL(); + void paintGL() override; private: /// Set the rotation angle around the X-axis @@ -88,9 +88,9 @@ private: /// Ensure the angle is in the range 0 < angle < 360 void normalizeAngle(int *angle); /// Handle a MousePressEvent - void mousePressEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent *event) override; /// Handle a MouseMoveEvent - void mouseMoveEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event) override; /// A Mantid geometry object boost::shared_ptr<Mantid::Geometry::Object> m_display_object; /// The current X, Y and Z rotations diff --git a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SampleShapeHelpers.h b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SampleShapeHelpers.h index a83e99cb3bcba6f67e08876855e0a3ab96bddd38..bd2f72bd861302b02ea33e04bd9c0d9ca6d87371 100644 --- a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SampleShapeHelpers.h +++ b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SampleShapeHelpers.h @@ -106,8 +106,7 @@ struct ShapeDetailsInstantiator : public BaseInstantiator /// Default constructor ShapeDetailsInstantiator() {} ///Create an instance of this type - ShapeDetails* createInstance() const - { + ShapeDetails *createInstance() const override { return static_cast<ShapeDetails*>(new T); } @@ -129,7 +128,7 @@ public: ///Constructor ShapeDetails(QWidget *parent = 0) : QWidget(parent), m_idvalue(""), m_isComplement(false) {} ///Constructor - virtual ~ShapeDetails() {} + ~ShapeDetails() override {} ///Write out the XML definition for this shape virtual QString writeXML() const = 0; @@ -178,10 +177,10 @@ public: SphereDetails(QWidget *parent = 0); ///Default destructor - ~SphereDetails() { --g_nspheres; } + ~SphereDetails() override { --g_nspheres; } //Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Line edit for radius value @@ -208,10 +207,10 @@ public: CylinderDetails(QWidget *parent = 0); ///Default destructor - ~CylinderDetails() { --g_ncylinders; } + ~CylinderDetails() override { --g_ncylinders; } //Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Line edits to enter values @@ -238,10 +237,10 @@ public: InfiniteCylinderDetails(QWidget *parent = 0); ///Default destructor - ~InfiniteCylinderDetails() { --g_ninfcyls; } + ~InfiniteCylinderDetails() override { --g_ninfcyls; } //Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Line edits to enter values @@ -268,10 +267,10 @@ public: SliceOfCylinderRingDetails(QWidget *parent = 0); ///Default destructor - ~SliceOfCylinderRingDetails() { --g_ncylrings; } + ~SliceOfCylinderRingDetails() override { --g_ncylrings; } /// Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Line edits to enter values @@ -296,10 +295,10 @@ public: ConeDetails(QWidget *parent = 0); ///Default destructor - ~ConeDetails() { --g_ncones; } + ~ConeDetails() override { --g_ncones; } /// Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Line edits to enter values @@ -326,10 +325,10 @@ public: InfiniteConeDetails(QWidget *parent = 0); ///Default destructor - ~InfiniteConeDetails() { --g_ninfcones; } + ~InfiniteConeDetails() override { --g_ninfcones; } /// Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Line edits to enter values @@ -354,10 +353,10 @@ public: InfinitePlaneDetails(QWidget *parent = 0); ///Default destructor - ~InfinitePlaneDetails() { --g_ninfplanes; } + ~InfinitePlaneDetails() override { --g_ninfplanes; } /// Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Centre and axis point boxes @@ -380,10 +379,10 @@ public: CuboidDetails(QWidget *parent = 0); ///Default destructor - ~CuboidDetails() { --g_ncuboids; } + ~CuboidDetails() override { --g_ncuboids; } /// Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Corner points @@ -406,10 +405,10 @@ public: HexahedronDetails(QWidget *parent = 0); ///Default destructor - ~HexahedronDetails() { --g_nhexahedrons; } + ~HexahedronDetails() override { --g_nhexahedrons; } /// Write the XML definition of a sphere - QString writeXML() const; + QString writeXML() const override; private: /// Corner points diff --git a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SmoothNeighboursDialog.h b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SmoothNeighboursDialog.h index d65e1565d8e3de868253e2ec66003645004b9dcb..4d16c9b3cce63f4328b3d61378cb79acbb015075 100644 --- a/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SmoothNeighboursDialog.h +++ b/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/SmoothNeighboursDialog.h @@ -16,7 +16,7 @@ public: protected: /// Overridden to enable validators - void accept(); + void accept() override; private slots: /// Called when input workspace get changed @@ -31,7 +31,7 @@ private: static const QString INPUT_WORKSPACE; /// Initialize the layout - void initLayout(); + void initLayout() override; /// Widget for all the PropertyWidgets AlgorithmPropertiesWidget* m_propertiesWidget; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Background.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Background.h index 3ec93c55baf6f4db0e80f8e4457662ef499e0bac..a35a31c79cb62db9740fe4ab6f2a6b72f05a853c 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Background.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Background.h @@ -31,8 +31,8 @@ namespace MantidQt private: void initLayout(); - void showEvent(QShowEvent*); - void closeEvent(QCloseEvent*); + void showEvent(QShowEvent *) override; + void closeEvent(QCloseEvent *) override; bool sanityCheck(); private: diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h index 75ce51737e7282e16e171944f09f63b9c874b7b1..1b40072252bbe42194314a4c6f82373d7c593c71 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h @@ -58,9 +58,9 @@ class MANTIDQT_CUSTOMINTERFACES_DLL EnggDiffractionPresenter public: /// Default constructor - normally used from the concrete view EnggDiffractionPresenter(IEnggDiffractionView *view); - virtual ~EnggDiffractionPresenter(); + ~EnggDiffractionPresenter() override; - virtual void notify(IEnggDiffractionPresenter::Notification notif); + void notify(IEnggDiffractionPresenter::Notification notif) override; /// the calibration hard work that a worker / thread will run void doNewCalibration(const std::string &outFilename, diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CorrectionsTab.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CorrectionsTab.h index f6c1f418654737334aef03466a91dcf6ed1cc898..a87d142b402be6405c5e3a5f668387e0f5999b72 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CorrectionsTab.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CorrectionsTab.h @@ -74,11 +74,11 @@ namespace CustomInterfaces private: /// Overidden by child class. - virtual void setup() = 0; + void setup() override = 0; /// Overidden by child class. - virtual void run() = 0; + void run() override = 0; /// Overidden by child class. - virtual bool validate() = 0; + bool validate() override = 0; /// Overidden by child class. virtual void loadSettings(const QSettings & settings) = 0; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectBayesTab.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectBayesTab.h index b51bad1024d6df5abe17974a97a8b4ad3043cfd8..3aea9d284196143144b16dcaf781262a55a47c25 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectBayesTab.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectBayesTab.h @@ -78,7 +78,7 @@ class DLLExport IndirectBayesTab : public IndirectTab { public: IndirectBayesTab(QWidget *parent = 0); - ~IndirectBayesTab(); + ~IndirectBayesTab() override; /// Base methods implemented in derived classes virtual void loadSettings(const QSettings &settings) = 0; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectSimulationTab.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectSimulationTab.h index 2fb6259959021a3a65d6fda4d902f1af46b5e697..1c246c33d8fbd893b74d9b308dddb4725cf80a42 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectSimulationTab.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectSimulationTab.h @@ -46,9 +46,9 @@ namespace MantidQt public: IndirectSimulationTab(QWidget * parent = 0); - ~IndirectSimulationTab(); + ~IndirectSimulationTab() override; - virtual void loadSettings(const QSettings& settings) = 0; + virtual void loadSettings(const QSettings& settings) = 0; }; } // namespace CustomInterfaces diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h index f9aba668947bbeedae26e1678eee6d60dc3646c0..639cd0dede31de13e33c3b444214cd6f1d553319 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectTab.h @@ -73,7 +73,7 @@ class DLLExport IndirectTab : public QObject { public: IndirectTab(QObject *parent = 0); - virtual ~IndirectTab(); + ~IndirectTab() override; public slots: void runTab(); diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectToolsTab.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectToolsTab.h index 0481a337b5a2dd0c528159f8c382fff4626ac68e..a651fdf45c77cabd1308106a76be7b4621c15600 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectToolsTab.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectToolsTab.h @@ -45,7 +45,7 @@ class DLLExport IndirectToolsTab : public IndirectTab { public: IndirectToolsTab(QWidget *parent = 0); - ~IndirectToolsTab(); + ~IndirectToolsTab() override; /// Base methods implemented in derived classes virtual void loadSettings(const QSettings &settings) = 0; @@ -55,9 +55,9 @@ signals: void executePythonScript(const QString &pyInput, bool output); protected: - virtual void setup() = 0; - virtual void run() = 0; - virtual bool validate() = 0; + void setup() override = 0; + void run() override = 0; + bool validate() override = 0; void runPythonScript(const QString &pyInput); }; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MultiDatasetFit/MDFLocalParameterEditor.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MultiDatasetFit/MDFLocalParameterEditor.h index d942482e27e01a744ce3b31669a2a00b742ca856..3cd1c0b01ea86c9bea6ee85a322d7abc3b1f168b 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MultiDatasetFit/MDFLocalParameterEditor.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MultiDatasetFit/MDFLocalParameterEditor.h @@ -41,7 +41,7 @@ private slots: void setTieAll(); void removeAllTies(); private: - bool eventFilter(QObject *widget, QEvent *evn); + bool eventFilter(QObject *widget, QEvent *evn) override; void setEditorState(); static QString setTieDialog(QString tie); QLineEdit* m_editor; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCBaselineModellingModel.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCBaselineModellingModel.h index d309b79e32c23789b7aa681cd280848cbb92b44f..32e7595260517148f091f61f540d5b7a59c5be9b 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCBaselineModellingModel.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCBaselineModellingModel.h @@ -40,13 +40,16 @@ namespace CustomInterfaces public: // -- IALCBaselineModellingModel interface ----------------------------------------------------- - MatrixWorkspace_const_sptr data() const; + MatrixWorkspace_const_sptr data() const override; - void fit(IFunction_const_sptr function, const std::vector<Section> §ions); + void fit(IFunction_const_sptr function, + const std::vector<Section> §ions) override; - IFunction_const_sptr fittedFunction() const { return m_fittedFunction; } + IFunction_const_sptr fittedFunction() const override { + return m_fittedFunction; + } - MatrixWorkspace_const_sptr correctedData() const; + MatrixWorkspace_const_sptr correctedData() const override; ITableWorkspace_sptr parameterTable() const { return m_parameterTable; } diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCPeakFittingModel.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCPeakFittingModel.h index f747333e0a2b87fe9c58105a3dfcd5c32724c8cb..710397861b3b3fcd8ac416e3948d3a21e7c2dce5 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCPeakFittingModel.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/ALCPeakFittingModel.h @@ -40,11 +40,11 @@ namespace CustomInterfaces { public: // -- IALCPeakFittingModel interface ----------------------------------------------------------- - IFunction_const_sptr fittedPeaks() const { return m_fittedPeaks; } - MatrixWorkspace_const_sptr data() const { return m_data; } + IFunction_const_sptr fittedPeaks() const override { return m_fittedPeaks; } + MatrixWorkspace_const_sptr data() const override { return m_data; } ITableWorkspace_sptr parameterTable() const { return m_parameterTable; } - void fitPeaks(IFunction_const_sptr peaks); + void fitPeaks(IFunction_const_sptr peaks) override; // -- End of IALCPeakFittingModel interface ---------------------------------------------------- /// Update the data diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisHelper.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisHelper.h index 79948118c2aff13b51c22123f8af83d30994e701..5dcacddccc65eb645bb6411847d3da02c3052ccd 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisHelper.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisHelper.h @@ -123,8 +123,7 @@ public: {} // See QValidator - virtual QValidator::State validate(QString& input, int& pos) const - { + QValidator::State validate(QString &input, int &pos) const override { if (input.isEmpty()) return QValidator::Acceptable; else diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/QReflTableModel.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/QReflTableModel.h index e1354659f5f53066428da139d03f56be442eae15..83aef0625544e95f60e579c6cff5d6dc51540ecb 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/QReflTableModel.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/QReflTableModel.h @@ -43,24 +43,30 @@ namespace MantidQt Q_OBJECT public: QReflTableModel(Mantid::API::ITableWorkspace_sptr tableWorkspace); - virtual ~QReflTableModel(); + ~QReflTableModel() override; //emit a signal saying things have changed void update(); //row and column counts - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; //get data fro a cell - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex &index, + int role = Qt::DisplayRole) const override; //get header data for the table - QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; //get flags for a cell - Qt::ItemFlags flags(const QModelIndex &index) const; + Qt::ItemFlags flags(const QModelIndex &index) const override; //change or add data to the model - bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + bool setData(const QModelIndex &index, const QVariant &value, + int role = Qt::EditRole) override; //add new rows to the model - bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()); + bool insertRows(int row, int count, + const QModelIndex &parent = QModelIndex()) override; //remove rows from the model - bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows(int row, int count, + const QModelIndex &parent = QModelIndex()) override; + private: //cache for a row's data diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflCatalogSearcher.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflCatalogSearcher.h index 9889f1abdb2ca02de932002fde737e4dc12bd948..84beae2e32f81f0e2e44a354182539036f2c72f8 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflCatalogSearcher.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflCatalogSearcher.h @@ -34,8 +34,9 @@ namespace MantidQt class ReflCatalogSearcher : public IReflSearcher { public: - virtual ~ReflCatalogSearcher() {}; - Mantid::API::ITableWorkspace_sptr search(const std::string &text); + ~ReflCatalogSearcher() override{}; + Mantid::API::ITableWorkspace_sptr + search(const std::string &text) override; }; } } diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflLegacyTransferStrategy.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflLegacyTransferStrategy.h index 694e72e3c106b73326efc0ba980b736765789d8f..63643c17a2f545d1b88a07341fc059bb5d47c974 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflLegacyTransferStrategy.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflLegacyTransferStrategy.h @@ -34,16 +34,16 @@ namespace MantidQt class DLLExport ReflLegacyTransferStrategy : public ReflTransferStrategy { public: - virtual TransferResults + TransferResults transferRuns(SearchResultMap &searchResults, - Mantid::Kernel::ProgressBase &progress); + Mantid::Kernel::ProgressBase &progress) override; std::unique_ptr<ReflLegacyTransferStrategy> clone() const; - virtual bool knownFileType(const std::string &filename) const; + bool knownFileType(const std::string &filename) const override; private: - virtual ReflLegacyTransferStrategy *doClone() const; + ReflLegacyTransferStrategy *doClone() const override; }; } } diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflMeasureTransferStrategy.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflMeasureTransferStrategy.h index 203aeb39587e45cbc7d471c54bb039a0d3470100..95ba40b52d7773791403acb55c4685ed8a9b3c4f 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflMeasureTransferStrategy.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflMeasureTransferStrategy.h @@ -56,18 +56,17 @@ public: ReflMeasureTransferStrategy(const ReflMeasureTransferStrategy &other); - virtual TransferResults - transferRuns(SearchResultMap &searchResults, - Mantid::Kernel::ProgressBase &progress); + TransferResults transferRuns(SearchResultMap &searchResults, + Mantid::Kernel::ProgressBase &progress) override; std::unique_ptr<ReflMeasureTransferStrategy> clone() const; - virtual bool knownFileType(const std::string &filename) const; + bool knownFileType(const std::string &filename) const override; - virtual ~ReflMeasureTransferStrategy(); + ~ReflMeasureTransferStrategy() override; private: - virtual ReflMeasureTransferStrategy *doClone() const; + ReflMeasureTransferStrategy *doClone() const override; /// Catalog information needed for transformations std::unique_ptr<Mantid::Kernel::ICatalogInfo> m_catInfo; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflNexusMeasurementItemSource.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflNexusMeasurementItemSource.h index 20b26504581ae69991f19c72ee0ea7290847b0d4..d70c458a7486fef0f9841c1f40b6bfd86b96559c 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflNexusMeasurementItemSource.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflNexusMeasurementItemSource.h @@ -37,12 +37,11 @@ namespace CustomInterfaces { class MANTIDQT_CUSTOMINTERFACES_DLL ReflNexusMeasurementItemSource : public ReflMeasurementItemSource { public: ReflNexusMeasurementItemSource(); - virtual MeasurementItem obtain(const std::string &definedPath, - const std::string &fuzzyName) const; + MeasurementItem obtain(const std::string &definedPath, + const std::string &fuzzyName) const override; /// Virtual destructor - virtual ReflNexusMeasurementItemSource *clone() const; - virtual ~ReflNexusMeasurementItemSource(); - + ReflNexusMeasurementItemSource *clone() const override; + ~ReflNexusMeasurementItemSource() override; }; } // namespace CustomInterfaces diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflSearchModel.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflSearchModel.h index 5cfd9857d9bb8db5099e34361a8e3be08f4348de..7bda5bc31ed14789e6299ea49d20e98e63acd903 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflSearchModel.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Reflectometry/ReflSearchModel.h @@ -43,16 +43,18 @@ public: ReflSearchModel(const ReflTransferStrategy &transferMethod, Mantid::API::ITableWorkspace_sptr tableWorkspace, const std::string &instrument); - virtual ~ReflSearchModel(); + ~ReflSearchModel() override; // row and column counts - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; // get data from a cell - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex &index, + int role = Qt::DisplayRole) const override; // get header data for the table - QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; // get flags for a cell - Qt::ItemFlags flags(const QModelIndex &index) const; + Qt::ItemFlags flags(const QModelIndex &index) const override; /// maps each run number to why it was unusable in the process table std::vector<std::map<std::string, std::string>> m_errors; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ImageROIPresenter.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ImageROIPresenter.h index 7aaeac9147ec95b82725d83a6b0bef36ccac27ae..ef2b537b3c8e4939d99a3eb1c5167988da038dbb 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ImageROIPresenter.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ImageROIPresenter.h @@ -44,9 +44,9 @@ class DLLExport ImageROIPresenter : public IImageROIPresenter { public: /// Default constructor - normally used from the concrete view ImageROIPresenter(IImageROIView *view); - virtual ~ImageROIPresenter(); + ~ImageROIPresenter() override; - void notify(IImageROIPresenter::Notification notif); + void notify(IImageROIPresenter::Notification notif) override; protected: void initialize(); diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/TomographyIfacePresenter.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/TomographyIfacePresenter.h index 712304b5771c84b17a3e60edc462d26f8280089b..b799bb19425faea3d9a04ad346b7223d0fcacc75 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/TomographyIfacePresenter.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/TomographyIfacePresenter.h @@ -53,9 +53,9 @@ class MANTIDQT_CUSTOMINTERFACES_DLL TomographyIfacePresenter public: /// Default constructor - normally used from the concrete view TomographyIfacePresenter(ITomographyIfaceView *view); - virtual ~TomographyIfacePresenter(); + ~TomographyIfacePresenter() override; - virtual void notify(ITomographyIfacePresenter::Notification notif); + void notify(ITomographyIfacePresenter::Notification notif) override; protected: void initialize(); diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigAstraToolbox.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigAstraToolbox.h index f5b9ba9dac6eeda61bf3dbbb4074f14656dad670..233947c42c7bbb62b438e7522827474813d20614 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigAstraToolbox.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigAstraToolbox.h @@ -47,7 +47,7 @@ public: const std::string &pathOpen, const std::string &pathSample); - ~ToolConfigAstraToolbox() {} + ~ToolConfigAstraToolbox() override {} // gives the list of methods (reconstruction algorithms) available static const std::vector<std::pair<std::string, std::string>> methods() { @@ -55,9 +55,9 @@ public: } protected: - virtual std::string makeCmdLineOptions() const; + std::string makeCmdLineOptions() const override; - virtual std::string makeExecutable() const { return m_runnable; }; + std::string makeExecutable() const override { return m_runnable; }; private: static const std::vector<std::pair<std::string, std::string>> g_astraMethods; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigCustom.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigCustom.h index 98c947dc793a6e7fed3e9f3297e0fe1da67ea057..e1409bb0fede7927cf1f83b0df6c098172b563eb 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigCustom.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigCustom.h @@ -46,12 +46,12 @@ public: ToolConfigCustom(const std::string &runnable, const std::string &cmdOptions) : TomoRecToolConfig(runnable), m_opts(cmdOptions) {} - ~ToolConfigCustom() {} + ~ToolConfigCustom() override {} protected: - virtual std::string makeCmdLineOptions() const { return m_opts; } + std::string makeCmdLineOptions() const override { return m_opts; } - virtual std::string makeExecutable() const { return m_runnable; }; + std::string makeExecutable() const override { return m_runnable; }; private: std::string m_opts; diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigTomoPy.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigTomoPy.h index cd6f115047cbaad20d554c08d26813920beb2a1f..febc98d72fc11a19b3136e703c237c6a31e79259 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigTomoPy.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Tomography/ToolConfigTomoPy.h @@ -44,7 +44,7 @@ public: const std::string &pathDark, const std::string &pathOpen, const std::string &pathSample); - ~ToolConfigTomoPy() {} + ~ToolConfigTomoPy() override {} // gives the list of methods (reconstruction algorithms) available static const std::vector<std::pair<std::string, std::string>> methods() { @@ -52,9 +52,9 @@ public: } protected: - virtual std::string makeCmdLineOptions() const; + std::string makeCmdLineOptions() const override; - virtual std::string makeExecutable() const { return m_runnable; }; + std::string makeExecutable() const override { return m_runnable; }; private: static const std::vector<std::pair<std::string, std::string>> g_tomopyMethods; diff --git a/MantidQt/DesignerPlugins/inc/MantidQtDesignerPlugins/DesignerPlugin.h b/MantidQt/DesignerPlugins/inc/MantidQtDesignerPlugins/DesignerPlugin.h index f2b0ce624fbb98aa11651d2378a3cbef6fd471ec..1c3b7837b2d73f138d5e2569b8611d5e3493ea5b 100644 --- a/MantidQt/DesignerPlugins/inc/MantidQtDesignerPlugins/DesignerPlugin.h +++ b/MantidQt/DesignerPlugins/inc/MantidQtDesignerPlugins/DesignerPlugin.h @@ -37,34 +37,33 @@ public: // ==== Methods you must overridde ========== /// Returns a pointer to a newly constructed widget for this plugin wraps - virtual QWidget *createWidget(QWidget *parent) = 0; + QWidget *createWidget(QWidget *parent) override = 0; /// Returns the fully-qualified class name - virtual QString name() const = 0; + QString name() const override = 0; // ==== Optionally overridden methods ========== /// Returns a tool tip for the widget - virtual QString toolTip() const; + QString toolTip() const override; /// Returns the include file that appears at the top of the generated .h file - virtual QString includeFile() const; + QString includeFile() const override; /// Returns the XML that defines the widget and its properties - virtual QString domXml() const; - + QString domXml() const override; /// Default constructor DesignerPlugin(QObject *parent = 0); /// Initialize the plugin - void initialize(QDesignerFormEditorInterface *core); + void initialize(QDesignerFormEditorInterface *core) override; /// Returns if the plugin is initliaized - bool isInitialized() const; + bool isInitialized() const override; /// Returns if this plugins is able to contain other widgets - bool isContainer() const; + bool isContainer() const override; /// Returns the group name within the designer - QString group() const; + QString group() const override; /// Returns the icon to use - QIcon icon() const; + QIcon icon() const override; /// Returns a short description of the widget - QString whatsThis() const; + QString whatsThis() const override; private: std::string getShortName() const; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/CheckboxHeader.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/CheckboxHeader.h index f882513975116d5c96d95c69ad3f41f69aa8ff24..87262f02f525ce525123f085d7f30d1652d21c02 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/CheckboxHeader.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/CheckboxHeader.h @@ -52,9 +52,10 @@ namespace MantidQt protected: /// Overrides QHeaderView allowing checkbox functionality in the first column of the table. - void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const; + void paintSection(QPainter *painter, const QRect &rect, + int logicalIndex) const override; /// Set the checkbox to checked when it is clicked. - void mousePressEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent *event) override; private: /// The area around the checkbox. diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DiagResults.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DiagResults.h index 652275f8e6529c727e5a93552a1bd0878af50b94..6ffea10d0f754e5dd909730fd84e3992c50df41d 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DiagResults.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DiagResults.h @@ -27,7 +27,7 @@ namespace MantidQt private: void updateRow(int row, QString text); int addRow(QString firstColumn, QString secondColumn); - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent *event) override; private: /// the layout that widgets are added to diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DoubleDialogEditor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DoubleDialogEditor.h index c73cb58aa1eaef07482be287d1cfd9d4cf3e1ff0..77c1a6938ffc05b7d2bcf76fd8c4c6fa10f4a932 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DoubleDialogEditor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DoubleDialogEditor.h @@ -29,7 +29,7 @@ protected slots: void setText(const QString& txt); QString getText()const; private: - bool eventFilter(QObject*, QEvent*); + bool eventFilter(QObject *, QEvent *) override; DoubleEditor* m_editor; QPushButton* m_button; QtProperty* m_property; @@ -46,8 +46,9 @@ class DoubleDialogEditorFactory : public QtAbstractEditorFactory<ParameterProper Q_OBJECT public: DoubleDialogEditorFactory(QObject *parent = 0) : QtAbstractEditorFactory<ParameterPropertyManager>(parent) {} - QWidget *createEditorForManager(ParameterPropertyManager *, QtProperty *property, QWidget *parent) - { + QWidget *createEditorForManager(ParameterPropertyManager *, + QtProperty *property, + QWidget *parent) override { auto editor = new DoubleDialogEditor(property, parent); connect(editor, SIGNAL(buttonClicked(QtProperty*)), this, SIGNAL(buttonClicked(QtProperty*))); connect(editor, SIGNAL(closeEditor()), this, SIGNAL(closeEditor()), Qt::QueuedConnection); @@ -57,8 +58,8 @@ signals: void buttonClicked(QtProperty*); void closeEditor(); protected: - void connectPropertyManager(ParameterPropertyManager*) {} - void disconnectPropertyManager(ParameterPropertyManager*) {} + void connectPropertyManager(ParameterPropertyManager *) override {} + void disconnectPropertyManager(ParameterPropertyManager *) override {} }; #endif // DOUBLEDIALOGEDITORFACTORY_H diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FilenameDialogEditor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FilenameDialogEditor.h index 0613f40822eebbb54cc34c96f5705bae2026d266..b32fe15ee35efefdfb20c8c3a94264146c3638a5 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FilenameDialogEditor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FilenameDialogEditor.h @@ -18,7 +18,7 @@ public: FilenameDialogEditor(QtProperty *property, QWidget *parent) :StringDialogEditor(property,parent){} protected slots: - void runDialog(); + void runDialog() override; }; /** @@ -31,8 +31,9 @@ public: FilenameDialogEditorFactory(QObject* parent):StringDialogEditorFactory(parent){} protected: using QtAbstractEditorFactoryBase::createEditor; // Avoid Intel compiler warning - QWidget *createEditorForManager(QtStringPropertyManager *manager, QtProperty *property,QWidget *parent) - { + QWidget *createEditorForManager(QtStringPropertyManager *manager, + QtProperty *property, + QWidget *parent) override { (void) manager; //Avoid unused warning return new FilenameDialogEditor(property,parent); } diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FindReplaceDialog.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FindReplaceDialog.h index 2bb7e510c5ee30dc4a07b7bc787aa74d09ad5550..62cfd5feb1c171b554b77d43265a5980f368a16a 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FindReplaceDialog.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FindReplaceDialog.h @@ -58,7 +58,7 @@ protected slots: private: /// Called when the widget is shown - void showEvent (QShowEvent * event); + void showEvent(QShowEvent *event) override; /// The text editor we are working on ScriptEditor *m_editor; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/HintingLineEdit.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/HintingLineEdit.h index 5a07b3673260f9bf6f9b65190b5bffd74e33319e..899b1a0067bfe78e0f3edc1d80ac0884eb43186d 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/HintingLineEdit.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/HintingLineEdit.h @@ -43,9 +43,10 @@ namespace MantidQt Q_OBJECT public: HintingLineEdit(QWidget *parent, const std::map<std::string,std::string> &hints); - virtual ~HintingLineEdit(); + ~HintingLineEdit() override; + protected: - virtual void keyPressEvent(QKeyEvent* e); + void keyPressEvent(QKeyEvent *e) override; void updateMatches(); void showToolTip(); void insertSuggestion(); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InputController.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InputController.h index 7d9e9547ac954f6f44286ed5227efabd958fe6d9..b8a0bd3aa0fe6205d3865547a497fed228527883 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InputController.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InputController.h @@ -32,7 +32,7 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputController : public QObject { Q_OBJECT public: explicit InputController(QObject *parent, bool contextAllowed = true); - virtual ~InputController(){} + ~InputController() override {} virtual void mousePressEvent(QMouseEvent *) {} virtual void mouseMoveEvent(QMouseEvent *) {} @@ -72,10 +72,10 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputController3DMove : public InputCont public: InputController3DMove(QObject *parent); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void wheelEvent(QWheelEvent *) override; signals: /// Init zooming. x and y is the zoom starting point on the screen. @@ -107,9 +107,9 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputControllerPick : public InputContro public: InputControllerPick(QObject *parent); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; signals: void pickPointAt(int, int); @@ -130,11 +130,11 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputControllerDrawShape : public InputC public: InputControllerDrawShape(QObject *parent); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void keyPressEvent(QKeyEvent *); - virtual void leaveEvent(QEvent *); + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void keyPressEvent(QKeyEvent *) override; + void leaveEvent(QEvent *) override; signals: /// Deselect all selected shapes @@ -165,7 +165,7 @@ signals: public slots: void startCreatingShape2D(const QString &type, const QColor &borderColor, const QColor &fillColor); - void onDisabled(); + void onDisabled() override; private: bool m_creating; ///< a shape is being created with a mouse @@ -184,9 +184,9 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputControllerMoveUnwrapped : public In public: InputControllerMoveUnwrapped(QObject *parent); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; signals: void setSelectionRect(const QRect &); @@ -206,14 +206,14 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputControllerDraw : public InputContro public: InputControllerDraw(QObject *parent); - ~InputControllerDraw(); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); + ~InputControllerDraw() override; + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void wheelEvent(QWheelEvent *) override; - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + void enterEvent(QEvent *) override; + void leaveEvent(QEvent *) override; protected: int cursorSize() const {return m_size;} @@ -245,17 +245,17 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS InputControllerErase : public InputContr public: InputControllerErase(QObject *parent); - ~InputControllerErase(); - void onPaint(QPainter &); + ~InputControllerErase() override; + void onPaint(QPainter &) override; signals: void erase(const QRect &); private: - void drawCursor(QPixmap *cursor); - void signalLeftClick(); - void setPosition(const QPoint &pos); - void resize(); + void drawCursor(QPixmap *cursor) override; + void signalLeftClick() override; + void setPosition(const QPoint &pos) override; + void resize() override; QRect m_rect; QPixmap *m_image; @@ -280,11 +280,11 @@ public slots: void startCreatingShape2D(const QColor &borderColor, const QColor &fillColor); private: - void drawCursor(QPixmap *cursor); - void signalLeftClick(); - void signalRightClick(); - void setPosition(const QPoint &pos); - void resize(); + void drawCursor(QPixmap *cursor) override; + void signalLeftClick() override; + void signalRightClick() override; + void setPosition(const QPoint &pos) override; + void resize() override; void makePolygon(); QPoint m_pos; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentSelector.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentSelector.h index cec0ccf1d95fd0d9444c39f47016c097fd806388..336814917b043f0583f233fdf5e72a270c68dd4c 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentSelector.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentSelector.h @@ -62,7 +62,7 @@ namespace MantidQt /// Default Constructor InstrumentSelector(QWidget *parent = NULL, bool init = true); /// Destructor - virtual ~InstrumentSelector(); + ~InstrumentSelector() override; /// Return the list of techniques QStringList getTechniques() const; /// Set the list of techniques diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/BinDialog.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/BinDialog.h index 8ed9fd5da1f276577a9ac9350d14afeea9ec28c7..7ce6183517c6a8c5deefb6078ddcb16d36a7454e 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/BinDialog.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/BinDialog.h @@ -50,8 +50,8 @@ namespace MantidQt public: explicit BinDialog(QWidget *parent = 0); - ~BinDialog(); - void setIntegralMinMax(double, double, bool); + ~BinDialog() override; + void setIntegralMinMax(double, double, bool); signals: /// This signal is sent when changing the bin range selected. /// Parameters are: min, max, and a bool set to true to mean "everything" diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CollapsiblePanel.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CollapsiblePanel.h index bc4d4a1b33511a9077f348540412e8233c8d4b00..da98b97083613adb015ea54174a2d82e7977f7d8 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CollapsiblePanel.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CollapsiblePanel.h @@ -15,9 +15,9 @@ namespace MantidQt Q_OBJECT public: CaptionLabel(const QString& caption, QWidget* parent); - void mousePressEvent(QMouseEvent* e); - void paintEvent(QPaintEvent *event); - bool isCollapsed()const { return m_collapsed; } + void mousePressEvent(QMouseEvent *e) override; + void paintEvent(QPaintEvent *event) override; + bool isCollapsed()const { return m_collapsed; } void collapse(); void expand(); signals: diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ColorMapWidget.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ColorMapWidget.h index cc8ad14fa416b14cbcea9e4ab6719f79aa6fc75c..68bf489a4bce0f28fc050b9ba36866004bb946c3 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ColorMapWidget.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ColorMapWidget.h @@ -40,10 +40,10 @@ namespace MantidQt void maxValueChanged(double); void nthPowerChanged(double); protected: - void mousePressEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent*); - void updateScale(); + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void updateScale(); void setMinValueText(double); void setMaxValueText(double); private slots: diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CompAssemblyActor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CompAssemblyActor.h index 711c3dab88ed3c5b65e8db96669771b0ceedc756..ac12bc79782fb96b3e264c4766dd19e1ab4a7924 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CompAssemblyActor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/CompAssemblyActor.h @@ -61,16 +61,24 @@ namespace MantidQt { public: CompAssemblyActor(const InstrumentActor &instrActor, const Mantid::Geometry::ComponentID &compID); ///< Constructor - virtual ~CompAssemblyActor(); - virtual std::string type()const { return "CompAssemblyActor"; } ///< Type of the GL object - virtual void draw(bool picking = false)const; ///< Method that defines ObjComponent geometry. Calls ObjComponent draw method - void setChildVisibility(bool); - bool hasChildVisible() const; - bool accept(GLActorVisitor& visitor, VisitorAcceptRule rule = VisitAll); - bool accept(GLActorConstVisitor& visitor, VisitorAcceptRule rule = VisitAll)const; - virtual void setColors(); - - protected: + ~CompAssemblyActor() override; + std::string type() const override { + return "CompAssemblyActor"; + } ///< Type of the GL object + void draw(bool picking = false) + const override; ///< Method that defines + ///ObjComponent geometry. Calls + ///ObjComponent draw method + void setChildVisibility(bool) override; + bool hasChildVisible() const override; + bool accept(GLActorVisitor &visitor, + VisitorAcceptRule rule = VisitAll) override; + bool accept( + GLActorConstVisitor &visitor, + 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 private: diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ICompAssemblyActor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ICompAssemblyActor.h index 81a6034e6eaf55509fe98095a9366e4028505fd7..e915f3ef46224789bb3173aa893faf25159afb06 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ICompAssemblyActor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ICompAssemblyActor.h @@ -62,10 +62,14 @@ namespace MantidQt { public: ICompAssemblyActor(const InstrumentActor &instrActor, const Mantid::Geometry::ComponentID &compID); ///< Constructor - void getBoundingBox(Mantid::Kernel::V3D& minBound, Mantid::Kernel::V3D& maxBound)const; - - virtual std::string type()const { return "ICompAssemblyActor"; } ///< Type of the GL object - int getNumberOfDetectors() const { return mNumberOfDetectors; } + void getBoundingBox( + Mantid::Kernel::V3D &minBound, + Mantid::Kernel::V3D &maxBound) const override; + + std::string type() const override { + return "ICompAssemblyActor"; + } ///< Type of the GL object + int getNumberOfDetectors() const { return mNumberOfDetectors; } protected: int mNumberOfDetectors; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentTreeModel.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentTreeModel.h index 9c4cf49590176688214516cbd5200a64babea5f8..1e7c5b4b942672b4676eeaf5b52aaf87135cb05a 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentTreeModel.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentTreeModel.h @@ -27,17 +27,26 @@ namespace MantidQt Q_OBJECT public: InstrumentTreeModel(const InstrumentActor*, QObject *parent); - ~InstrumentTreeModel(); - - QVariant data(const QModelIndex &index, int role) const; - Qt::ItemFlags flags(const QModelIndex &index) const; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &index) const; - int rowCount(const QModelIndex &paren = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; - - private: + ~InstrumentTreeModel() override; + + QVariant data(const QModelIndex &index, + int role) const override; + Qt::ItemFlags + flags(const QModelIndex &index) const override; + QVariant + headerData(int section, Qt::Orientation orientation, + int role = Qt::DisplayRole) const override; + QModelIndex index(int row, int column, + const QModelIndex &parent = + QModelIndex()) const override; + QModelIndex + parent(const QModelIndex &index) const override; + int rowCount(const QModelIndex &paren = + QModelIndex()) const override; + int columnCount(const QModelIndex &parent = + QModelIndex()) const override; + + private: const InstrumentActor *m_instrumentActor; ///< actor of instrument to which the model corresponds }; }//MantidWidgets diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetMaskTab.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetMaskTab.h index 8fff5a80a336be84cf05882fcb66044f0f953ec2..caebffde5163ee15f474e97757dac07534701b66 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetMaskTab.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetMaskTab.h @@ -64,8 +64,8 @@ namespace MantidQt enum Activity { Move, Select, DrawEllipse, DrawRectangle, DrawEllipticalRing, DrawRectangularRing, DrawFree }; explicit InstrumentWidgetMaskTab(InstrumentWidget *instrWidget); - void initSurface(); - void setMode(Mode mode); + void initSurface() override; + void setMode(Mode mode); void selectTool(Activity tool); signals: @@ -104,9 +104,9 @@ namespace MantidQt void doubleChanged(QtProperty*); protected: - void showEvent(QShowEvent *); + void showEvent(QShowEvent *) override; - void clearProperties(); + void clearProperties(); void setProperties(); boost::shared_ptr<Mantid::API::MatrixWorkspace> createMaskWorkspace(bool invertMask, bool temp = false); void saveMaskingToWorkspace(bool invertMask = false); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetPickTab.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetPickTab.h index 7c45c6a98d9563ce7561310b92dbc888dd819a6d..29b21b8bf56604a2b5e94c28fd0c4b315cfb0a9e 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetPickTab.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetPickTab.h @@ -57,11 +57,11 @@ namespace MantidQt explicit InstrumentWidgetPickTab(InstrumentWidget *instrWidget); bool canUpdateTouchedDetector()const; - void initSurface(); - void saveSettings(QSettings& settings) const; - void loadSettings(const QSettings& settings); - bool addToDisplayContextMenu(QMenu&) const; - void selectTool(const ToolType tool); + void initSurface() override; + void saveSettings(QSettings &settings) const override; + void loadSettings(const QSettings &settings) override; + bool addToDisplayContextMenu(QMenu &) const override; + void selectTool(const ToolType tool); boost::shared_ptr<ProjectionSurface> getSurface() const; public slots: @@ -82,8 +82,8 @@ namespace MantidQt void updatePlotMultipleDetectors(); void savePlotToWorkspace(); private: - void showEvent(QShowEvent *); - QColor getShapeBorderColor() const; + void showEvent(QShowEvent *) override; + QColor getShapeBorderColor() const; /* Pick tab controls */ OneCurvePlot* m_plot; ///< Miniplot to display data in the detectors diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetRenderTab.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetRenderTab.h index abe201e88ca8ceb82048965cd8570e554584d365..f52b27308d2299cbff339b6f1882f7ff63e59931 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetRenderTab.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetRenderTab.h @@ -34,11 +34,11 @@ namespace MantidQt public: explicit InstrumentWidgetRenderTab(InstrumentWidget *instrWindow); - ~InstrumentWidgetRenderTab(); - void initSurface(); - void saveSettings(QSettings&)const; - void loadSettings(const QSettings&); - void setupColorBarScaling(const MantidColorMap&, double); + ~InstrumentWidgetRenderTab() override; + 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 setAxis(const QString& axisName); @@ -78,8 +78,8 @@ namespace MantidQt void setUCorrection(); private: - void showEvent(QShowEvent *); - QMenu* createPeaksMenu(); + void showEvent(QShowEvent *) override; + QMenu* createPeaksMenu(); QFrame * setupAxisFrame(); void setPrecisionMenuItemChecked(int n); void enable3DSurface(bool on); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetTreeTab.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetTreeTab.h index f3a0529543f5e7c9712b2cb36c127b260c0310f3..43116d7bdd4f0b5ed15ef86644236fd0c87f5004 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetTreeTab.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/InstrumentWidgetTreeTab.h @@ -20,12 +20,12 @@ namespace MantidQt Q_OBJECT public: explicit InstrumentWidgetTreeTab(InstrumentWidget *instrWidget); - void initSurface(); - public slots: + void initSurface() override; + public slots: void selectComponentByName(const QString& name); private: - void showEvent(QShowEvent *); - /// Widget to display instrument tree + void showEvent(QShowEvent *) override; + /// Widget to display instrument tree InstrumentTreeWidget* m_instrumentTree; }; }//MantidWidgets diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ObjCompAssemblyActor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ObjCompAssemblyActor.h index 764985242a4ba9f7ce296ce1ea2f6413464a6a52..a59c296f257ebff5fa2752a3e691d57cd08c9874 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ObjCompAssemblyActor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/ObjCompAssemblyActor.h @@ -51,14 +51,24 @@ namespace MantidQt public: /// Constructor ObjCompAssemblyActor(const InstrumentActor& instrActor, Mantid::Geometry::ComponentID compID); - virtual ~ObjCompAssemblyActor(); ///< Destructor - virtual std::string type()const { return "ObjCompAssemblyActor"; } ///< Type of the GL object - virtual void draw(bool picking = false)const; ///< Method that defines ObjComponent geometry. Calls ObjComponent draw method - //virtual void getBoundingBox(Mantid::Kernel::V3D& minBound,Mantid::Kernel::V3D& maxBound)const; - virtual void setColors(); - bool accept(GLActorVisitor& visitor, VisitorAcceptRule rule = VisitAll); - bool accept(GLActorConstVisitor& visitor, VisitorAcceptRule rule = VisitAll)const; - private: + ~ObjCompAssemblyActor() override; ///< Destructor + std::string type() const override { + return "ObjCompAssemblyActor"; + } ///< Type of the GL object + void draw(bool picking = false) + const override; ///< Method that defines + ///ObjComponent geometry. Calls + ///ObjComponent draw method + // virtual void getBoundingBox(Mantid::Kernel::V3D& + // minBound,Mantid::Kernel::V3D& maxBound)const; + void setColors() override; + bool accept(GLActorVisitor &visitor, + VisitorAcceptRule rule = VisitAll) override; + bool accept( + 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; void setPickColors() const; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OneCurvePlot.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OneCurvePlot.h index dee36231795c17782c4cb0e358b6592871c0e925..ede3275afb503a86dd29afe5323bf65844f44a8c 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OneCurvePlot.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OneCurvePlot.h @@ -26,8 +26,8 @@ namespace MantidQt Q_OBJECT public: explicit OneCurvePlot(QWidget *parent); - ~OneCurvePlot(); - void setData(const double* x, const double* y, int dataSize, const std::string& xUnits = ""); + ~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 setYAxisLabelRotation(double degrees); @@ -55,11 +55,12 @@ namespace MantidQt void showContextMenu(); void clickedAt(double, double); protected: - void resizeEvent(QResizeEvent *e); - void contextMenuEvent(QContextMenuEvent *e); - void mousePressEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent*); - private: + void resizeEvent(QResizeEvent *e) override; + void contextMenuEvent(QContextMenuEvent *e) override; + void mousePressEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + + private: QwtPlotCurve* m_curve; QString m_label; ///< label to identify stored curve QwtPlotZoomer* m_zoomer; ///< does zooming @@ -79,10 +80,11 @@ namespace MantidQt m_marker(m), m_plot(plot) {} - void draw(QPainter *painter, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &canvasRect) const; - private: + void draw(QPainter *painter, const QwtScaleMap &xMap, + const QwtScaleMap &yMap, + const QRect &canvasRect) const override; + + private: const PeakMarker2D* m_marker; const OneCurvePlot* m_plot; }; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OpenGLError.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OpenGLError.h index 7cea91f5e8abdaad460fcfcd7c0d050e55e038f0..d4d8b1569859fcb9d6adb5635cd78ed02eb35cbd 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OpenGLError.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/OpenGLError.h @@ -15,9 +15,11 @@ namespace MantidQt { public: explicit OpenGLError(const std::string& msg) :m_msg(msg) {} - ~OpenGLError() throw() {} - const char * what() const throw() { return m_msg.c_str(); } - static bool check(const std::string& funName); + ~OpenGLError() throw() override {} + 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 std::ostream& logDebug(); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/PanelsSurface.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/PanelsSurface.h index c45157dee058365c73e7d72f170a20d51230ae5e..7b5467173ab562bc0892fed9411ad38583ac99b0 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/PanelsSurface.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/PanelsSurface.h @@ -50,14 +50,16 @@ namespace MantidQt PanelsSurface( const InstrumentActor *rootActor, const Mantid::Kernel::V3D &origin, const Mantid::Kernel::V3D &axis); - ~PanelsSurface(); - void init(); - void project(const Mantid::Kernel::V3D &, double &, double &, double &, double &) const; - - protected: - - void rotate(const UnwrappedDetector& udet, Mantid::Kernel::Quat& R)const; - //void drawCustom(QPainter *painter) const; + ~PanelsSurface() override; + void init() override; + void project(const Mantid::Kernel::V3D &, double &, + double &, double &, + double &) const override; + + protected: + void rotate(const UnwrappedDetector &udet, + Mantid::Kernel::Quat &R) const override; + //void drawCustom(QPainter *painter) const; // Setup the projection axes void setupAxes(); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/Projection3D.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/Projection3D.h index 3989c3369e41040564a2b1d26634e6b00c3449ca..4ab2b5c112e1e617f4b11124400c502b6ff9a3dc 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/Projection3D.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/Projection3D.h @@ -28,20 +28,22 @@ namespace MantidQt public: Projection3D(const InstrumentActor* rootActor, int winWidth, int winHeight); - ~Projection3D(); - virtual RectF getSurfaceBounds()const; + ~Projection3D() override; + RectF getSurfaceBounds() const override; - void setViewDirection(const QString& vd); + void setViewDirection(const QString& vd); void set3DAxesState(bool on); void setWireframe(bool on); - virtual void componentSelected(Mantid::Geometry::ComponentID = NULL); - virtual void getSelectedDetectors(QList<int>& dets); - virtual void getMaskedDetectors(QList<int>& dets)const; - virtual void resize(int, int); - virtual QString getInfoText()const; + void componentSelected( + Mantid::Geometry::ComponentID = NULL) override; + void getSelectedDetectors(QList<int> &dets) override; + void + getMaskedDetectors(QList<int> &dets) const override; + void resize(int, int) override; + QString getInfoText() const override; - signals: + signals: void finishedMove(); protected slots: @@ -55,11 +57,12 @@ namespace MantidQt void finishMove(); protected: - virtual void init() {} - virtual void drawSurface(MantidGLWidget* widget, bool picking = false)const; - virtual void changeColorMap(); + void init() override {} + void drawSurface(MantidGLWidget *widget, + bool picking = false) const override; + void changeColorMap() override; - void drawAxes(double axis_length = 100.0)const; + void drawAxes(double axis_length = 100.0)const; void setLightingModel(bool picking)const; bool m_drawAxes; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RectangularDetectorActor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RectangularDetectorActor.h index 67dce08db926774a7a39cd3d199f19e6644fe433..58f01ea096786f1bcd86feaf997ebbade810171e 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RectangularDetectorActor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RectangularDetectorActor.h @@ -60,9 +60,9 @@ namespace MantidQt /// Constructor RectangularDetectorActor(const InstrumentActor& instrActor, const Mantid::Geometry::ComponentID& compID); /// Destructor - virtual ~RectangularDetectorActor(); + ~RectangularDetectorActor() override; - private: + private: void AppendBoundingBox(const Mantid::Kernel::V3D& minBound, const Mantid::Kernel::V3D& maxBound); protected: @@ -75,16 +75,28 @@ namespace MantidQt virtual void initChilds(bool) {} public: - virtual std::string type()const { return "RectangularDetectorActor"; } ///< Type of the GL object - - void draw(bool picking = false)const; ///< Method that defines ObjComponent geometry. Calls ObjComponent draw method - void getBoundingBox(Mantid::Kernel::V3D& minBound, Mantid::Kernel::V3D& maxBound)const; - bool accept(GLActorVisitor& visitor, VisitorAcceptRule rule = VisitAll); - bool accept(GLActorConstVisitor& visitor, VisitorAcceptRule rule = VisitAll)const; - bool isChildDetector(const Mantid::Geometry::ComponentID& id) const; - virtual void setColors(); - - int genTexture(char * & image_data, std::vector<GLColor>& list, bool useDetectorIDs); + std::string type() const override { + return "RectangularDetectorActor"; + } ///< Type of the GL object + + void + draw(bool picking = false) const override; ///< Method that + ///defines + ///ObjComponent + ///geometry. Calls + ///ObjComponent + ///draw method + void + getBoundingBox(Mantid::Kernel::V3D &minBound, + Mantid::Kernel::V3D &maxBound) const override; + bool accept(GLActorVisitor &visitor, + VisitorAcceptRule rule = VisitAll) override; + bool accept(GLActorConstVisitor &visitor, + VisitorAcceptRule rule = VisitAll) const override; + bool isChildDetector(const Mantid::Geometry::ComponentID& id) const; + void setColors() override; + + int genTexture(char * & image_data, std::vector<GLColor>& list, bool useDetectorIDs); void uploadTexture(char * & image_data)const; private: diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RotationSurface.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RotationSurface.h index 8375c7322274a33d62ed6db181cf9b6542dbe60a..78036eeaed3a4f4f58f534b849d79f2f723c1050 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RotationSurface.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/RotationSurface.h @@ -16,8 +16,8 @@ namespace MantidQt { public: RotationSurface(const InstrumentActor* rootActor, const Mantid::Kernel::V3D& origin, const Mantid::Kernel::V3D& axis); - void init(); - // Get the value of the u-correction - a shift in the u-coord added to automatically determined uv coordinates + void init() override; + // Get the value of the u-correction - a shift in the u-coord added to automatically determined uv coordinates QPointF getUCorrection() const { return QPointF(m_u_min, m_u_max); } // Set new value for the u-correction void setUCorrection(double umin, double umax); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/SimpleWidget.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/SimpleWidget.h index 742c7883dbaf32a088b7a669c8dc43f762107bd4..816d63ebbe5aa235cde66ce427b1d1070b97fe95 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/SimpleWidget.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/SimpleWidget.h @@ -20,8 +20,8 @@ namespace MantidQt public: /// Constructor explicit SimpleWidget(QWidget *parent); - ~SimpleWidget(); - /// Assign a surface to draw on + ~SimpleWidget() override; + /// Assign a surface to draw on void setSurface(boost::shared_ptr<ProjectionSurface> surface); /// Return the surface boost::shared_ptr<ProjectionSurface> getSurface() { return m_surface; } @@ -32,16 +32,16 @@ namespace MantidQt /// Save the image into a file void saveToFile(const QString & filename); protected: - void paintEvent(QPaintEvent*); - void resizeEvent(QResizeEvent*); - void mousePressEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent*); - void wheelEvent(QWheelEvent*); - void keyPressEvent(QKeyEvent*); - void enterEvent(QEvent*); - void leaveEvent(QEvent*); - ///< The projection surface + void paintEvent(QPaintEvent *) override; + void resizeEvent(QResizeEvent *) override; + void mousePressEvent(QMouseEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mouseReleaseEvent(QMouseEvent *) override; + void wheelEvent(QWheelEvent *) override; + void keyPressEvent(QKeyEvent *) override; + void enterEvent(QEvent *) override; + void leaveEvent(QEvent *) override; + ///< The projection surface boost::shared_ptr<ProjectionSurface> m_surface; }; }//MantidWidgets diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UCorrectionDialog.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UCorrectionDialog.h index d0963a025c2a599a35e4a2c03a3cc0f3beddad36..2f069fbca2ece3cee93ce2c0df3658287c361eec 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UCorrectionDialog.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UCorrectionDialog.h @@ -17,9 +17,9 @@ namespace MantidQt Q_OBJECT public: UCorrectionDialog(QWidget *parent, QPointF oldValue, bool isManual); - ~UCorrectionDialog(); + ~UCorrectionDialog() override; - bool applyCorrection() const; + bool applyCorrection() const; QPointF getValue() const; private: diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedCylinder.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedCylinder.h index 567b089ff3f19f545edf9437027fc49908bfa349..25981ee233bfa58680708f48a5e96437d5653639 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedCylinder.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedCylinder.h @@ -19,9 +19,12 @@ namespace MantidQt const Mantid::Kernel::V3D &axis); protected: - void project(const Mantid::Kernel::V3D & pos, double & u, double & v, double & uscale, double & vscale) const; - void rotate(const UnwrappedDetector& udet, Mantid::Kernel::Quat& R)const; - }; + void project(const Mantid::Kernel::V3D &pos, double &u, + double &v, double &uscale, + double &vscale) const override; + void rotate(const UnwrappedDetector &udet, + Mantid::Kernel::Quat &R) const override; + }; }//MantidWidgets }//MantidQt diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSphere.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSphere.h index b0472824989f9997bec57bffa9b8c37c106d2d3f..39fc5c7084ca7a28e74521b721d012dca5a59045 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSphere.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSphere.h @@ -19,9 +19,12 @@ namespace MantidQt const Mantid::Kernel::V3D &axis); protected: - void rotate(const UnwrappedDetector& udet, Mantid::Kernel::Quat& R)const; - void project(const Mantid::Kernel::V3D & pos, double & u, double & v, double & uscale, double & vscale) const; - }; + void rotate(const UnwrappedDetector &udet, + Mantid::Kernel::Quat &R) const override; + void project(const Mantid::Kernel::V3D &pos, double &u, + double &v, double &uscale, + double &vscale) const override; + }; }//MantidWidgets }//MantidQt diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSurface.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSurface.h index ca18f376328f231bc9e5e7318c63ca3106320552..e3375a8d5e88bc741e0901da9bc3b92ce3af5b72 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSurface.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/UnwrappedSurface.h @@ -90,13 +90,15 @@ namespace MantidQt /** @name Implemented public virtual methods */ //@{ - void componentSelected(Mantid::Geometry::ComponentID = NULL); - void getSelectedDetectors(QList<int>& dets); - void getMaskedDetectors(QList<int>& dets)const; - void setPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace> pws); - QString getInfoText()const; - RectF getSurfaceBounds()const; - //@} + void componentSelected( + Mantid::Geometry::ComponentID = NULL) override; + void getSelectedDetectors(QList<int> &dets) override; + void + getMaskedDetectors(QList<int> &dets) const override; + void setPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace> pws); + QString getInfoText() const override; + RectF getSurfaceBounds() const override; + //@} /** @name New public virtual methods */ //@{ @@ -136,10 +138,12 @@ namespace MantidQt /** @name Implemented protected virtual methods */ //@{ - void drawSurface(MantidGLWidget* widget, bool picking = false)const; - void drawSimpleToImage(QImage* image, bool picking = false)const; - void changeColorMap(); - //@} + void drawSurface(MantidGLWidget *widget, + bool picking = false) const override; + void drawSimpleToImage(QImage *image, + bool picking = false) const override; + void changeColorMap() override; + //@} /** @name New protected virtual methods */ //@{ diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/XIntegrationControl.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/XIntegrationControl.h index 6c27f36b6d0fcb690f58b32088b09ea0c8935752..42a5b77fb651b1ba8eab1aca0bd4c561961dbda4 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/XIntegrationControl.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/InstrumentView/XIntegrationControl.h @@ -33,10 +33,10 @@ namespace MantidQt void changed(double, double); void running(double, double); protected: - void mouseMoveEvent(QMouseEvent * e); - void resizeEvent(QResizeEvent * e); - bool eventFilter(QObject *object, QEvent *e); - void updateMinMax(); + void mouseMoveEvent(QMouseEvent *e) override; + void resizeEvent(QResizeEvent *e) override; + bool eventFilter(QObject *object, QEvent *e) override; + void updateMinMax(); private: int m_resizeMargin; ///< distance from the left (or right) end of the slider within which it can be resized bool m_init; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MantidHelpWindow.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MantidHelpWindow.h index d3a6921200e0b0f60a9df260e97393d486248a5c..21a6fead2b61145024ebf6665f57fe45575186b1 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MantidHelpWindow.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MantidHelpWindow.h @@ -23,21 +23,22 @@ Q_OBJECT public: MantidHelpWindow(QWidget* parent=0, Qt::WindowFlags flags=0); - virtual ~MantidHelpWindow(); + ~MantidHelpWindow() override; - virtual void showPage(const std::string & url=std::string()); - virtual void showPage(const QString & url); - virtual void showPage(const QUrl & url); - virtual void showWikiPage(const std::string &page=std::string()); - virtual void showWikiPage(const QString &page); - virtual void showAlgorithm(const std::string &name=std::string(), const int version=-1); - virtual void showAlgorithm(const QString &name, const int version=-1); - virtual void showConcept(const std::string &name); - virtual void showConcept(const QString &name); - virtual void showFitFunction(const std::string &name=std::string()); - virtual void showFitFunction(const QString &name); - virtual void showCustomInterface(const std::string &name=std::string()); - virtual void showCustomInterface(const QString &name); + void showPage(const std::string &url = std::string()) override; + void showPage(const QString &url) override; + void showPage(const QUrl &url) override; + void showWikiPage(const std::string &page = std::string()) override; + void showWikiPage(const QString &page) override; + void showAlgorithm(const std::string &name = std::string(), + const int version = -1) override; + void showAlgorithm(const QString &name, const int version = -1) override; + void showConcept(const std::string &name) override; + void showConcept(const QString &name) override; + void showFitFunction(const std::string &name = std::string()) override; + void showFitFunction(const QString &name) override; + void showCustomInterface(const std::string &name = std::string()) override; + void showCustomInterface(const QString &name) override; private: void showHelp(const QString &url); @@ -59,7 +60,7 @@ private: public slots: /// Perform any clean up on main window shutdown - virtual void shutdown(); + void shutdown() override; void warning(QString msg); }; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MessageDisplay.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MessageDisplay.h index 6b011c93d1bcc39d2c23554dd05aab9657c4c7ae..b1c62ce42e9f2ff80b64eb76c4c3c4e77f98c30f 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MessageDisplay.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MessageDisplay.h @@ -57,7 +57,7 @@ namespace MantidQt MessageDisplay(LogLevelControl logLevelControl, QWidget *parent=NULL); ///Destructor - ~MessageDisplay(); + ~MessageDisplay() override; // Setup logging framework connections void attachLoggingChannel(); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/PeakPicker.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/PeakPicker.h index 29f6768c9f8adfaa3c504efcd72f1afb520ef1ca..4a2d9034eabd1f1904a884e8138be9e6474269d6 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/PeakPicker.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/PeakPicker.h @@ -46,12 +46,12 @@ namespace MantidWidgets PeakPicker(QwtPlot* plot, QColor color); /// Correct QwtPlotItem type info - virtual int rtti() const { return QwtPlotItem::Rtti_PlotMarker; } + int rtti() const override { return QwtPlotItem::Rtti_PlotMarker; } /// Draw the peak picker /// @see QwtPlotItem::draw - virtual void draw(QPainter* painter, const QwtScaleMap& xMap, const QwtScaleMap& yMap, - const QRect& canvasRect) const; + void draw(QPainter *painter, const QwtScaleMap &xMap, + const QwtScaleMap &yMap, const QRect &canvasRect) const override; /// @return Currently represented peak Mantid::API::IPeakFunction_const_sptr peak() const; @@ -72,7 +72,7 @@ namespace MantidWidgets static const QCursorShape DEFAULT_CURSOR; /// Event filter installed for the plot - bool eventFilter(QObject* object, QEvent* event); + bool eventFilter(QObject *object, QEvent *event) override; /// The plot peak picker operates on QwtPlot* m_plot; diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/RangeSelector.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/RangeSelector.h index 38c4235775d9da75a4c95fdf405c6ccbef1e902d..e3e370dccc989843343cd9b148307e1a55b6f3ae 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/RangeSelector.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/RangeSelector.h @@ -28,7 +28,7 @@ namespace MantidWidgets RangeSelector(QwtPlot* plot, SelectType type=XMINMAX, bool visible=true, bool infoOnly=false); RangeSelector(PreviewPlot* plot, SelectType type=XMINMAX, bool visible=true, bool infoOnly=false); - ~RangeSelector() {}; + ~RangeSelector() override{}; std::pair<double,double> getRange(); void setRange(std::pair<double,double> range); /// Overloaded function provided for convenience @@ -67,7 +67,7 @@ namespace MantidWidgets bool inRange(double); bool changingMin(double, double); bool changingMax(double, double); - bool eventFilter(QObject*, QEvent*); + bool eventFilter(QObject *, QEvent *) override; // MEMBER ATTRIBUTES SelectType m_type; ///< type of selection widget is for diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SafeQwtPlot.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SafeQwtPlot.h index 7c865f555b37967383458973090b0fc3c2414585..0a0aaaed1b0cb997b0f80f75dfeae36597a15d1b 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SafeQwtPlot.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SafeQwtPlot.h @@ -52,9 +52,9 @@ namespace MantidWidgets explicit SafeQwtPlot(QWidget * parent = NULL); explicit SafeQwtPlot(const QwtText &title, QWidget *p = NULL); - virtual ~SafeQwtPlot(); - - virtual void drawCanvas(QPainter * painter); + ~SafeQwtPlot() override; + + void drawCanvas(QPainter *painter) override; void setWorkspace(Mantid::API::Workspace_sptr ws); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SaveWorkspaces.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SaveWorkspaces.h index 24224bdb6bcf6b6d3bbdcf411fd87e6e6e005419..7cdff7933c6435afdeff84e415209bfdb17c9659 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SaveWorkspaces.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/SaveWorkspaces.h @@ -78,7 +78,7 @@ namespace MantidQt void saveSettings() const; void addButtonsDisab(int row); - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent *event) override; QString saveList(const QList<QListWidgetItem*> & list, const QString & algorithm, QString fileBase, bool toAppend, QHash<QString, QString> workspaceMap); QHash<QString, QString> provideZeroFreeWorkspaces(const QListWidget * workspaces); void removeZeroFreeWorkspaces(QHash<QString, QString> workspaces); diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringDialogEditor.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringDialogEditor.h index 6baccc78ab7173c4127337b362e23f042e4b57da..e624f9227c3ae4d80bf7e7c2bd03f76609dab0a4 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringDialogEditor.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringDialogEditor.h @@ -16,8 +16,8 @@ class StringDialogEditorFactory : public QtAbstractEditorFactory<QtStringPropert public: StringDialogEditorFactory(QObject *parent = 0): QtAbstractEditorFactory<QtStringPropertyManager>(parent){} protected: - void connectPropertyManager(QtStringPropertyManager *manager); - void disconnectPropertyManager(QtStringPropertyManager *manager); + void connectPropertyManager(QtStringPropertyManager *manager) override; + void disconnectPropertyManager(QtStringPropertyManager *manager) override; }; /** @@ -30,7 +30,7 @@ class StringDialogEditor: public QWidget Q_OBJECT public: StringDialogEditor(QtProperty *property, QWidget *parent); - ~StringDialogEditor(); + ~StringDialogEditor() override; protected slots: /// Implementations must open a dialog to edit the editor's text. If editing is successful /// setText() and updateProperty() methods must be called. diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringEditorFactory.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringEditorFactory.h index 639ba5315d2fd582650df8d422088a8178a29938..6afcef8fdc3ecf338493aeca3f68b3e2a0663c07 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringEditorFactory.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/StringEditorFactory.h @@ -11,9 +11,11 @@ public: StringEditorFactory(QObject *parent = 0): QtAbstractEditorFactory<QtStringPropertyManager>(parent){} protected: using QtAbstractEditorFactoryBase::createEditor; // Avoid Intel compiler warning - void connectPropertyManager(QtStringPropertyManager *){} - QWidget *createEditorForManager(QtStringPropertyManager *manager, QtProperty *property,QWidget *parent); - void disconnectPropertyManager(QtStringPropertyManager *){} + void connectPropertyManager(QtStringPropertyManager *) override {} + QWidget *createEditorForManager(QtStringPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtStringPropertyManager *) override {} }; class StringEditor: public QLineEdit diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceEditorFactory.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceEditorFactory.h index 44248b0bd967416a560d0fe7aa925256f4eec9b0..77859e469f7e72f00fbf27ca9c6556ce493d9f49 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceEditorFactory.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceEditorFactory.h @@ -16,9 +16,11 @@ public: WorkspaceEditorFactory(QObject *parent = 0): QtAbstractEditorFactory<QtStringPropertyManager>(parent){} protected: using QtAbstractEditorFactoryBase::createEditor; // Avoid Intel compiler warning - void connectPropertyManager(QtStringPropertyManager *){} - QWidget *createEditorForManager(QtStringPropertyManager *manager, QtProperty *property,QWidget *parent); - void disconnectPropertyManager(QtStringPropertyManager *){} + void connectPropertyManager(QtStringPropertyManager *) override {} + QWidget *createEditorForManager(QtStringPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtStringPropertyManager *) override {} }; class WorkspaceEditor: public WorkspaceSelector diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceSelector.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceSelector.h index 50637e74d1e7922cf8cb98209db1a1ffd0cab84f..b94ea1f21ef5d1f403e2ef8f536e357d5829e8f1 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceSelector.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/WorkspaceSelector.h @@ -72,7 +72,7 @@ namespace MantidWidgets /// Default Constructor WorkspaceSelector(QWidget *parent = NULL, bool init = true); /// Destructor - virtual ~WorkspaceSelector(); + ~WorkspaceSelector() override; QStringList getWorkspaceTypes() const; void setWorkspaceTypes(const QStringList & types); @@ -102,9 +102,9 @@ signals: protected: //Method for handling drop events - void dropEvent(QDropEvent *); + void dropEvent(QDropEvent *) override; //called when a drag event enters the class - void dragEnterEvent(QDragEnterEvent *); + void dragEnterEvent(QDragEnterEvent *) override; private: /// Poco Observers for ADS Notifications diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/pqHelpWindow.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/pqHelpWindow.h index 41b510c0cc88dc83871240344494f08166d35076..2714b49337b986d4e561cb5fced8cf206272cb92 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/pqHelpWindow.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/pqHelpWindow.h @@ -50,7 +50,7 @@ class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS pqHelpWindow : public QMainWindow public: pqHelpWindow(QHelpEngine* engine, QWidget* parent=0, Qt::WindowFlags flags=0); - virtual ~pqHelpWindow(); + ~pqHelpWindow() override; public slots: /// Requests showing of a particular page. The url must begin with "qthelp:" diff --git a/MantidQt/MantidWidgets/src/InstrumentView/PanelsSurface.cpp b/MantidQt/MantidWidgets/src/InstrumentView/PanelsSurface.cpp index 9597d981cedac8801823ac17bea16d6420167ab1..ce58c740a27df303d0e822a15d6a23d81037a14c 100644 --- a/MantidQt/MantidWidgets/src/InstrumentView/PanelsSurface.cpp +++ b/MantidQt/MantidWidgets/src/InstrumentView/PanelsSurface.cpp @@ -177,21 +177,28 @@ namespace MantidQt public: explicit FlatBankFinder(PanelsSurface &surface) : m_surface(surface) {} - bool visit(const GLActor*) { return false; } - bool visit(const GLActorCollection*) { return false; } - bool visit(const ComponentActor*) { return false; } - bool visit(const InstrumentActor*) { return false; } - bool visit(const ObjCompAssemblyActor*) { return false; } - - bool visit(const CompAssemblyActor* actor) - { - m_surface.addObjCompAssemblies(actor->getComponent()->getComponentID()); + bool visit(const GLActor *) override { return false; } + bool visit(const GLActorCollection *) override { + return false; + } + bool visit(const ComponentActor *) override { + return false; + } + bool visit(const InstrumentActor *) override { + return false; + } + bool visit(const ObjCompAssemblyActor *) override { + return false; + } + + bool visit(const CompAssemblyActor *actor) override { + m_surface.addObjCompAssemblies(actor->getComponent()->getComponentID()); return false; } - bool visit(const RectangularDetectorActor* actor) - { - m_surface.addRectangularDetector(actor->getComponent()->getComponentID()); + bool + visit(const RectangularDetectorActor *actor) override { + m_surface.addRectangularDetector(actor->getComponent()->getComponentID()); return false; } }; diff --git a/MantidQt/MantidWidgets/src/PropertyHandler.cpp b/MantidQt/MantidWidgets/src/PropertyHandler.cpp index aa8496d3e6b819309043968c1479c90eb2f456ed..4f59ee10723523c204e5eda4df6807c105f6d54b 100644 --- a/MantidQt/MantidWidgets/src/PropertyHandler.cpp +++ b/MantidQt/MantidWidgets/src/PropertyHandler.cpp @@ -135,32 +135,32 @@ public: protected: /// Create string property - QtProperty *apply(const std::string &str) const { + QtProperty *apply(const std::string &str) const override { QtProperty *prop = NULL; prop = m_browser->addStringProperty(m_name); m_browser->setStringPropertyValue(prop, QString::fromStdString(str)); return prop; } /// Create double property - QtProperty *apply(const double &d) const { + QtProperty *apply(const double &d) const override { QtProperty *prop = m_browser->addDoubleProperty(m_name); m_browser->m_doubleManager->setValue(prop, d); return prop; } /// Create int property - QtProperty *apply(const int &i) const { + QtProperty *apply(const int &i) const override { QtProperty *prop = m_browser->m_intManager->addProperty(m_name); m_browser->m_intManager->setValue(prop, i); return prop; } /// Create bool property - QtProperty *apply(const bool &b) const { + QtProperty *apply(const bool &b) const override { QtProperty *prop = m_browser->m_boolManager->addProperty(m_name); m_browser->m_boolManager->setValue(prop, b); return prop; } /// Create vector property - QtProperty *apply(const std::vector<double> &b) const { + QtProperty *apply(const std::vector<double> &b) const override { // throw std::runtime_error("Vector attribute property not implememted."); QtProperty *prop = m_browser->m_vectorManager->addProperty(m_name); m_browser->m_vectorSizeManager->blockSignals(true); @@ -656,18 +656,24 @@ public: protected: /// Create string property - void apply(std::string &str) const { + void apply(std::string &str) const override { QString attName = m_prop->propertyName(); str = m_browser->getStringPropertyValue(m_prop).toStdString(); } /// Create double property - void apply(double &d) const { d = m_browser->m_doubleManager->value(m_prop); } + void apply(double &d) const override { + d = m_browser->m_doubleManager->value(m_prop); + } /// Create int property - void apply(int &i) const { i = m_browser->m_intManager->value(m_prop); } + void apply(int &i) const override { + i = m_browser->m_intManager->value(m_prop); + } /// Create bool property - void apply(bool &b) const { b = m_browser->m_boolManager->value(m_prop); } + void apply(bool &b) const override { + b = m_browser->m_boolManager->value(m_prop); + } /// Create vector property - void apply(std::vector<double> &v) const { + void apply(std::vector<double> &v) const override { QList<QtProperty *> members = m_prop->subProperties(); if (members.size() <= 1) { v.clear(); @@ -696,32 +702,32 @@ public: protected: /// Set string property - void apply(const std::string &str) const { + void apply(const std::string &str) const override { m_browser->m_changeSlotsEnabled = false; QString attName = m_prop->propertyName(); m_browser->setStringPropertyValue(m_prop, QString::fromStdString(str)); m_browser->m_changeSlotsEnabled = true; } /// Set double property - void apply(const double &d) const { + void apply(const double &d) const override { m_browser->m_changeSlotsEnabled = false; m_browser->m_doubleManager->setValue(m_prop, d); m_browser->m_changeSlotsEnabled = true; } /// Set int property - void apply(const int &i) const { + void apply(const int &i) const override { m_browser->m_changeSlotsEnabled = false; m_browser->m_intManager->setValue(m_prop, i); m_browser->m_changeSlotsEnabled = true; } /// Set bool property - void apply(const bool &b) const { + void apply(const bool &b) const override { m_browser->m_changeSlotsEnabled = false; m_browser->m_boolManager->setValue(m_prop, b); m_browser->m_changeSlotsEnabled = true; } /// Set vector property - void apply(const std::vector<double> &) const { + void apply(const std::vector<double> &) const override { // this method is supposed to be called when corresponding // property value changes but it doesn't have a value because // it's a group property diff --git a/MantidQt/RefDetectorViewer/inc/MantidQtRefDetectorViewer/RefImageView.h b/MantidQt/RefDetectorViewer/inc/MantidQtRefDetectorViewer/RefImageView.h index 8e76609b4d3a3aff591304edb936426deac91488..5ae9af3be9b74167b8cd9d36daf0570749262254 100644 --- a/MantidQt/RefDetectorViewer/inc/MantidQtRefDetectorViewer/RefImageView.h +++ b/MantidQt/RefDetectorViewer/inc/MantidQtRefDetectorViewer/RefImageView.h @@ -63,7 +63,7 @@ class EXPORT_OPT_MANTIDQT_REFDETECTORVIEWER RefImageView : public QMainWindow int backMin, int backMax, int tofMin, int tofMax); - ~RefImageView(); + ~RefImageView() override; RefIVConnections* getIVConnections(); diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CompositePeaksPresenter.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CompositePeaksPresenter.h index c4d185001028bf4f3e97b92779cdd66a48279910..4c5a6fbac93357f711846780386c192a95ac7edf 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CompositePeaksPresenter.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CompositePeaksPresenter.h @@ -35,44 +35,44 @@ class DLLExport CompositePeaksPresenter : public PeaksPresenter, public ZoomableOnDemand { public: // Overrriden methods from Peaks Presenter - virtual void update(); - virtual void updateWithSlicePoint(const PeakBoundingBox &); - virtual bool changeShownDim(); - virtual bool isLabelOfFreeAxis(const std::string &label) const; - SetPeaksWorkspaces presentedWorkspaces() const; - void setForegroundColor(const QColor) { /*Do nothing*/ + void update() override; + void updateWithSlicePoint(const PeakBoundingBox &) override; + bool changeShownDim() override; + bool isLabelOfFreeAxis(const std::string &label) const override; + SetPeaksWorkspaces presentedWorkspaces() const override; + void setForegroundColor(const QColor) override { /*Do nothing*/ } - void setBackgroundColor(const QColor) { /*Do nothing*/ + void setBackgroundColor(const QColor) override { /*Do nothing*/ } - void showBackgroundRadius(const bool) { /*Do nothing*/ + void showBackgroundRadius(const bool) override { /*Do nothing*/ } - void setShown(const bool) { /*Do nothing*/ + void setShown(const bool) override { /*Do nothing*/ } - virtual PeakBoundingBox getBoundingBox(const int peakIndex) const { + PeakBoundingBox getBoundingBox(const int peakIndex) const override { return m_default->getBoundingBox(peakIndex); } - virtual void sortPeaksWorkspace(const std::string &, - const bool) { /*Do Nothing*/ + void sortPeaksWorkspace(const std::string &, + const bool) override { /*Do Nothing*/ } - virtual bool getShowBackground() const { + bool getShowBackground() const override { return m_default->getShowBackground(); } - virtual void zoomToPeak(const int) { /* Do nothing */ + void zoomToPeak(const int) override { /* Do nothing */ } - virtual std::string getTransformName() const; - virtual bool isHidden() const { return m_default->isHidden(); } - virtual void reInitialize( - boost::shared_ptr<Mantid::API::IPeaksWorkspace> ) { /*Do nothing*/ + std::string getTransformName() const override; + bool isHidden() const override { return m_default->isHidden(); } + void reInitialize( + boost::shared_ptr<Mantid::API::IPeaksWorkspace>) override { /*Do nothing*/ } - virtual bool deletePeaksIn(PeakBoundingBox box); - virtual bool addPeakAt(double plotCoordsPointX, double plotCoordsPointY); + bool deletePeaksIn(PeakBoundingBox box) override; + bool addPeakAt(double plotCoordsPointX, double plotCoordsPointY) override; /// Constructor CompositePeaksPresenter(ZoomablePeaksView *const zoomablePlottingWidget, PeaksPresenter_sptr defaultPresenter = PeaksPresenter_sptr(new NullPeaksPresenter)); /// Destructor - virtual ~CompositePeaksPresenter(); + ~CompositePeaksPresenter() override; /// Add a peaks presenter onto the composite. void addPeaksPresenter(PeaksPresenter_sptr presenter); /// Get the number of subjects. @@ -80,15 +80,15 @@ public: /// Clear the owned presenters. void clear(); /// Set the peaks size within the current projection - virtual void setPeakSizeOnProjection(const double fraction); + void setPeakSizeOnProjection(const double fraction) override; /// Set the peaks size into the current projection - virtual void setPeakSizeIntoProjection(const double fraction); + void setPeakSizeIntoProjection(const double fraction) override; /// Get the peaks size onto the current projection - virtual double getPeakSizeOnProjection() const; + double getPeakSizeOnProjection() const override; /// Get the peaks size into the current projection - virtual double getPeakSizeIntoProjection() const; + double getPeakSizeIntoProjection() const override; /// Enter peak edit mode. - void peakEditMode(EditMode mode); + void peakEditMode(EditMode mode) override; /// Change the foreground representation for the peaks of this workspace void setForegroundColour(boost::shared_ptr<const Mantid::API::IPeaksWorkspace> ws, @@ -127,16 +127,17 @@ public: /// Get the named peaks presenter. PeaksPresenter *getPeaksPresenter(const QString &name); /// Register any owning presenter - virtual void registerOwningPresenter(UpdateableOnDemand *owner); + void registerOwningPresenter(UpdateableOnDemand *owner) override; /// Is the presenter hidden. bool getIsHidden( boost::shared_ptr<const Mantid::API::IPeaksWorkspace> peaksWS) const; /// Perform update on demand - virtual void performUpdate(); + void performUpdate() override; /// Zoom to the rectangle - virtual void zoomToPeak(PeaksPresenter *const presenter, const int peakIndex); + void zoomToPeak(PeaksPresenter *const presenter, + const int peakIndex) override; /// Forget zoom - void resetZoom(); + void resetZoom() override; /// Get optional zoomed peak presenter. boost::optional<PeaksPresenter_sptr> getZoomedPeakPresenter() const; /// Get optional zoomed peak index. @@ -146,18 +147,20 @@ public: const std::string &wsName, boost::shared_ptr<Mantid::API::IPeaksWorkspace> &changedPeaksWS); /// Determine if the presenter contents are different. - bool contentsDifferent(PeaksPresenter const * other) const; + bool contentsDifferent(PeaksPresenter const *other) const override; /// Enter the requested edit mode for the peaks workspace. void editCommand(EditMode editMode, boost::weak_ptr<const Mantid::API::IPeaksWorkspace> target); /// Can we add peaks to this peaks workspace. bool hasPeakAddModeFor(boost::weak_ptr<const Mantid::API::IPeaksWorkspace> target); /// Can we add peaks - bool hasPeakAddMode() const; + bool hasPeakAddMode() const override; + private: /// Updateable on demand method. - void updatePeaksWorkspace( - const std::string &toName, - boost::shared_ptr<const Mantid::API::IPeaksWorkspace> toWorkspace); + void + updatePeaksWorkspace(const std::string &toName, + boost::shared_ptr<const Mantid::API::IPeaksWorkspace> + toWorkspace) override; /// Alias for container of subjects type. typedef std::vector<PeaksPresenter_sptr> SubjectContainer; /// Subject presenters. diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h index 1bd980fa60869719c2907c04e8dd00c80f33aa0e..f602dc39e00e42a9680ee948ae384732a5ea53d2 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h @@ -32,35 +32,35 @@ public: Mantid::API::IPeaksWorkspace_sptr peaksWS, boost::shared_ptr<Mantid::API::MDGeometry> mdWS, Mantid::Geometry::PeakTransformFactory_sptr transformFactory); - void reInitialize(Mantid::API::IPeaksWorkspace_sptr peaksWS); - virtual ~ConcretePeaksPresenter(); - virtual void update(); - virtual void updateWithSlicePoint(const PeakBoundingBox &slicePoint); - virtual bool changeShownDim(); - virtual bool isLabelOfFreeAxis(const std::string &label) const; - SetPeaksWorkspaces presentedWorkspaces() const; - void setForegroundColor(const QColor); - void setBackgroundColor(const QColor); - std::string getTransformName() const; - void setShown(const bool shown); - virtual PeakBoundingBox getBoundingBox(const int) const; - virtual void sortPeaksWorkspace(const std::string &byColumnName, - const bool ascending); - virtual void setPeakSizeOnProjection(const double fraction); - virtual void setPeakSizeIntoProjection(const double fraction); - virtual double getPeakSizeOnProjection() const; - virtual double getPeakSizeIntoProjection() const; - virtual void registerOwningPresenter(UpdateableOnDemand *owner); - virtual bool getShowBackground() const; - virtual QColor getBackgroundColor() const; - virtual QColor getForegroundColor() const; - virtual void zoomToPeak(const int index); - virtual bool isHidden() const; - virtual bool contentsDifferent(PeaksPresenter const * other) const; - virtual void peakEditMode(EditMode mode); - virtual bool deletePeaksIn(PeakBoundingBox plotCoordsBox); - virtual bool addPeakAt(double plotCoordsPointX, double plotCoordsPointY); - virtual bool hasPeakAddMode() const; + void reInitialize(Mantid::API::IPeaksWorkspace_sptr peaksWS) override; + ~ConcretePeaksPresenter() override; + void update() override; + void updateWithSlicePoint(const PeakBoundingBox &slicePoint) override; + bool changeShownDim() override; + bool isLabelOfFreeAxis(const std::string &label) const override; + SetPeaksWorkspaces presentedWorkspaces() const override; + void setForegroundColor(const QColor) override; + void setBackgroundColor(const QColor) override; + std::string getTransformName() const override; + void setShown(const bool shown) override; + PeakBoundingBox getBoundingBox(const int) const override; + void sortPeaksWorkspace(const std::string &byColumnName, + const bool ascending) override; + void setPeakSizeOnProjection(const double fraction) override; + void setPeakSizeIntoProjection(const double fraction) override; + double getPeakSizeOnProjection() const override; + double getPeakSizeIntoProjection() const override; + void registerOwningPresenter(UpdateableOnDemand *owner) override; + bool getShowBackground() const override; + QColor getBackgroundColor() const override; + QColor getForegroundColor() const override; + void zoomToPeak(const int index) override; + bool isHidden() const override; + bool contentsDifferent(PeaksPresenter const *other) const override; + void peakEditMode(EditMode mode) override; + bool deletePeaksIn(PeakBoundingBox plotCoordsBox) override; + bool addPeakAt(double plotCoordsPointX, double plotCoordsPointY) override; + bool hasPeakAddMode() const override; private: /// Peak overlay view. @@ -96,7 +96,7 @@ private: /// peaks workspace. bool isDimensionNameOfFreeAxis(const std::string &name) const; /// Switch between showing background radius or not - void showBackgroundRadius(const bool show); + void showBackgroundRadius(const bool show) override; /// Produce the views from the PeaksWorkspace void produceViews(); /// Check workspace compatibilities. diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CustomTools.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CustomTools.h index 367d6b09a0b40a31834a3889cf0c898675c1932a..7f5a60854f6b7f991ceb29dcc7374af8bd719b5c 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CustomTools.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CustomTools.h @@ -25,9 +25,8 @@ namespace SliceViewer class PickerMachine : public QwtPickerMachine { public: - virtual QwtPickerMachine::CommandList transition( - const QwtEventPattern &, const QEvent *e) - { + QwtPickerMachine::CommandList transition(const QwtEventPattern &, + const QEvent *e) override { QwtPickerMachine::CommandList cmdList; if ( e->type() == QEvent::MouseMove ) cmdList += Move; @@ -50,7 +49,7 @@ signals: void rescaled(double factor) const; protected: /** Method to flip the way the wheel operates */ - virtual void rescale(double factor); + void rescale(double factor) override; }; @@ -61,11 +60,10 @@ class CustomPicker : public QwtPlotPicker public: CustomPicker(int xAxis, int yAxis, QwtPlotCanvas* canvas); - void widgetMouseMoveEvent(QMouseEvent *e); - void widgetLeaveEvent(QEvent *); + void widgetMouseMoveEvent(QMouseEvent *e) override; + void widgetLeaveEvent(QEvent *) override; - virtual QwtPickerMachine *stateMachine(int) const - { + QwtPickerMachine *stateMachine(int) const override { return new PickerMachine; } @@ -75,7 +73,7 @@ signals: protected: // Unhide base class method (avoids Intel compiler warning) using QwtPlotPicker::trackerText; - QwtText trackerText (const QwtDoublePoint & pos) const; + QwtText trackerText(const QwtDoublePoint &pos) const override; }; @@ -93,8 +91,7 @@ public: protected: // Unhide base class method (avoids Intel compiler warning) using QwtPlotZoomer::trackerText; - virtual QwtText trackerText( const QwtDoublePoint& p ) const - { + QwtText trackerText(const QwtDoublePoint &p) const override { QwtText t( QwtPlotPicker::trackerText( p )); QColor c(Qt::white); c.setAlpha(120); diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/LineOverlay.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/LineOverlay.h index 7b923db8dd601ec6abed7445df22da98cf4cb19f..4655fe49b81d062d97efd6af3352757f8a9b3c27 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/LineOverlay.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/LineOverlay.h @@ -58,8 +58,8 @@ namespace SliceViewer public: LineOverlay(QwtPlot * plot, QWidget * parent); - virtual ~LineOverlay(); - + ~LineOverlay() override; + void reset(); void setPointA(QPointF pointA); @@ -106,20 +106,20 @@ namespace SliceViewer QPointF invTransform(QPoint pixels) const; QPointF snap(QPointF original) const; - QSize sizeHint() const; + QSize sizeHint() const override; QSize size() const; int height() const; int width() const; QRect drawHandle(QPainter & painter, QPointF coords, QColor brush); - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) override; eHandleID mouseOverHandle(QPoint pos); bool mouseOverCenter(QPoint pos); void handleDrag(QMouseEvent * event); - void mouseMoveEvent(QMouseEvent * event); - void mousePressEvent(QMouseEvent * event); - void mouseReleaseEvent(QMouseEvent * event); + void mouseMoveEvent(QMouseEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; protected: /// Marker that we are just creating the line (with the mouse) diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/NullPeaksPresenter.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/NullPeaksPresenter.h index 30acbb69a4cd362e90419561aa05fa9c97546b05..656fc1ca3f9c549aa5ae12236dd0798d7cd07660 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/NullPeaksPresenter.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/NullPeaksPresenter.h @@ -14,48 +14,53 @@ PeaksPresenter pointer before using it. ----------------------------------------------------------*/ class DLLExport NullPeaksPresenter : public PeaksPresenter { public: - virtual void update() {} - virtual void updateWithSlicePoint(const PeakBoundingBox &) {} - virtual bool changeShownDim() { return false; } - virtual bool isLabelOfFreeAxis(const std::string &) const { return false; } - SetPeaksWorkspaces presentedWorkspaces() const { + void update() override {} + void updateWithSlicePoint(const PeakBoundingBox &) override {} + bool changeShownDim() override { return false; } + bool isLabelOfFreeAxis(const std::string &) const override { return false; } + SetPeaksWorkspaces presentedWorkspaces() const override { SetPeaksWorkspaces empty; return empty; } - void setForegroundColor(const QColor) { /*Do nothing*/ + void setForegroundColor(const QColor) override { /*Do nothing*/ } - void setBackgroundColor(const QColor) { /*Do nothing*/ + void setBackgroundColor(const QColor) override { /*Do nothing*/ } - std::string getTransformName() const { return ""; } - void showBackgroundRadius(const bool) { /*Do nothing*/ + std::string getTransformName() const override { return ""; } + void showBackgroundRadius(const bool) override { /*Do nothing*/ } - void setShown(const bool) { /*Do nothing*/ + void setShown(const bool) override { /*Do nothing*/ } - virtual PeakBoundingBox getBoundingBox(const int) const { + PeakBoundingBox getBoundingBox(const int) const override { return PeakBoundingBox(); } - virtual void sortPeaksWorkspace(const std::string &, - const bool) { /*Do Nothing*/ + void sortPeaksWorkspace(const std::string &, + const bool) override { /*Do Nothing*/ } - virtual void setPeakSizeOnProjection(const double) { /*Do Nothing*/ + void setPeakSizeOnProjection(const double) override { /*Do Nothing*/ } - virtual void setPeakSizeIntoProjection(const double) { /*Do Nothing*/ + void setPeakSizeIntoProjection(const double) override { /*Do Nothing*/ } - virtual double getPeakSizeOnProjection() const { return 0; } - virtual double getPeakSizeIntoProjection() const { return 0; } - virtual bool getShowBackground() const { return false; } - virtual void registerOwningPresenter(UpdateableOnDemand *){} - virtual void zoomToPeak(const int){} - virtual bool isHidden() const { return true; } - virtual void reInitialize( - boost::shared_ptr<Mantid::API::IPeaksWorkspace> ) { /*Do nothing*/ + double getPeakSizeOnProjection() const override { return 0; } + double getPeakSizeIntoProjection() const override { return 0; } + bool getShowBackground() const override { return false; } + void registerOwningPresenter(UpdateableOnDemand *) override {} + void zoomToPeak(const int) override {} + bool isHidden() const override { return true; } + void reInitialize( + boost::shared_ptr<Mantid::API::IPeaksWorkspace>) override { /*Do nothing*/ } - virtual bool contentsDifferent(const PeaksPresenter * ) const { return true; } + bool contentsDifferent(const PeaksPresenter *) const override { return true; } - void peakEditMode(EditMode){/*Do nothing*/} - bool deletePeaksIn(PeakBoundingBox){return false;/*Do nothing. Delete nothing.*/} - bool addPeakAt(double, double){return false;/*Do nothing. Add nothing.*/} - bool hasPeakAddMode() const {return false; /*Do nothing.*/} + void peakEditMode(EditMode) override { /*Do nothing*/ + } + bool deletePeaksIn(PeakBoundingBox) override { + return false; /*Do nothing. Delete nothing.*/ + } + bool addPeakAt(double, double) override { + return false; /*Do nothing. Add nothing.*/ + } + bool hasPeakAddMode() const override { return false; /*Do nothing.*/ } }; } diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayInteractive.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayInteractive.h index 83de6efeeeca828b7991429c84fbb9d7319f6841..713a139b827b809ea680ddd6877e592a4710b2f9 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayInteractive.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayInteractive.h @@ -53,16 +53,16 @@ public: PeakOverlayInteractive(PeaksPresenter *const peaksPresenter, QwtPlot *plot, const int plotXIndex, const int plotYIndex, QWidget *parent); /// Destructor - virtual ~PeakOverlayInteractive(); + ~PeakOverlayInteractive() override; /// Enter peak deletion mode. - void peakDeletionMode(); + void peakDeletionMode() override; /// Enter peak addition mode - void peakAdditionMode(); + void peakAdditionMode() override; /// Enter display mode - void peakDisplayMode(); + void peakDisplayMode() override; - QSize sizeHint() const; + QSize sizeHint() const override; QSize size() const; int height() const; int width() const; @@ -81,15 +81,15 @@ private: /// Input controller. MantidQt::MantidWidgets::InputController *m_tool; - void mousePressEvent(QMouseEvent* e); - void mouseMoveEvent(QMouseEvent* e); - void mouseReleaseEvent(QMouseEvent* e); - void wheelEvent(QWheelEvent* e); - void keyPressEvent(QKeyEvent* e); - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); + void mousePressEvent(QMouseEvent *e) override; + void mouseMoveEvent(QMouseEvent *e) override; + void mouseReleaseEvent(QMouseEvent *e) override; + void wheelEvent(QWheelEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; + void enterEvent(QEvent *e) override; + void leaveEvent(QEvent *e) override; - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) override; // Call do paint on sub-classes virtual void doPaintPeaks(QPaintEvent *event) = 0; diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h index 532c28e1f42736629773f461355d17aab7f06e89..83e05547c77ce8d26be47c05b018cb6ed35b729b 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h @@ -53,49 +53,51 @@ namespace SliceViewer PeakOverlayMultiCross(PeaksPresenter* const peaksPresenter, QwtPlot * plot, QWidget * parent, const VecPhysicalCrossPeak& vecPhysicalPeaks, const int plotXIndex, const int plotYIndex, const QColor& peakColour); /// Destructor - virtual ~PeakOverlayMultiCross(); + ~PeakOverlayMultiCross() override; /// Set the slice point at position. - virtual void setSlicePoint(const double& point, const std::vector<bool>& viewablePeaks); + void setSlicePoint(const double &point, + const std::vector<bool> &viewablePeaks) override; /// Hide the view. - virtual void hideView(); + void hideView() override; /// Show the view. - virtual void showView(); + void showView() override; /// Update the view. - virtual void updateView(); + void updateView() override; /// Move the position of the peak, by using a different configuration of the existing origin indexes. - void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform); + void + movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform) override; /// Change foreground colour - virtual void changeForegroundColour(const QColor); + void changeForegroundColour(const QColor) override; /// Change background colour - virtual void changeBackgroundColour(const QColor); + void changeBackgroundColour(const QColor) override; /// Get a bounding box for this peak. - virtual PeakBoundingBox getBoundingBox(const int peakIndex) const; + PeakBoundingBox getBoundingBox(const int peakIndex) const override; /// Changes the size of the overlay to be the requested fraction of the current view width. - virtual void changeOccupancyInView(const double fraction); + void changeOccupancyInView(const double fraction) override; /// Changes the size of the overlay to be the requested fraction of the view depth. - virtual void changeOccupancyIntoView(const double fraction); + void changeOccupancyIntoView(const double fraction) override; /// Get the occupancy in the view. - virtual double getOccupancyInView() const; + double getOccupancyInView() const override; /// Get the occupancy into the view. - virtual double getOccupancyIntoView() const; + double getOccupancyIntoView() const override; /// Flag indicating that the peak is position only. - bool positionOnly() const; + bool positionOnly() const override; /// Get the effective radius. - virtual double getRadius() const; + double getRadius() const override; /// Is the background radius visible - virtual bool isBackgroundShown() const; + bool isBackgroundShown() const override; /// Get the foreground colour - virtual QColor getForegroundColour() const; + QColor getForegroundColour() const override; /// Get the background colour - virtual QColor getBackgroundColour() const; + QColor getBackgroundColour() const override; /// Take settings from another view - virtual void takeSettingsFrom(const PeakOverlayView * const); + void takeSettingsFrom(const PeakOverlayView *const) override; private: /// Pure virtual on PeakOverlayInteractive - virtual void doPaintPeaks(QPaintEvent*); + void doPaintPeaks(QPaintEvent *) override; /// Physical model of the spacial cross peaks VecPhysicalCrossPeak m_physicalPeaks; diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h index ee209b7ece7b2c7adec2ec4c080a04a94fcb658d..82abc13754268cfda271828012c86d1b8520559c 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h @@ -41,10 +41,14 @@ namespace MantidQt { public: PeakOverlayMultiCrossFactory(boost::shared_ptr<Mantid::API::MDGeometry> mdWS, Mantid::Geometry::PeakTransform_const_sptr transform, Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const int plotXIndex, const int plotYIndex, const size_t colourNumber=0); - virtual ~PeakOverlayMultiCrossFactory(); - virtual boost::shared_ptr<PeakOverlayView> createView(PeaksPresenter* const presenter, Mantid::Geometry::PeakTransform_const_sptr transform) const; - virtual int FOM() const; - virtual void swapPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace>& peaksWS); + ~PeakOverlayMultiCrossFactory() override; + boost::shared_ptr<PeakOverlayView> createView( + PeaksPresenter *const presenter, + Mantid::Geometry::PeakTransform_const_sptr transform) const override; + int FOM() const override; + void swapPeaksWorkspace( + boost::shared_ptr<Mantid::API::IPeaksWorkspace> &peaksWS) override; + private: /// Peaks workspace. boost::shared_ptr<const Mantid::API::IPeaksWorkspace> m_peaksWS; diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h index 23d1629522919c221e7672815b3ccc4095759c7a..c05d4285999f37e7c7ec6741862d68bddc169360 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h @@ -52,50 +52,52 @@ namespace SliceViewer PeakOverlayMultiSphere(PeaksPresenter* const presenter, QwtPlot * plot, QWidget * parent, const VecPhysicalSphericalPeak& vecPhysicalPeaks, const int plotXIndex, const int plotYIndex, const QColor& peakColour, const QColor& backColour); /// Destructor - virtual ~PeakOverlayMultiSphere(); + ~PeakOverlayMultiSphere() override; /// Set the slice point at position. - virtual void setSlicePoint(const double& point, const std::vector<bool>& viewablePeaks); + void setSlicePoint(const double &point, + const std::vector<bool> &viewablePeaks) override; /// Hide the view. - virtual void hideView(); + void hideView() override; /// Show the view. - virtual void showView(); + void showView() override; /// Update the view. - virtual void updateView(); + void updateView() override; /// Move the position of the peak, by using a different configuration of the existing origin indexes. - void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform); + void + movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform) override; /// Change foreground colour - virtual void changeForegroundColour(const QColor); + void changeForegroundColour(const QColor) override; /// Change background colour - virtual void changeBackgroundColour(const QColor); + void changeBackgroundColour(const QColor) override; /// Show the background radius - virtual void showBackgroundRadius(const bool show); + void showBackgroundRadius(const bool show) override; /// Get a bounding box for this peak. - virtual PeakBoundingBox getBoundingBox(const int peakIndex) const; + PeakBoundingBox getBoundingBox(const int peakIndex) const override; /// Changes the size of the overlay to be the requested fraction of the current view width. - virtual void changeOccupancyInView(const double fraction); + void changeOccupancyInView(const double fraction) override; /// Changes the size of the overlay to be the requested fraction of the view depth. - virtual void changeOccupancyIntoView(const double fraction); + void changeOccupancyIntoView(const double fraction) override; /// Get the peak size (width/2 as a fraction of total width) on projection - virtual double getOccupancyInView() const; + double getOccupancyInView() const override; /// Get the peaks size into the projection (effective radius as a fraction of z range) - virtual double getOccupancyIntoView() const; + double getOccupancyIntoView() const override; /// Getter indicating that the view is position only - virtual bool positionOnly() const; + bool positionOnly() const override; /// Get the radius of the peak objects. - virtual double getRadius() const; + double getRadius() const override; /// Determine if the background radius is shown. - virtual bool isBackgroundShown() const; + bool isBackgroundShown() const override; /// Get the current background colour - virtual QColor getBackgroundColour() const; + QColor getBackgroundColour() const override; /// Get the current foreground colour - virtual QColor getForegroundColour() const; + QColor getForegroundColour() const override; /// Take settings from another view - void takeSettingsFrom(const PeakOverlayView * const); + void takeSettingsFrom(const PeakOverlayView *const) override; private: /// Draw the peak representations. Pure virtual on base class. - virtual void doPaintPeaks(QPaintEvent *); + void doPaintPeaks(QPaintEvent *) override; /// Physical peak object VecPhysicalSphericalPeak m_physicalPeaks; /// Peak colour diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h index 8b676e099d2b2d327953c935908105c6cb2719c9..a71301be9e8518fd6ac840b96b17d96ff5f7daf4 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h @@ -45,10 +45,13 @@ namespace MantidQt int m_FOM; public: PeakOverlayMultiSphereFactory(Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const int plotXIndex, const int plotYIndex, const size_t colourNumber=0); - virtual ~PeakOverlayMultiSphereFactory(); - virtual boost::shared_ptr<PeakOverlayView> createView(PeaksPresenter* const presenter, Mantid::Geometry::PeakTransform_const_sptr transform) const; - virtual int FOM() const; - virtual void swapPeaksWorkspace(boost::shared_ptr<Mantid::API::IPeaksWorkspace>& peaksWS); + ~PeakOverlayMultiSphereFactory() override; + boost::shared_ptr<PeakOverlayView> createView( + PeaksPresenter *const presenter, + Mantid::Geometry::PeakTransform_const_sptr transform) const override; + int FOM() const override; + void swapPeaksWorkspace( + boost::shared_ptr<Mantid::API::IPeaksWorkspace> &peaksWS) override; }; } } diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactoryBase.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactoryBase.h index d97935981e852d208b2e8b12eef595358ac205eb..f9cf3043240a661541c5d5900f15bccb68b7722c 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactoryBase.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactoryBase.h @@ -47,9 +47,9 @@ namespace MantidQt const int m_plotYIndex; public: PeakOverlayViewFactoryBase(QwtPlot * plot, QWidget * parent, const int plotXIndex, const int plotYIndex, const size_t colourNumber=0); - virtual ~PeakOverlayViewFactoryBase(); - virtual std::string getPlotXLabel() const; - virtual std::string getPlotYLabel() const; + ~PeakOverlayViewFactoryBase() override; + std::string getPlotXLabel() const override; + std::string getPlotYLabel() const override; }; } } diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h index b31d22617b8efa4cade71bb6b1b959519d09707d..423468dd43d332df26934c47c25e7b74c3ad31b7 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h @@ -79,7 +79,7 @@ namespace SliceViewer virtual bool deletePeaksIn(PeakBoundingBox plotCoordsBox) = 0; virtual bool addPeakAt(double plotCoordsPointX, double plotCoordsPointY) =0; virtual bool hasPeakAddMode() const = 0; - virtual ~PeaksPresenter(){}; + ~PeaksPresenter() override{}; }; diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ProxyCompositePeaksPresenter.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ProxyCompositePeaksPresenter.h index d6a839578a8eace8b26c6ad2019e1856f4caa9c4..7665619360bccc14862f4a97932e808a360309cc 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ProxyCompositePeaksPresenter.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ProxyCompositePeaksPresenter.h @@ -22,7 +22,7 @@ public: ProxyCompositePeaksPresenter( boost::shared_ptr<CompositePeaksPresenter> compositePresenter); ProxyCompositePeaksPresenter(); - ~ProxyCompositePeaksPresenter(); + ~ProxyCompositePeaksPresenter() override; size_t size() const; void update(); @@ -68,11 +68,12 @@ public: bool getIsHidden( boost::shared_ptr<const Mantid::API::IPeaksWorkspace> peaksWS) const; /// Perform a requested update. - void performUpdate(); + void performUpdate() override; /// Perform a peaks workspace replacement - void updatePeaksWorkspace( - const std::string &toName, - boost::shared_ptr<const Mantid::API::IPeaksWorkspace> toWorkspace); + void + updatePeaksWorkspace(const std::string &toName, + boost::shared_ptr<const Mantid::API::IPeaksWorkspace> + toWorkspace) override; /// Register an updateable view void registerView(UpdateableOnDemand *view); /// Get optional zoomed peak presenter. diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h index 7101c45844a577027451a323954c06f8bf817788..b41db2e5f7b3f965d75b9f68966e614a77fcdd68 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h @@ -56,15 +56,16 @@ namespace MantidQt public: QPeaksTableModel(boost::shared_ptr<const Mantid::API::IPeaksWorkspace> peaksWS); void update(); - int rowCount(const QModelIndex &parent) const; - int columnCount(const QModelIndex &parent) const; - QVariant data(const QModelIndex &index, int role) const; - QVariant headerData(int section, Qt::Orientation orientation, int role) const; - Qt::ItemFlags flags(const QModelIndex &index) const; - void sort (int column, Qt::SortOrder); + int rowCount(const QModelIndex &parent) const override; + int columnCount(const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + void sort(int column, Qt::SortOrder) override; int numCharacters(const int column) const; std::vector<int> defaultHideCols(); - ~QPeaksTableModel(); + ~QPeaksTableModel() override; void setPeaksWorkspace(boost::shared_ptr<const Mantid::API::IPeaksWorkspace> peaksWS); signals: void peaksSorted(const std::string&, const bool); diff --git a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QScienceSpinBox.h b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QScienceSpinBox.h index 2bb03133fa4d7a0a31e3a1447b5bef6883812fa4..e18648f019d19edef760ea2766e007c9e23a8e6d 100644 --- a/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QScienceSpinBox.h +++ b/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QScienceSpinBox.h @@ -18,8 +18,8 @@ public: int decimals() const; void setDecimals(int value); - QString textFromValue ( double value ) const; - double valueFromText ( const QString & text ) const; + QString textFromValue(double value) const override; + double valueFromText(const QString &text) const override; void setLogSteps(bool logSteps); @@ -35,11 +35,11 @@ private: void initLocalValues(QWidget *parent); bool isIntermediateValue(const QString &str) const; QVariant validateAndInterpret(QString &input, int &pos, QValidator::State &state) const; - QValidator::State validate(QString &text, int &pos) const; - void fixup(QString &input) const; + QValidator::State validate(QString &text, int &pos) const override; + void fixup(QString &input) const override; QString stripped(const QString &t, int *pos) const; double round(double value) const; - void stepBy(int steps); + void stepBy(int steps) override; public slots: void stepDown(); diff --git a/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/ArrayDataSource.h b/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/ArrayDataSource.h index 62b9b418c654cd889326419cc69bd5b4d7d17e61..0ce3f3a116fda77bfc0b61082182a0e9fe020033 100644 --- a/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/ArrayDataSource.h +++ b/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/ArrayDataSource.h @@ -51,27 +51,22 @@ class EXPORT_OPT_MANTIDQT_SPECTRUMVIEWER ArrayDataSource: public SpectrumDataSou size_t total_rows, size_t total_cols, std::vector<float> data ); - ~ArrayDataSource(); + ~ArrayDataSource() override; - virtual bool hasData(const std::string& wsName, - const boost::shared_ptr<Mantid::API::Workspace> ws); + bool hasData(const std::string &wsName, + const boost::shared_ptr<Mantid::API::Workspace> ws) override; /// Get DataArray covering full range of data in x, and y directions - DataArray_const_sptr getDataArray( bool is_log_x ); + DataArray_const_sptr getDataArray(bool is_log_x) override; /// Get DataArray covering restricted range of data - DataArray_const_sptr getDataArray( double xMin, - double xMax, - double yMin, - double yMax, - size_t nRows, - size_t nCols, - bool isLogX ); + DataArray_const_sptr getDataArray(double xMin, double xMax, double yMin, + double yMax, size_t nRows, size_t nCols, + bool isLogX) override; /// Get a list containing pairs of strings with information about x,y - void getInfoList( double x, - double y, - std::vector<std::string> &list ); + void getInfoList(double x, double y, + std::vector<std::string> &list) override; private: std::vector<float> m_data; diff --git a/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/SpectrumPlotItem.h b/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/SpectrumPlotItem.h index 22ae48d89de8c933db14f2e2ea20102733f6dc8e..3e7e297a7cbc3c233a50f3e063ab0392f5938c00 100644 --- a/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/SpectrumPlotItem.h +++ b/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/SpectrumPlotItem.h @@ -53,7 +53,7 @@ public: /// Construct basic plot item with NO data to plot. SpectrumPlotItem(); - virtual ~SpectrumPlotItem(); + ~SpectrumPlotItem() override; /// Specify the data to be plotted and the color table to use void setData( DataArray_const_sptr dataArray, @@ -64,10 +64,8 @@ public: void setIntensityTable( std::vector<double>* intensityTable ); /// Draw the image (this is called by QWT and must not be called directly.) - virtual void draw( QPainter * painter, - const QwtScaleMap & xMap, - const QwtScaleMap & yMap, - const QRect & canvasRect) const; + void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, + const QRect &canvasRect) const override; protected: int m_bufferID; // set to 0 or 1 to select buffer diff --git a/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/TrackingPicker.h b/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/TrackingPicker.h index 9139d1569aee437ec6178fb4ea8dd0fbd6548f24..7b97c6a4a7f2220ecfbd420643dd66b4befcd4d0 100644 --- a/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/TrackingPicker.h +++ b/MantidQt/SpectrumViewer/inc/MantidQtSpectrumViewer/TrackingPicker.h @@ -61,8 +61,8 @@ signals: protected: /// Override base class method, to emit a mousedMoved() signal for each move - QwtText trackerText( const QPoint & point ) const; - QwtText trackerText( const QwtDoublePoint & pos) const; + QwtText trackerText(const QPoint &point) const override; + QwtText trackerText(const QwtDoublePoint &pos) const override; private: bool m_hideReadout; diff --git a/QtPropertyBrowser/src/ButtonEditorFactory.h b/QtPropertyBrowser/src/ButtonEditorFactory.h index d1215588b6b1bd45c274180a59777dc7e6329b50..38179f4106a36dcbd1b1f3ef6435a3a3d875e625 100644 --- a/QtPropertyBrowser/src/ButtonEditorFactory.h +++ b/QtPropertyBrowser/src/ButtonEditorFactory.h @@ -37,20 +37,18 @@ public: } protected: - void connectPropertyManager(ManagerType *manager) - { + void connectPropertyManager(ManagerType *manager) override { (void) manager; // Unused // Do nothing } - void disconnectPropertyManager(ManagerType *manager) - { + void disconnectPropertyManager(ManagerType *manager) override { (void) manager; // Unused // Do nothing } - QWidget *createEditorForManager(ManagerType *manager, QtProperty *property, QWidget *parent) - { + QWidget *createEditorForManager(ManagerType *manager, QtProperty *property, + QWidget *parent) override { (void) manager; // Unused auto button = new ButtonEditor(property, parent); this->connect(button,SIGNAL(buttonClicked(QtProperty *)),this,SIGNAL(buttonClicked(QtProperty *))); diff --git a/QtPropertyBrowser/src/DoubleEditorFactory.h b/QtPropertyBrowser/src/DoubleEditorFactory.h index b4d0f6c9105321ec94ec4730e092dc2d47f8df9d..c5c7550b33a0a5efad3fc1134a66c0c75c466d86 100644 --- a/QtPropertyBrowser/src/DoubleEditorFactory.h +++ b/QtPropertyBrowser/src/DoubleEditorFactory.h @@ -20,20 +20,19 @@ public: {} protected: - void connectPropertyManager(DoubleManagerType *manager) - { + void connectPropertyManager(DoubleManagerType *manager) override { (void) manager; // Unused // Do nothing } - void disconnectPropertyManager(DoubleManagerType *manager) - { + void disconnectPropertyManager(DoubleManagerType *manager) override { (void) manager; // Unused // Do nothing } - QWidget *createEditorForManager(DoubleManagerType *manager, QtProperty *property, QWidget *parent) - { + QWidget *createEditorForManager(DoubleManagerType *manager, + QtProperty *property, + QWidget *parent) override { (void) manager; // Unused return new DoubleEditorType(property, parent); @@ -48,7 +47,7 @@ class QT_QTPROPERTYBROWSER_EXPORT DoubleEditor: public QLineEdit Q_OBJECT public: DoubleEditor(QtProperty *property, QWidget *parent); - ~DoubleEditor(); + ~DoubleEditor() override; void setValue(const double& d); protected slots: virtual void updateProperty(); @@ -69,7 +68,7 @@ class QT_QTPROPERTYBROWSER_EXPORT ParameterEditor : public DoubleEditor public: ParameterEditor(QtProperty *property, QWidget *parent) : DoubleEditor(property, parent) {} protected slots: - virtual void updateProperty(); + void updateProperty() override; }; /** diff --git a/QtPropertyBrowser/src/ParameterPropertyManager.h b/QtPropertyBrowser/src/ParameterPropertyManager.h index bc99f690f94785e02c25c77e549f85df14503c9d..2d28d2e8a251219d3b9e0ff62a38ea5c52a2325b 100644 --- a/QtPropertyBrowser/src/ParameterPropertyManager.h +++ b/QtPropertyBrowser/src/ParameterPropertyManager.h @@ -63,7 +63,7 @@ public Q_SLOTS: protected: /// Text representation of the property - virtual QString valueText(const QtProperty* property) const; + QString valueText(const QtProperty *property) const override; private Q_SLOTS: /// Updates the tooltip of the property diff --git a/QtPropertyBrowser/src/qteditorfactory.h b/QtPropertyBrowser/src/qteditorfactory.h index 8e32ba84d2e7b2cc5a5f94ba2258aed82bacf211..e57a68fe3e1a981023e281ac10ca7436d58170ed 100644 --- a/QtPropertyBrowser/src/qteditorfactory.h +++ b/QtPropertyBrowser/src/qteditorfactory.h @@ -101,12 +101,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFact Q_OBJECT public: QtSpinBoxFactory(QObject *parent = 0); - ~QtSpinBoxFactory(); + ~QtSpinBoxFactory() override; + protected: - void connectPropertyManager(QtIntPropertyManager *manager); - QWidget *createEditorForManager(QtIntPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtIntPropertyManager *manager); + void connectPropertyManager(QtIntPropertyManager *manager) override; + QWidget *createEditorForManager(QtIntPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtIntPropertyManager *manager) override; + private: QtSpinBoxFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSpinBoxFactory) @@ -125,12 +128,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFacto Q_OBJECT public: QtSliderFactory(QObject *parent = 0); - ~QtSliderFactory(); + ~QtSliderFactory() override; + protected: - void connectPropertyManager(QtIntPropertyManager *manager); - QWidget *createEditorForManager(QtIntPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtIntPropertyManager *manager); + void connectPropertyManager(QtIntPropertyManager *manager) override; + QWidget *createEditorForManager(QtIntPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtIntPropertyManager *manager) override; + private: QtSliderFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSliderFactory) @@ -149,12 +155,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFa Q_OBJECT public: QtScrollBarFactory(QObject *parent = 0); - ~QtScrollBarFactory(); + ~QtScrollBarFactory() override; + protected: - void connectPropertyManager(QtIntPropertyManager *manager); - QWidget *createEditorForManager(QtIntPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtIntPropertyManager *manager); + void connectPropertyManager(QtIntPropertyManager *manager) override; + QWidget *createEditorForManager(QtIntPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtIntPropertyManager *manager) override; + private: QtScrollBarFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtScrollBarFactory) @@ -173,12 +182,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFac Q_OBJECT public: QtCheckBoxFactory(QObject *parent = 0); - ~QtCheckBoxFactory(); + ~QtCheckBoxFactory() override; + protected: - void connectPropertyManager(QtBoolPropertyManager *manager); - QWidget *createEditorForManager(QtBoolPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtBoolPropertyManager *manager); + void connectPropertyManager(QtBoolPropertyManager *manager) override; + QWidget *createEditorForManager(QtBoolPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtBoolPropertyManager *manager) override; + private: QtCheckBoxFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCheckBoxFactory) @@ -195,12 +207,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEdit Q_OBJECT public: QtDoubleSpinBoxFactory(QObject *parent = 0); - ~QtDoubleSpinBoxFactory(); + ~QtDoubleSpinBoxFactory() override; + protected: - void connectPropertyManager(QtDoublePropertyManager *manager); - QWidget *createEditorForManager(QtDoublePropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtDoublePropertyManager *manager); + void connectPropertyManager(QtDoublePropertyManager *manager) override; + QWidget *createEditorForManager(QtDoublePropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtDoublePropertyManager *manager) override; + private: QtDoubleSpinBoxFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) @@ -220,12 +235,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFac Q_OBJECT public: QtLineEditFactory(QObject *parent = 0); - ~QtLineEditFactory(); + ~QtLineEditFactory() override; + protected: - void connectPropertyManager(QtStringPropertyManager *manager); - QWidget *createEditorForManager(QtStringPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtStringPropertyManager *manager); + void connectPropertyManager(QtStringPropertyManager *manager) override; + QWidget *createEditorForManager(QtStringPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtStringPropertyManager *manager) override; + private: QtLineEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtLineEditFactory) @@ -243,12 +261,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFac Q_OBJECT public: QtDateEditFactory(QObject *parent = 0); - ~QtDateEditFactory(); + ~QtDateEditFactory() override; + protected: - void connectPropertyManager(QtDatePropertyManager *manager); - QWidget *createEditorForManager(QtDatePropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtDatePropertyManager *manager); + void connectPropertyManager(QtDatePropertyManager *manager) override; + QWidget *createEditorForManager(QtDatePropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtDatePropertyManager *manager) override; + private: QtDateEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDateEditFactory) @@ -267,12 +288,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFac Q_OBJECT public: QtTimeEditFactory(QObject *parent = 0); - ~QtTimeEditFactory(); + ~QtTimeEditFactory() override; + protected: - void connectPropertyManager(QtTimePropertyManager *manager); - QWidget *createEditorForManager(QtTimePropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtTimePropertyManager *manager); + void connectPropertyManager(QtTimePropertyManager *manager) override; + QWidget *createEditorForManager(QtTimePropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtTimePropertyManager *manager) override; + private: QtTimeEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtTimeEditFactory) @@ -289,12 +313,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEdito Q_OBJECT public: QtDateTimeEditFactory(QObject *parent = 0); - ~QtDateTimeEditFactory(); + ~QtDateTimeEditFactory() override; + protected: - void connectPropertyManager(QtDateTimePropertyManager *manager); - QWidget *createEditorForManager(QtDateTimePropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtDateTimePropertyManager *manager); + void connectPropertyManager(QtDateTimePropertyManager *manager) override; + QWidget *createEditorForManager(QtDateTimePropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtDateTimePropertyManager *manager) override; + private: QtDateTimeEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDateTimeEditFactory) @@ -311,12 +338,16 @@ class QT_QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstract Q_OBJECT public: QtKeySequenceEditorFactory(QObject *parent = 0); - ~QtKeySequenceEditorFactory(); + ~QtKeySequenceEditorFactory() override; + protected: - void connectPropertyManager(QtKeySequencePropertyManager *manager); - QWidget *createEditorForManager(QtKeySequencePropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtKeySequencePropertyManager *manager); + void connectPropertyManager(QtKeySequencePropertyManager *manager) override; + QWidget *createEditorForManager(QtKeySequencePropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void + disconnectPropertyManager(QtKeySequencePropertyManager *manager) override; + private: QtKeySequenceEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) @@ -333,12 +364,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorF Q_OBJECT public: QtCharEditorFactory(QObject *parent = 0); - ~QtCharEditorFactory(); + ~QtCharEditorFactory() override; + protected: - void connectPropertyManager(QtCharPropertyManager *manager); - QWidget *createEditorForManager(QtCharPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtCharPropertyManager *manager); + void connectPropertyManager(QtCharPropertyManager *manager) override; + QWidget *createEditorForManager(QtCharPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtCharPropertyManager *manager) override; + private: QtCharEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCharEditorFactory) @@ -355,12 +389,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorF Q_OBJECT public: QtEnumEditorFactory(QObject *parent = 0); - ~QtEnumEditorFactory(); + ~QtEnumEditorFactory() override; + protected: - void connectPropertyManager(QtEnumPropertyManager *manager); - QWidget *createEditorForManager(QtEnumPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtEnumPropertyManager *manager); + void connectPropertyManager(QtEnumPropertyManager *manager) override; + QWidget *createEditorForManager(QtEnumPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtEnumPropertyManager *manager) override; + private: QtEnumEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtEnumEditorFactory) @@ -381,12 +418,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEdito Q_OBJECT public: QtCursorEditorFactory(QObject *parent = 0); - ~QtCursorEditorFactory(); + ~QtCursorEditorFactory() override; + protected: - void connectPropertyManager(QtCursorPropertyManager *manager); - QWidget *createEditorForManager(QtCursorPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtCursorPropertyManager *manager); + void connectPropertyManager(QtCursorPropertyManager *manager) override; + QWidget *createEditorForManager(QtCursorPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtCursorPropertyManager *manager) override; + private: QtCursorEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCursorEditorFactory) @@ -403,12 +443,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditor Q_OBJECT public: QtColorEditorFactory(QObject *parent = 0); - ~QtColorEditorFactory(); + ~QtColorEditorFactory() override; + protected: - void connectPropertyManager(QtColorPropertyManager *manager); - QWidget *createEditorForManager(QtColorPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtColorPropertyManager *manager); + void connectPropertyManager(QtColorPropertyManager *manager) override; + QWidget *createEditorForManager(QtColorPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtColorPropertyManager *manager) override; + private: QtColorEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtColorEditorFactory) @@ -425,12 +468,15 @@ class QT_QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorF Q_OBJECT public: QtFontEditorFactory(QObject *parent = 0); - ~QtFontEditorFactory(); + ~QtFontEditorFactory() override; + protected: - void connectPropertyManager(QtFontPropertyManager *manager); - QWidget *createEditorForManager(QtFontPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtFontPropertyManager *manager); + void connectPropertyManager(QtFontPropertyManager *manager) override; + QWidget *createEditorForManager(QtFontPropertyManager *manager, + QtProperty *property, + QWidget *parent) override; + void disconnectPropertyManager(QtFontPropertyManager *manager) override; + private: QtFontEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtFontEditorFactory) diff --git a/QtPropertyBrowser/src/qtpropertybrowser.h b/QtPropertyBrowser/src/qtpropertybrowser.h index 437dec9eca7d782ad48ee549695a1a621fff09d1..a5586d0e21de4bc69351cce01d696dcd5950500e 100644 --- a/QtPropertyBrowser/src/qtpropertybrowser.h +++ b/QtPropertyBrowser/src/qtpropertybrowser.h @@ -165,7 +165,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject public: explicit QtAbstractPropertyManager(QObject *parent = 0); - ~QtAbstractPropertyManager(); + ~QtAbstractPropertyManager() override; QSet<QtProperty *> properties() const; void clear() const; @@ -217,8 +217,7 @@ class QtAbstractEditorFactory : public QtAbstractEditorFactoryBase { public: explicit QtAbstractEditorFactory(QObject *parent) : QtAbstractEditorFactoryBase(parent) {} - QWidget *createEditor(QtProperty *property, QWidget *parent) - { + QWidget *createEditor(QtProperty *property, QWidget *parent) override { QSetIterator<PropertyManager *> it(m_managers); while (it.hasNext()) { PropertyManager *manager = it.next(); @@ -268,8 +267,7 @@ protected: virtual QWidget *createEditorForManager(PropertyManager *manager, QtProperty *property, QWidget *parent) = 0; virtual void disconnectPropertyManager(PropertyManager *manager) = 0; - void managerDestroyed(QObject *manager) - { + void managerDestroyed(QObject *manager) override { QSetIterator<PropertyManager *> it(m_managers); while (it.hasNext()) { PropertyManager *m = it.next(); @@ -280,8 +278,7 @@ protected: } } private: - void breakConnection(QtAbstractPropertyManager *manager) - { + void breakConnection(QtAbstractPropertyManager *manager) override { QSetIterator<PropertyManager *> it(m_managers); while (it.hasNext()) { PropertyManager *m = it.next(); @@ -321,7 +318,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyBrowser : public QWidget public: explicit QtAbstractPropertyBrowser(QWidget *parent = 0); - ~QtAbstractPropertyBrowser(); + ~QtAbstractPropertyBrowser() override; QList<QtProperty *> properties() const; QList<QtBrowserItem *> items(QtProperty *property) const; diff --git a/QtPropertyBrowser/src/qtpropertymanager.h b/QtPropertyBrowser/src/qtpropertymanager.h index 709f2abf77389fb3c8a711664db5d1a4eab13a04..b43b32380bfe17ea2e19b6b55bf17c759e7fffa3 100644 --- a/QtPropertyBrowser/src/qtpropertymanager.h +++ b/QtPropertyBrowser/src/qtpropertymanager.h @@ -104,13 +104,13 @@ class QT_QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractProp Q_OBJECT public: QtGroupPropertyManager(QObject *parent = 0); - ~QtGroupPropertyManager(); + ~QtGroupPropertyManager() override; protected: - virtual bool hasValue(const QtProperty *property) const; + bool hasValue(const QtProperty *property) const override; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; }; class QtIntPropertyManagerPrivate; @@ -120,7 +120,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtIntPropertyManager : public QtAbstractProper Q_OBJECT public: QtIntPropertyManager(QObject *parent = 0); - ~QtIntPropertyManager(); + ~QtIntPropertyManager() override; int value(const QtProperty *property) const; int minimum(const QtProperty *property) const; @@ -138,9 +138,10 @@ Q_SIGNALS: void rangeChanged(QtProperty *property, int minVal, int maxVal); void singleStepChanged(QtProperty *property, int step); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtIntPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtIntPropertyManager) @@ -154,7 +155,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPrope Q_OBJECT public: QtBoolPropertyManager(QObject *parent = 0); - ~QtBoolPropertyManager(); + ~QtBoolPropertyManager() override; bool value(const QtProperty *property) const; @@ -163,10 +164,11 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, bool val); protected: - QString valueText(const QtProperty *property) const; - QIcon valueIcon(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + QIcon valueIcon(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtBoolPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtBoolPropertyManager) @@ -180,7 +182,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDoublePropertyManager : public QtAbstractPro Q_OBJECT public: QtDoublePropertyManager(QObject *parent = 0); - ~QtDoublePropertyManager(); + ~QtDoublePropertyManager() override; double value(const QtProperty *property) const; double minimum(const QtProperty *property) const; @@ -201,9 +203,10 @@ Q_SIGNALS: void singleStepChanged(QtProperty *property, double step); void decimalsChanged(QtProperty *property, int prec); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtDoublePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDoublePropertyManager) @@ -217,7 +220,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtStringPropertyManager : public QtAbstractPro Q_OBJECT public: QtStringPropertyManager(QObject *parent = 0); - ~QtStringPropertyManager(); + ~QtStringPropertyManager() override; QString value(const QtProperty *property) const; QRegExp regExp(const QtProperty *property) const; @@ -229,9 +232,10 @@ Q_SIGNALS: void valueChanged(QtProperty *property, const QString &val); void regExpChanged(QtProperty *property, const QRegExp ®Exp); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtStringPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtStringPropertyManager) @@ -245,7 +249,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDatePropertyManager : public QtAbstractPrope Q_OBJECT public: QtDatePropertyManager(QObject *parent = 0); - ~QtDatePropertyManager(); + ~QtDatePropertyManager() override; QDate value(const QtProperty *property) const; QDate minimum(const QtProperty *property) const; @@ -260,9 +264,10 @@ Q_SIGNALS: void valueChanged(QtProperty *property, const QDate &val); void rangeChanged(QtProperty *property, const QDate &minVal, const QDate &maxVal); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtDatePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDatePropertyManager) @@ -276,7 +281,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtTimePropertyManager : public QtAbstractPrope Q_OBJECT public: QtTimePropertyManager(QObject *parent = 0); - ~QtTimePropertyManager(); + ~QtTimePropertyManager() override; QTime value(const QtProperty *property) const; @@ -285,9 +290,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QTime &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtTimePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtTimePropertyManager) @@ -301,7 +307,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateTimePropertyManager : public QtAbstractP Q_OBJECT public: QtDateTimePropertyManager(QObject *parent = 0); - ~QtDateTimePropertyManager(); + ~QtDateTimePropertyManager() override; QDateTime value(const QtProperty *property) const; @@ -310,9 +316,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QDateTime &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtDateTimePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDateTimePropertyManager) @@ -326,7 +333,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtKeySequencePropertyManager : public QtAbstra Q_OBJECT public: QtKeySequencePropertyManager(QObject *parent = 0); - ~QtKeySequencePropertyManager(); + ~QtKeySequencePropertyManager() override; QKeySequence value(const QtProperty *property) const; @@ -335,9 +342,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QKeySequence &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtKeySequencePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) @@ -351,7 +359,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCharPropertyManager : public QtAbstractPrope Q_OBJECT public: QtCharPropertyManager(QObject *parent = 0); - ~QtCharPropertyManager(); + ~QtCharPropertyManager() override; QChar value(const QtProperty *property) const; @@ -360,9 +368,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QChar &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtCharPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCharPropertyManager) @@ -377,7 +386,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtLocalePropertyManager : public QtAbstractPro Q_OBJECT public: QtLocalePropertyManager(QObject *parent = 0); - ~QtLocalePropertyManager(); + ~QtLocalePropertyManager() override; QtEnumPropertyManager *subEnumPropertyManager() const; @@ -388,9 +397,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QLocale &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtLocalePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtLocalePropertyManager) @@ -406,7 +416,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtPointPropertyManager : public QtAbstractProp Q_OBJECT public: QtPointPropertyManager(QObject *parent = 0); - ~QtPointPropertyManager(); + ~QtPointPropertyManager() override; QtIntPropertyManager *subIntPropertyManager() const; @@ -417,9 +427,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QPoint &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtPointPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtPointPropertyManager) @@ -435,7 +446,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtPointFPropertyManager : public QtAbstractPro Q_OBJECT public: QtPointFPropertyManager(QObject *parent = 0); - ~QtPointFPropertyManager(); + ~QtPointFPropertyManager() override; QtDoublePropertyManager *subDoublePropertyManager() const; @@ -449,9 +460,10 @@ Q_SIGNALS: void valueChanged(QtProperty *property, const QPointF &val); void decimalsChanged(QtProperty *property, int prec); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtPointFPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtPointFPropertyManager) @@ -467,7 +479,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSizePropertyManager : public QtAbstractPrope Q_OBJECT public: QtSizePropertyManager(QObject *parent = 0); - ~QtSizePropertyManager(); + ~QtSizePropertyManager() override; QtIntPropertyManager *subIntPropertyManager() const; @@ -484,9 +496,10 @@ Q_SIGNALS: void valueChanged(QtProperty *property, const QSize &val); void rangeChanged(QtProperty *property, const QSize &minVal, const QSize &maxVal); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtSizePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSizePropertyManager) @@ -502,7 +515,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSizeFPropertyManager : public QtAbstractProp Q_OBJECT public: QtSizeFPropertyManager(QObject *parent = 0); - ~QtSizeFPropertyManager(); + ~QtSizeFPropertyManager() override; QtDoublePropertyManager *subDoublePropertyManager() const; @@ -522,9 +535,10 @@ Q_SIGNALS: void rangeChanged(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal); void decimalsChanged(QtProperty *property, int prec); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtSizeFPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSizeFPropertyManager) @@ -540,7 +554,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtRectPropertyManager : public QtAbstractPrope Q_OBJECT public: QtRectPropertyManager(QObject *parent = 0); - ~QtRectPropertyManager(); + ~QtRectPropertyManager() override; QtIntPropertyManager *subIntPropertyManager() const; @@ -554,9 +568,10 @@ Q_SIGNALS: void valueChanged(QtProperty *property, const QRect &val); void constraintChanged(QtProperty *property, const QRect &constraint); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtRectPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtRectPropertyManager) @@ -572,7 +587,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtRectFPropertyManager : public QtAbstractProp Q_OBJECT public: QtRectFPropertyManager(QObject *parent = 0); - ~QtRectFPropertyManager(); + ~QtRectFPropertyManager() override; QtDoublePropertyManager *subDoublePropertyManager() const; @@ -589,9 +604,10 @@ Q_SIGNALS: void constraintChanged(QtProperty *property, const QRectF &constraint); void decimalsChanged(QtProperty *property, int prec); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtRectFPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtRectFPropertyManager) @@ -607,7 +623,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtEnumPropertyManager : public QtAbstractPrope Q_OBJECT public: QtEnumPropertyManager(QObject *parent = 0); - ~QtEnumPropertyManager(); + ~QtEnumPropertyManager() override; int value(const QtProperty *property) const; QStringList enumNames(const QtProperty *property) const; @@ -622,10 +638,11 @@ Q_SIGNALS: void enumNamesChanged(QtProperty *property, const QStringList &names); void enumIconsChanged(QtProperty *property, const QMap<int, QIcon> &icons); protected: - QString valueText(const QtProperty *property) const; - QIcon valueIcon(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + QIcon valueIcon(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtEnumPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtEnumPropertyManager) @@ -639,7 +656,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtFlagPropertyManager : public QtAbstractPrope Q_OBJECT public: QtFlagPropertyManager(QObject *parent = 0); - ~QtFlagPropertyManager(); + ~QtFlagPropertyManager() override; QtBoolPropertyManager *subBoolPropertyManager() const; @@ -653,9 +670,10 @@ Q_SIGNALS: void valueChanged(QtProperty *property, int val); void flagNamesChanged(QtProperty *property, const QStringList &names); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtFlagPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtFlagPropertyManager) @@ -671,7 +689,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSizePolicyPropertyManager : public QtAbstrac Q_OBJECT public: QtSizePolicyPropertyManager(QObject *parent = 0); - ~QtSizePolicyPropertyManager(); + ~QtSizePolicyPropertyManager() override; QtIntPropertyManager *subIntPropertyManager() const; QtEnumPropertyManager *subEnumPropertyManager() const; @@ -683,9 +701,10 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QSizePolicy &val); protected: - QString valueText(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtSizePolicyPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) @@ -702,7 +721,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtFontPropertyManager : public QtAbstractPrope Q_OBJECT public: QtFontPropertyManager(QObject *parent = 0); - ~QtFontPropertyManager(); + ~QtFontPropertyManager() override; QtIntPropertyManager *subIntPropertyManager() const; QtEnumPropertyManager *subEnumPropertyManager() const; @@ -715,10 +734,11 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QFont &val); protected: - QString valueText(const QtProperty *property) const; - QIcon valueIcon(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + QIcon valueIcon(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtFontPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtFontPropertyManager) @@ -738,7 +758,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtColorPropertyManager : public QtAbstractProp Q_OBJECT public: QtColorPropertyManager(QObject *parent = 0); - ~QtColorPropertyManager(); + ~QtColorPropertyManager() override; QtIntPropertyManager *subIntPropertyManager() const; @@ -749,10 +769,11 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QColor &val); protected: - QString valueText(const QtProperty *property) const; - QIcon valueIcon(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + QIcon valueIcon(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtColorPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtColorPropertyManager) @@ -768,7 +789,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCursorPropertyManager : public QtAbstractPro Q_OBJECT public: QtCursorPropertyManager(QObject *parent = 0); - ~QtCursorPropertyManager(); + ~QtCursorPropertyManager() override; #ifndef QT_NO_CURSOR QCursor value(const QtProperty *property) const; @@ -779,10 +800,11 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(QtProperty *property, const QCursor &val); protected: - QString valueText(const QtProperty *property) const; - QIcon valueIcon(const QtProperty *property) const; - virtual void initializeProperty(QtProperty *property); - virtual void uninitializeProperty(QtProperty *property); + QString valueText(const QtProperty *property) const override; + QIcon valueIcon(const QtProperty *property) const override; + void initializeProperty(QtProperty *property) override; + void uninitializeProperty(QtProperty *property) override; + private: QtCursorPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCursorPropertyManager) diff --git a/QtPropertyBrowser/src/qttreepropertybrowser.h b/QtPropertyBrowser/src/qttreepropertybrowser.h index 21161029d8a45863288174c2476a3bfb7a133bdd..0115cbbcb1abbca7528382df8629ad5fd7b77301 100644 --- a/QtPropertyBrowser/src/qttreepropertybrowser.h +++ b/QtPropertyBrowser/src/qttreepropertybrowser.h @@ -119,7 +119,7 @@ public: }; QtTreePropertyBrowser(QWidget *parent = 0, const QStringList &options = QStringList(), bool darkTopLevel = true); - ~QtTreePropertyBrowser(); + ~QtTreePropertyBrowser() override; int indentation() const; void setIndentation(int i); @@ -166,9 +166,9 @@ public Q_SLOTS: void closeEditor(); protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); + void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem) override; + void itemRemoved(QtBrowserItem *item) override; + void itemChanged(QtBrowserItem *item) override; private: