Commit 68d76d81 authored by Mathieu Faverge's avatar Mathieu Faverge

Apply patch 8 from issue #13 - modernise use of override

parent 626b8c85
......@@ -87,14 +87,14 @@ signals:
void clicked();
protected:
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *e);
void keyReleaseEvent(QKeyEvent *e);
void paintEvent(QPaintEvent *e);
void focusInEvent(QFocusEvent *e);
void focusOutEvent(QFocusEvent *e);
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void keyPressEvent(QKeyEvent *e) override;
void keyReleaseEvent(QKeyEvent *e) override;
void paintEvent(QPaintEvent *e) override;
void focusInEvent(QFocusEvent *e) override;
void focusOutEvent(QFocusEvent *e) override;
};
class ColorPickerItem : public QFrame
......@@ -104,7 +104,7 @@ class ColorPickerItem : public QFrame
public:
ColorPickerItem(const QColor &color = Qt::white, const QString &text = QString::null,
QWidget *parent = 0);
~ColorPickerItem();
~ColorPickerItem() override;
QColor color() const;
QString text() const;
......@@ -119,10 +119,10 @@ public slots:
void setColor(const QColor &color, const QString &text = QString());
protected:
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void paintEvent(QPaintEvent *e) override;
private:
QColor c;
......@@ -138,7 +138,7 @@ class ColorPickerPopup : public QFrame
public:
ColorPickerPopup(int width, bool withColorDialog,
QWidget *parent = 0);
~ColorPickerPopup();
~ColorPickerPopup() override;
void insertColor(const QColor &col, const QString &text, int index);
void exec();
......@@ -161,10 +161,10 @@ protected slots:
void updateSelected();
protected:
void keyPressEvent(QKeyEvent *e);
void showEvent(QShowEvent *e);
void hideEvent(QHideEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *e) override;
void showEvent(QShowEvent *e) override;
void hideEvent(QHideEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void regenerateGrid();
......@@ -191,7 +191,7 @@ public:
QtColorPicker(QWidget *parent = 0,
int columns = -1, bool enableColorDialog = true);
~QtColorPicker();
~QtColorPicker() override;
void insertColor(const QColor &color, const QString &text = QString::null, int index = -1);
......@@ -213,7 +213,7 @@ Q_SIGNALS:
void colorChanged(const QColor &);
protected:
void paintEvent(QPaintEvent *e);
void paintEvent(QPaintEvent *e) override;
private Q_SLOTS:
void buttonPressed(bool toggled);
......
......@@ -185,7 +185,7 @@ public:
/*!
* \brief The class destructor.
*/
~Session();
~Session() override;
/*!
* \brief maximum number of file shown in the recent files menu.
......
......@@ -399,7 +399,7 @@ public:
/*!
* \brief The destructor.
*/
virtual ~Core();
~Core() override;
......@@ -428,7 +428,7 @@ public:
* \brief Get the name of the current trace file.
*
*/
const std::string get_filename() const;
const std::string get_filename() const override;
/*!
* \brief Set the name of the output file for SVG export.
......@@ -454,26 +454,26 @@ public:
* \brief The function takes a string then displayed it into the terminal, then killed the application.
* \param string The string to be displayed.
*/
void error(const std::string &string) const;
void error(const std::string &string) const override;
/*!
\brief The function takes a string then displayed it into the terminal, then the program go on with an indeterminated behaviour.
\param string The string to be displayed.
*/
void warning(const std::string &string) const;
void warning(const std::string &string) const override;
/*!
* \brief The function takes a strings then displayed it into the terminal, then the program go on.
* \param string The string to be displayed.
*/
void information(const std::string &string) const;
void information(const std::string &string) const override;
/*!
* \brief Only use in graphic interface.
*/
void selection_information(const std::string &) const{
void selection_information(const std::string &) const override{
}
......
......@@ -96,10 +96,10 @@ class Interface_graphic : public QMainWindow, protected Ui::main_window, public
/*!
*\brief Drag and drop functions
*/
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void dropEvent(QDropEvent *event);
void dragEnterEvent(QDragEnterEvent *event) override;
void dragMoveEvent(QDragMoveEvent *event) override;
void dragLeaveEvent(QDragLeaveEvent *event) override;
void dropEvent(QDropEvent *event) override;
/*!
*\brief Open the trace of filename. Create a new process if necessary
......@@ -338,7 +338,7 @@ public:
/*!
* \brief The destructor
*/
virtual ~Interface_graphic();
~Interface_graphic() override;
......@@ -352,21 +352,21 @@ public:
* \brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on with an indeterminated behaviour.
* \param string The string to be displayed.
*/
void error(const std::string &string) const;
void error(const std::string &string) const override;
/*!
* \brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on with an indeterminated behaviour.
* \param string The string to be displayed.
*/
void warning(const std::string &string) const;
void warning(const std::string &string) const override;
/*!
* \brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on.
* \param string The string to be displayed.
*/
void information(const std::string &string) const;
void information(const std::string &string) const override;
......@@ -380,7 +380,7 @@ public:
* \brief The function takes strings and/or numbers then displayed it in the entity informative text area in the info window.
* \param string The string to be displayed.
*/
void selection_information(const std::string &string) const;
void selection_information(const std::string &string) const override;
/***********************************
*
......@@ -471,14 +471,14 @@ public:
*
* This function can be used to display message for user to store its work before application closes.
*/
void closeEvent(QCloseEvent *event);
void closeEvent(QCloseEvent *event) override;
/*!
* \brief Get the name of the current trace file.
*
* \return The name of the current trace file
*/
const std::string get_filename() const;
const std::string get_filename() const override;
/*!
* \fn get_console()
......
......@@ -94,7 +94,7 @@ public:
*/
Interval_select( Interface_graphic *console, QWidget *parent = nullptr);
~Interval_select();
~Interval_select() override;
/*!
* \fn set_trace(Trace *trace)
......
......@@ -101,7 +101,7 @@ public:
*/
Node_select( Interface_graphic *console, QWidget *parent = nullptr);
~Node_select();
~Node_select() override;
/*!
* \fn set_initial_container_names()
......@@ -181,7 +181,7 @@ private:
* \brief This functions receives all keyboard events.
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent *event);
void keyPressEvent(QKeyEvent *event) override;
......
......@@ -96,7 +96,7 @@ public:
std::map<std::string, int> _cancel;
Settings_tab(Core *, std::string);
~Settings_tab();
~Settings_tab() override;
void refresh();
......@@ -161,7 +161,7 @@ public:
*/
Settings_window(Core *c, QWidget *parent = nullptr);
~Settings_window();
~Settings_window() override;
/*!
* \brief Overloaded to store at beginning the values
......
......@@ -44,7 +44,7 @@ class QxtSpanSlider : public QSlider
public:
explicit QxtSpanSlider(QWidget* parent = nullptr);
explicit QxtSpanSlider(Qt::Orientation orientation, QWidget* parent = nullptr);
virtual ~QxtSpanSlider();
~QxtSpanSlider() override;
enum HandleMovementMode
{
......@@ -88,11 +88,11 @@ Q_SIGNALS:
void sliderPressed(SpanHandle handle);
protected:
virtual void keyPressEvent(QKeyEvent* event);
virtual void mousePressEvent(QMouseEvent* event);
virtual void mouseMoveEvent(QMouseEvent* event);
virtual void mouseReleaseEvent(QMouseEvent* event);
virtual void paintEvent(QPaintEvent* event);
void keyPressEvent(QKeyEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
void paintEvent(QPaintEvent* event) override;
};
#endif // QXTSPANSLIDER_H
......@@ -10,21 +10,20 @@ class viteQTreeWidget : public QTreeWidget
public:
viteQTreeWidget(QWidget *parent = nullptr);
~viteQTreeWidget();
~viteQTreeWidget() override;
protected:
void dropEvent(QDropEvent *event);
void dropEvent(QDropEvent *event) override;
void dragEnterEvent(QDragEnterEvent *e);
void dragMoveEvent(QDragMoveEvent *e);
void dragEnterEvent(QDragEnterEvent *e) override;
void dragMoveEvent(QDragMoveEvent *e) override;
QList<QTreeWidgetItem *> selected_items;
QMimeData *mimeData(const QList<QTreeWidgetItem *> items) const;
QMimeData *mimeData(const QList<QTreeWidgetItem *> items) const override;
bool dropMimeData ( QTreeWidgetItem * newParentPtr, int index, const QMimeData * data, Qt::DropAction action ) ;
bool dropMimeData ( QTreeWidgetItem * newParentPtr, int index, const QMimeData * data, Qt::DropAction action ) override;
Qt::DropActions supportedDropActions () const;
Qt::DropActions supportedDropActions () const override;
};
#endif
......@@ -129,7 +129,7 @@ public:
* \brief Destructor
* Destroy the file
*/
~PajeFileManager();
~PajeFileManager() override;
/*!
* \fn open(const char * filename, ios_base::openmode mode)
......
......@@ -76,7 +76,7 @@ public:
/*!
* \fn ~ParserPaje()
*/
~ParserPaje();
~ParserPaje() override;
/*!
* \fn parse(Trace &trace, bool finish_trace_after_parse = true)
......@@ -84,14 +84,14 @@ public:
* \param finish_trace_after_parse boolean set if we do not have to finish the trace after parsing
*/
void parse(Trace &trace,
bool finish_trace_after_parse = true);
bool finish_trace_after_parse = true) override;
/*!
* \fn get_percent_loaded() const
* \brief return the size of the file already read.
* \return the scale of the size already loaded of the file by the parser. (between 0 and 1)
*/
float get_percent_loaded() const;
float get_percent_loaded() const override;
/*!
* Return the parser of definitions.
......
......@@ -74,7 +74,7 @@ public:
/*!
* \fn ~ParserVite()
*/
~ParserVite();
~ParserVite() override;
/*!
* \fn parse(Trace &trace, bool finish_trace_after_parse = true)
......@@ -82,14 +82,14 @@ public:
* \param finish_trace_after_parse boolean set if we do not have to finish the trace after parsing
*/
void parse(Trace &trace,
bool finish_trace_after_parse = true);
bool finish_trace_after_parse = true) override;
/*!
* \fn get_percent_loaded() const
* \brief return the size of the file already read.
* \return the scale of the size already loaded of the file by the parser. (between 0 and 1)
*/
float get_percent_loaded() const;
float get_percent_loaded() const override;
};
......
......@@ -158,7 +158,7 @@ public:
* \brief Destructor
* Destroy the file
*/
~mt_PajeFileManager();
~mt_PajeFileManager() override;
/*!
* \fn open(const char * filename, ios_base::openmode mode)
......
......@@ -96,7 +96,7 @@ private:
public:
mt_ParserEventPaje(ParserDefinitionPaje *Defs);
~mt_ParserEventPaje();
~mt_ParserEventPaje() override;
void setTrace( Trace* trace);
......
......@@ -85,7 +85,7 @@ public:
/*!
* \fn ~ParserPaje()
*/
~mt_ParserPaje();
~mt_ParserPaje() override;
/*!
* \fn parse(Trace &trace)
......@@ -93,7 +93,7 @@ public:
* \param finish_trace_after_parse boolean set if we do not have to finish the trace after parsing
*/
void parse(Trace &trace,
bool finish_trace_after_parse = true);
bool finish_trace_after_parse = true) override;
void releasefile();
/*!
......@@ -101,7 +101,7 @@ public:
* \brief return the size of the file already read.
* \return the scale of the size already loaded of the file by the parser. (between 0 and 1)
*/
float get_percent_loaded() const;
float get_percent_loaded() const override;
signals:
......
......@@ -78,7 +78,7 @@ public:
Parser();
Parser(const std::string &filename);
virtual ~Parser() = default;
~Parser() override = default;
/*!
* \fn parse(const std::string &filename, Trace &trace, bool finish_trace_after_parse = true)
......
......@@ -214,21 +214,21 @@ public:
*/
ParserTau();
ParserTau(const std::string &filename);
~ParserTau();
~ParserTau() override;
/*!
* \fn parse(Trace &trace, bool finish_trace_after_parse)
* \param trace : the structure of data to fill
* \param finish_trace_after_parse boolean set if we do not have to finish the trace after parsing
*/
void parse(Trace &trace, bool finish_trace_after_parse = true);
void parse(Trace &trace, bool finish_trace_after_parse = true) override;
/*!
* \fn get_percent_loaded() const
* \brief return the size of the file already read.
* \return the scale of the size already loaded of the file by the parser. (between 0 and 1)
*/
float get_percent_loaded() const;
float get_percent_loaded() const override;
static Color *get_color(int func_id);
};
......
......@@ -82,7 +82,7 @@ public:
* \fn ~Plugin_window()
* \brief Destructor
*/
~Plugin_window();
~Plugin_window() override;
/*!
* \fn load_list()
......
......@@ -119,7 +119,7 @@ public:
/*!
* \brief The destructor
*/
virtual ~GanttDiagram() = default;
~GanttDiagram() override = default;
/***********************************
*
......
......@@ -216,43 +216,43 @@ protected:
* \brief This functions receives all mouse press events.
* \param event The event triggered by mouse.
*/
void mousePressEvent(QMouseEvent * event);
void mousePressEvent(QMouseEvent * event) override;
/*!
* \brief This functions receives all mouse double click events.
* \param event The event triggered by mouse.
*/
void mouseDoubleClickEvent(QMouseEvent * event);
void mouseDoubleClickEvent(QMouseEvent * event) override;
/*!
* \brief If user press, this functions receives all mouse move events until user release mouse.
* \param event The event triggered by mouse.
*/
void mouseMoveEvent(QMouseEvent * event);
void mouseMoveEvent(QMouseEvent * event) override;
/*!
* \brief This functions receives all mouse release events.
* \param event The event triggered by mouse.
*/
void mouseReleaseEvent(QMouseEvent * event);
void mouseReleaseEvent(QMouseEvent * event) override;
/*!
* \brief This functions receives all mouse wheel events.
* \param event The event triggered by the mouse wheel.
*/
void wheelEvent(QWheelEvent * event);
void wheelEvent(QWheelEvent * event) override;
/*!
* \brief This functions receives all keyboard events.
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent * event);
void keyPressEvent(QKeyEvent * event) override;
/*!
* \brief This functions receives all keyboard release events.
* \param event The event triggered by a keyboard release.
*/
void keyReleaseEvent(QKeyEvent * event);
void keyReleaseEvent(QKeyEvent * event) override;
/*!
* Use to update the render area.
......@@ -286,7 +286,7 @@ public:
/*!
* \brief The destructor
*/
virtual ~Hook_event();
~Hook_event() override;
......
......@@ -96,13 +96,13 @@ protected:
* \brief Called by Qt when the user manually closes the window.
* \param event The Qt event.
*/
void closeEvent(QCloseEvent *event);
void closeEvent(QCloseEvent *event) override;
/*!
* \brief Called by Qt when the user manually resize the window.
* \param event The Qt event.
*/
void resizeEvent(QResizeEvent* event);
void resizeEvent(QResizeEvent* event) override;
/*!
......
......@@ -166,7 +166,7 @@ public:
/*!
* \brief The destructor
*/
virtual ~Render_alternate();
~Render_alternate() override;
/*!
* \brief Set Statistics and Informations about input trace
......@@ -193,19 +193,19 @@ public:
/*!
* \brief Call by the system to initialize the OpenGL render area.
*/
void initializeGL();
void initializeGL() override;
/*!
* \brief Call by the system when the render area was resized (occurs during a window resizement).
* \param width : the new width of the render area.
* \param height : the new height of the render area.
*/
void resizeGL(int width, int height);
void resizeGL(int width, int height) override;
/*!
* \brief Call by the system each time the render area need to be updated.
*/
void paintGL();
void paintGL() override;
//void paintEvent(QPaintEvent *event);
......@@ -233,12 +233,12 @@ public:
/*!
* \brief Proceeds with the initialization of the OpenGL draw functions.
*/
void start_draw();
void start_draw() override;
/*!
* \brief Creates and opens the display list for container draws.
*/
void start_draw_containers();
void start_draw_containers() override;
/*!
* \brief Draw a container according to the parameters
......@@ -262,12 +262,12 @@ public:
/*!
* \brief Closes the container display list.
*/
void end_draw_containers();
void end_draw_containers() override;
/*!
* \brief Creates and opens the display list for stater draws.
*/
void start_draw_states();
void start_draw_states() override;
/*!
* \brief Draw a state of the trace.
......@@ -279,17 +279,17 @@ public:
* \param g the green color rate of the state.
* \param b the blue color rate of the state.
*/
void draw_state(const Element_pos start , const Element_pos end, const Element_pos base, const Element_pos height, const Element_pos r, EntityValue* type);
void draw_state(const Element_pos start , const Element_pos end, const Element_pos base, const Element_pos height, const Element_pos r, EntityValue* type) override;
/*!
* \brief Closes the state display list.
*/
void end_draw_states();
void end_draw_states() override;
/*!
* \brief Open the arrow display list.
*/
void start_draw_arrows();
void start_draw_arrows() override;
/*!
* \brief Draw an arrow.
......@@ -300,12 +300,12 @@ public:
*
* This function stores all the information of the arrow to display it each time the render area need to be updated.
*/
void draw_arrow(const Element_pos start_time, const Element_pos end_time, const Element_pos start_height, const Element_pos end_height,const Element_col red, const Element_col green, const Element_col blue, EntityValue *value);
void draw_arrow(const Element_pos start_time, const Element_pos end_time, const Element_pos start_height, const Element_pos end_height,const Element_col red, const Element_col green, const Element_col blue, EntityValue *value) override;
/*!
* \brief Closes the arrow display list.
*/
void end_draw_arrows();
void end_draw_arrows() override;
/*!
* \brief Draw arrows contained in the Arrow_ vector
......@@ -313,7 +313,7 @@ public:
*/
// void draw_stored_arrows(std::vector<Arrow_> &arrows);
void start_draw_events();
void start_draw_events() override;
/*!
* \brief Draw an event.
......@@ -326,9 +326,9 @@ public:
*
* This function stores all the information of the event to display it each time the render area need to be updated.
*/
void draw_event(const Element_pos time, const Element_pos height, const Element_pos container_height, EntityValue*);
void draw_event(const Element_pos time, const Element_pos height, const Element_pos container_height, EntityValue*) override;
void end_draw_events();
void end_draw_events() override;
/*!
......@@ -340,7 +340,7 @@ public:
/*!
* \brief Creates and opens the display list for counter draws.
*/
void start_draw_counter();
void start_draw_counter() override;
/*!
* \brief Draw a point of the counter.
......@@ -354,23 +354,23 @@ public:
/*!
* \brief Closes the counter display list.
*/
void end_draw_counter();
void end_draw_counter() override;
/*!
* \brief Called before ruler drawing.
*/
void start_ruler();
void start_ruler() override;
/*!
* \brief Called after ruler drawing.
*/
void end_ruler();
void end_ruler() override;
/*!
* \brief Do nothing (it is present for compatibility of the Render class).
*/
void end_draw();
void end_draw() override;
......@@ -389,7 +389,7 @@ public:
/*!
* \brief Draw the ruler display list.
*/
void call_ruler();
void call_ruler() override;
......@@ -480,7 +480,7 @@ public:
* \param g the green value. Within [0 ; 1].
* \param b the blue value. Within [0 ; 1].
*/
void set_color(float r, float g, float b);
void set_color(float r, float g, float b) override;
/*!
* \brief Draw a text.