diff options
Diffstat (limited to 'examples/widgets/itemviews/puzzle')
-rw-r--r-- | examples/widgets/itemviews/puzzle/piecesmodel.h | 16 | ||||
-rw-r--r-- | examples/widgets/itemviews/puzzle/puzzlewidget.h | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/examples/widgets/itemviews/puzzle/piecesmodel.h b/examples/widgets/itemviews/puzzle/piecesmodel.h index 72df1cef92..a6e31f2107 100644 --- a/examples/widgets/itemviews/puzzle/piecesmodel.h +++ b/examples/widgets/itemviews/puzzle/piecesmodel.h @@ -58,16 +58,16 @@ class PiecesModel : public QAbstractListModel public: explicit PiecesModel(int pieceSize, QObject *parent = 0); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - Qt::ItemFlags flags(const QModelIndex &index) const; - bool removeRows(int row, int count, const QModelIndex &parent); + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; + Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; + bool removeRows(int row, int count, const QModelIndex &parent) Q_DECL_OVERRIDE; bool dropMimeData(const QMimeData *data, Qt::DropAction action, - int row, int column, const QModelIndex &parent); - QMimeData *mimeData(const QModelIndexList &indexes) const; - QStringList mimeTypes() const; - int rowCount(const QModelIndex &parent) const; - Qt::DropActions supportedDropActions() const; + int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE; + QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE; + QStringList mimeTypes() const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; + Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE; void addPiece(const QPixmap &pixmap, const QPoint &location); void addPieces(const QPixmap& pixmap); diff --git a/examples/widgets/itemviews/puzzle/puzzlewidget.h b/examples/widgets/itemviews/puzzle/puzzlewidget.h index 5da81b9c63..41dc141ee4 100644 --- a/examples/widgets/itemviews/puzzle/puzzlewidget.h +++ b/examples/widgets/itemviews/puzzle/puzzlewidget.h @@ -67,12 +67,12 @@ signals: void puzzleCompleted(); protected: - void dragEnterEvent(QDragEnterEvent *event); - void dragLeaveEvent(QDragLeaveEvent *event); - void dragMoveEvent(QDragMoveEvent *event); - void dropEvent(QDropEvent *event); - void mousePressEvent(QMouseEvent *event); - void paintEvent(QPaintEvent *event); + void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE; + void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE; + void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE; + void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; private: int findPiece(const QRect &pieceRect) const; |