summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools/undo
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/tools/undo')
-rw-r--r--examples/widgets/tools/undo/commands.h24
-rw-r--r--examples/widgets/tools/undo/document.h8
2 files changed, 16 insertions, 16 deletions
diff --git a/examples/widgets/tools/undo/commands.h b/examples/widgets/tools/undo/commands.h
index b8984c1d34..f75ac34256 100644
--- a/examples/widgets/tools/undo/commands.h
+++ b/examples/widgets/tools/undo/commands.h
@@ -49,8 +49,8 @@ class AddShapeCommand : public QUndoCommand
{
public:
AddShapeCommand(Document *doc, const Shape &shape, QUndoCommand *parent = 0);
- void undo();
- void redo();
+ void undo() Q_DECL_OVERRIDE;
+ void redo() Q_DECL_OVERRIDE;
private:
Document *m_doc;
@@ -62,8 +62,8 @@ class RemoveShapeCommand : public QUndoCommand
{
public:
RemoveShapeCommand(Document *doc, const QString &shapeName, QUndoCommand *parent = 0);
- void undo();
- void redo();
+ void undo() Q_DECL_OVERRIDE;
+ void redo() Q_DECL_OVERRIDE;
private:
Document *m_doc;
@@ -77,11 +77,11 @@ public:
SetShapeColorCommand(Document *doc, const QString &shapeName, const QColor &color,
QUndoCommand *parent = 0);
- void undo();
- void redo();
+ void undo() Q_DECL_OVERRIDE;
+ void redo() Q_DECL_OVERRIDE;
- bool mergeWith(const QUndoCommand *command);
- int id() const;
+ bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE;
+ int id() const Q_DECL_OVERRIDE;
private:
Document *m_doc;
@@ -96,11 +96,11 @@ public:
SetShapeRectCommand(Document *doc, const QString &shapeName, const QRect &rect,
QUndoCommand *parent = 0);
- void undo();
- void redo();
+ void undo() Q_DECL_OVERRIDE;
+ void redo() Q_DECL_OVERRIDE;
- bool mergeWith(const QUndoCommand *command);
- int id() const;
+ bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE;
+ int id() const Q_DECL_OVERRIDE;
private:
Document *m_doc;
diff --git a/examples/widgets/tools/undo/document.h b/examples/widgets/tools/undo/document.h
index 4f362a9597..9246c9320d 100644
--- a/examples/widgets/tools/undo/document.h
+++ b/examples/widgets/tools/undo/document.h
@@ -101,10 +101,10 @@ signals:
void currentShapeChanged(const QString &shapeName);
protected:
- void paintEvent(QPaintEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private:
void setCurrentShape(int index);