Also add "override" keyword when missing. Signed-off-by: Benjamin ROBIN <dev@xxxxxxxxxxxxx> --- src/KsGLWidget.hpp | 41 +++++++++++++++++++++-------------------- src/KsModels.hpp | 9 +++++---- src/KsPlotTools.hpp | 2 +- src/KsTraceViewer.hpp | 9 +++++---- src/KsWidgetsLib.hpp | 9 +++++---- 5 files changed, 37 insertions(+), 33 deletions(-) diff --git a/src/KsGLWidget.hpp b/src/KsGLWidget.hpp index 1c6253f..cafc70b 100644 --- a/src/KsGLWidget.hpp +++ b/src/KsGLWidget.hpp @@ -75,12 +75,6 @@ public: ~KsGLWidget(); - void initializeGL() override; - - void resizeGL(int w, int h) override; - - void paintGL() override; - void render(); void reset(); @@ -88,20 +82,6 @@ public: /** Reprocess all graphs. */ void updateGeom() {resizeGL(width(), height());} - void mousePressEvent(QMouseEvent *event); - - void mouseMoveEvent(QMouseEvent *event); - - void mouseReleaseEvent(QMouseEvent *event); - - void mouseDoubleClickEvent(QMouseEvent *event); - - void wheelEvent(QWheelEvent * event); - - void keyPressEvent(QKeyEvent *event); - - void keyReleaseEvent(QKeyEvent *event); - void loadData(KsDataStore *data, bool resetPlots); void loadColors(); @@ -214,6 +194,27 @@ public: /** Free the list of plugin-defined shapes. */ void freePluginShapes(); +protected: + void initializeGL() override; + + void resizeGL(int w, int h) override; + + void paintGL() override; + + void mousePressEvent(QMouseEvent *event) override; + + void mouseMoveEvent(QMouseEvent *event) override; + + void mouseReleaseEvent(QMouseEvent *event) override; + + void mouseDoubleClickEvent(QMouseEvent *event) override; + + void wheelEvent(QWheelEvent * event) override; + + void keyPressEvent(QKeyEvent *event) override; + + void keyReleaseEvent(QKeyEvent *event) override; + signals: /** * This signal is emitted when the mouse moves over a visible diff --git a/src/KsModels.hpp b/src/KsModels.hpp index 2883ce3..e113cf5 100644 --- a/src/KsModels.hpp +++ b/src/KsModels.hpp @@ -172,9 +172,6 @@ class KsFilterProxyModel : public QSortFilterProxyModel public: explicit KsFilterProxyModel(QObject *parent = nullptr); - bool filterAcceptsRow(int sourceRow, - const QModelIndex &sourceParent) const override; - void fill(KsDataStore *data); void setSource(KsViewModel *s); @@ -224,9 +221,13 @@ public: /** A mutex used by the condition variable. */ std::mutex _mutex; - /** A flag used to stop the serch for all threads. */ + /** A flag used to stop the search for all threads. */ bool _searchStop; +protected: + bool filterAcceptsRow(int sourceRow, + const QModelIndex &sourceParent) const override; + private: int _searchProgress; diff --git a/src/KsPlotTools.hpp b/src/KsPlotTools.hpp index 68bd6f7..8f53077 100644 --- a/src/KsPlotTools.hpp +++ b/src/KsPlotTools.hpp @@ -662,7 +662,7 @@ private: /** The vertical size (height) of the graphical element. */ int _height; - void _draw(const Color &col, float size) const; + void _draw(const Color &col, float size) const override; }; }; // KsPlot diff --git a/src/KsTraceViewer.hpp b/src/KsTraceViewer.hpp index 99e4d38..7cc5751 100644 --- a/src/KsTraceViewer.hpp +++ b/src/KsTraceViewer.hpp @@ -79,10 +79,6 @@ public: void setTopRow(size_t r); - void resizeEvent(QResizeEvent* event) override; - - void keyReleaseEvent(QKeyEvent *event); - void markSwitch(); void showRow(size_t r, bool mark); @@ -101,6 +97,11 @@ public: _model.loadColors(); } +protected: + void resizeEvent(QResizeEvent* event) override; + + void keyReleaseEvent(QKeyEvent *event) override; + signals: /** Signal emitted when new row is selected. */ void select(size_t); diff --git a/src/KsWidgetsLib.hpp b/src/KsWidgetsLib.hpp index cc2dc99..e21441d 100644 --- a/src/KsWidgetsLib.hpp +++ b/src/KsWidgetsLib.hpp @@ -261,20 +261,21 @@ public: */ int sd() const {return _sd;} + /** The user provided an input. The widget has been modified. */ + bool _userInput; + +protected: /** * Reimplemented event handler used to update the geometry of the widget on * resize events. */ - void resizeEvent(QResizeEvent* event) + void resizeEvent(QResizeEvent* event) override { KsUtils::setElidedText(&_streamLabel, _streamName, Qt::ElideLeft, width()); QApplication::processEvents(); } - /** The user provided an input. The widget has been modified. */ - bool _userInput; - protected: QToolBar _tb; -- 2.43.0