QtWidgets: Add missing override
Change-Id: I991659db5510acbbb44d0f5987edc213acf62a74 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
c050a1bdea
commit
7adbdddbb6
@ -65,7 +65,7 @@ public:
|
||||
|
||||
int result() const;
|
||||
|
||||
void setVisible(bool visible);
|
||||
void setVisible(bool visible) override;
|
||||
|
||||
void setOrientation(Qt::Orientation orientation);
|
||||
Qt::Orientation orientation() const;
|
||||
@ -73,8 +73,8 @@ public:
|
||||
void setExtension(QWidget* extension);
|
||||
QWidget* extension() const;
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
void setSizeGripEnabled(bool);
|
||||
bool isSizeGripEnabled() const;
|
||||
@ -99,14 +99,14 @@ public Q_SLOTS:
|
||||
protected:
|
||||
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void closeEvent(QCloseEvent *);
|
||||
void showEvent(QShowEvent *);
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
void showEvent(QShowEvent *) override;
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
#ifndef QT_NO_CONTEXTMENU
|
||||
void contextMenuEvent(QContextMenuEvent *);
|
||||
void contextMenuEvent(QContextMenuEvent *) override;
|
||||
#endif
|
||||
bool eventFilter(QObject *, QEvent *);
|
||||
bool eventFilter(QObject *, QEvent *) override;
|
||||
void adjustPosition(QWidget*);
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(QDialog)
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
void embedSubWindow(QWidget *);
|
||||
void unembedSubWindow(QWidget *);
|
||||
|
||||
bool isProxyWidget() const;
|
||||
bool isProxyWidget() const override;
|
||||
|
||||
QPointer<QWidget> widget;
|
||||
QPointer<QWidget> lastWidgetUnderMouse;
|
||||
|
@ -93,12 +93,12 @@ class QEmptyModel : public QAbstractItemModel
|
||||
{
|
||||
public:
|
||||
explicit QEmptyModel(QObject *parent = 0) : QAbstractItemModel(parent) {}
|
||||
QModelIndex index(int, int, const QModelIndex &) const { return QModelIndex(); }
|
||||
QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
|
||||
int rowCount(const QModelIndex &) const { return 0; }
|
||||
int columnCount(const QModelIndex &) const { return 0; }
|
||||
bool hasChildren(const QModelIndex &) const { return false; }
|
||||
QVariant data(const QModelIndex &, int) const { return QVariant(); }
|
||||
QModelIndex index(int, int, const QModelIndex &) const override { return QModelIndex(); }
|
||||
QModelIndex parent(const QModelIndex &) const override { return QModelIndex(); }
|
||||
int rowCount(const QModelIndex &) const override { return 0; }
|
||||
int columnCount(const QModelIndex &) const override { return 0; }
|
||||
bool hasChildren(const QModelIndex &) const override { return false; }
|
||||
QVariant data(const QModelIndex &, int) const override { return QVariant(); }
|
||||
};
|
||||
|
||||
class Q_AUTOTEST_EXPORT QAbstractItemViewPrivate : public QAbstractScrollAreaPrivate
|
||||
@ -323,7 +323,7 @@ public:
|
||||
}
|
||||
|
||||
// reimplemented from QAbstractScrollAreaPrivate
|
||||
virtual QPoint contentsOffset() const {
|
||||
QPoint contentsOffset() const override {
|
||||
Q_Q(const QAbstractItemView);
|
||||
return QPoint(q->horizontalOffset(), q->verticalOffset());
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
void resizeSections(QHeaderView::ResizeMode globalMode, bool useGlobalMode = false);
|
||||
void _q_sectionsRemoved(const QModelIndex &,int,int);
|
||||
void _q_layoutAboutToBeChanged();
|
||||
void _q_layoutChanged();
|
||||
void _q_layoutChanged() override;
|
||||
|
||||
bool isSectionSelected(int section) const;
|
||||
bool isFirstVisibleSection(int section) const;
|
||||
|
@ -81,8 +81,8 @@ public:
|
||||
inline QStandardItemEditorCreator()
|
||||
: propertyName(T::staticMetaObject.userProperty().name())
|
||||
{}
|
||||
inline QWidget *createWidget(QWidget *parent) const { return new T(parent); }
|
||||
inline QByteArray valuePropertyName() const { return propertyName; }
|
||||
inline QWidget *createWidget(QWidget *parent) const override { return new T(parent); }
|
||||
inline QByteArray valuePropertyName() const override { return propertyName; }
|
||||
|
||||
private:
|
||||
QByteArray propertyName;
|
||||
|
@ -209,24 +209,24 @@ public:
|
||||
int batchSavedPosition;
|
||||
|
||||
//reimplementations
|
||||
int itemIndex(const QListViewItem &item) const { return item.indexHint; }
|
||||
QListViewItem indexToListViewItem(const QModelIndex &index) const;
|
||||
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max);
|
||||
void clear();
|
||||
void setRowCount(int rowCount) { flowPositions.resize(rowCount); }
|
||||
QVector<QModelIndex> intersectingSet(const QRect &area) const;
|
||||
void dataChanged(const QModelIndex &, const QModelIndex &);
|
||||
int itemIndex(const QListViewItem &item) const override { return item.indexHint; }
|
||||
QListViewItem indexToListViewItem(const QModelIndex &index) const override;
|
||||
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) override;
|
||||
void clear() override;
|
||||
void setRowCount(int rowCount) override { flowPositions.resize(rowCount); }
|
||||
QVector<QModelIndex> intersectingSet(const QRect &area) const override;
|
||||
void dataChanged(const QModelIndex &, const QModelIndex &) override;
|
||||
|
||||
int horizontalScrollToValue(int index, QListView::ScrollHint hint,
|
||||
bool leftOf, bool rightOf,const QRect &area, const QRect &rect) const;
|
||||
bool leftOf, bool rightOf,const QRect &area, const QRect &rect) const override;
|
||||
int verticalScrollToValue(int index, QListView::ScrollHint hint,
|
||||
bool above, bool below, const QRect &area, const QRect &rect) const;
|
||||
void scrollContentsBy(int dx, int dy, bool scrollElasticBand);
|
||||
QRect mapToViewport(const QRect &rect) const;
|
||||
int horizontalOffset() const;
|
||||
int verticalOffset() const;
|
||||
void updateHorizontalScrollBar(const QSize &step);
|
||||
void updateVerticalScrollBar(const QSize &step);
|
||||
bool above, bool below, const QRect &area, const QRect &rect) const override;
|
||||
void scrollContentsBy(int dx, int dy, bool scrollElasticBand) override;
|
||||
QRect mapToViewport(const QRect &rect) const override;
|
||||
int horizontalOffset() const override;
|
||||
int verticalOffset() const override;
|
||||
void updateHorizontalScrollBar(const QSize &step) override;
|
||||
void updateVerticalScrollBar(const QSize &step) override;
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
// The next two methods are to be used on LefToRight flow only.
|
||||
@ -261,24 +261,24 @@ public:
|
||||
QVector<QModelIndex> *interSectingVector; //used from within intersectingSet
|
||||
|
||||
//reimplementations
|
||||
int itemIndex(const QListViewItem &item) const;
|
||||
QListViewItem indexToListViewItem(const QModelIndex &index) const;
|
||||
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max);
|
||||
void clear();
|
||||
void setRowCount(int rowCount);
|
||||
QVector<QModelIndex> intersectingSet(const QRect &area) const;
|
||||
int itemIndex(const QListViewItem &item) const override;
|
||||
QListViewItem indexToListViewItem(const QModelIndex &index) const override;
|
||||
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) override;
|
||||
void clear() override;
|
||||
void setRowCount(int rowCount) override;
|
||||
QVector<QModelIndex> intersectingSet(const QRect &area) const override;
|
||||
|
||||
void scrollContentsBy(int dx, int dy, bool scrollElasticBand);
|
||||
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||
void appendHiddenRow(int row);
|
||||
void removeHiddenRow(int row);
|
||||
void setPositionForIndex(const QPoint &position, const QModelIndex &index);
|
||||
void scrollContentsBy(int dx, int dy, bool scrollElasticBand) override;
|
||||
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
|
||||
void appendHiddenRow(int row) override;
|
||||
void removeHiddenRow(int row) override;
|
||||
void setPositionForIndex(const QPoint &position, const QModelIndex &index) override;
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
bool filterDragMoveEvent(QDragMoveEvent *);
|
||||
bool filterDragLeaveEvent(QDragLeaveEvent *);
|
||||
bool filterDropEvent(QDropEvent *e);
|
||||
bool filterStartDrag(Qt::DropActions);
|
||||
bool filterDragMoveEvent(QDragMoveEvent *) override;
|
||||
bool filterDragLeaveEvent(QDragLeaveEvent *) override;
|
||||
bool filterDropEvent(QDropEvent *e) override;
|
||||
bool filterStartDrag(Qt::DropActions) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
@ -349,18 +349,18 @@ public:
|
||||
QModelIndex closestIndex(const QRect &target, const QVector<QModelIndex> &candidates) const;
|
||||
QSize itemSize(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
bool selectionAllowed(const QModelIndex &index) const
|
||||
bool selectionAllowed(const QModelIndex &index) const override
|
||||
{ if (viewMode == QListView::ListMode && !showElasticBand) return index.isValid(); return true; }
|
||||
|
||||
int horizontalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const;
|
||||
int verticalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const;
|
||||
|
||||
QItemSelection selection(const QRect &rect) const;
|
||||
void selectAll(QItemSelectionModel::SelectionFlags command);
|
||||
void selectAll(QItemSelectionModel::SelectionFlags command) override;
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const;
|
||||
bool dropOn(QDropEvent *event, int *row, int *col, QModelIndex *index);
|
||||
QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const override;
|
||||
bool dropOn(QDropEvent *event, int *row, int *col, QModelIndex *index) override;
|
||||
#endif
|
||||
|
||||
inline void setGridSize(const QSize &size) { grid = size; }
|
||||
@ -383,7 +383,7 @@ public:
|
||||
|
||||
void scrollElasticBandBy(int dx, int dy);
|
||||
|
||||
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
|
||||
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const override;
|
||||
|
||||
void emitIndexesMoved(const QModelIndexList &indexes) { emit q_func()->indexesMoved(indexes); }
|
||||
|
||||
|
@ -93,22 +93,22 @@ public:
|
||||
QListWidgetItem *take(int row);
|
||||
void move(int srcRow, int dstRow);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
QModelIndex index(QListWidgetItem *item) const;
|
||||
QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const;
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
|
||||
|
||||
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex());
|
||||
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) override;
|
||||
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) override;
|
||||
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
void sort(int column, Qt::SortOrder order);
|
||||
void sort(int column, Qt::SortOrder order) override;
|
||||
void ensureSorted(int column, Qt::SortOrder order, int start, int end);
|
||||
static bool itemLessThan(const QPair<QListWidgetItem*,int> &left,
|
||||
const QPair<QListWidgetItem*,int> &right);
|
||||
@ -122,12 +122,12 @@ public:
|
||||
void itemChanged(QListWidgetItem *item);
|
||||
|
||||
// dnd
|
||||
QStringList mimeTypes() const;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||
QStringList mimeTypes() const override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
|
||||
int row, int column, const QModelIndex &parent);
|
||||
Qt::DropActions supportedDropActions() const;
|
||||
int row, int column, const QModelIndex &parent) override;
|
||||
Qt::DropActions supportedDropActions() const override;
|
||||
#endif
|
||||
|
||||
QMimeData *internalMimeData() const;
|
||||
|
@ -99,11 +99,11 @@ public:
|
||||
QTableModel(int rows, int columns, QTableWidget *parent);
|
||||
~QTableModel();
|
||||
|
||||
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex());
|
||||
bool insertColumns(int column, int count = 1, const QModelIndex &parent = QModelIndex());
|
||||
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) override;
|
||||
bool insertColumns(int column, int count = 1, const QModelIndex &parent = QModelIndex()) override;
|
||||
|
||||
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex());
|
||||
bool removeColumns(int column, int count = 1, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) override;
|
||||
bool removeColumns(int column, int count = 1, const QModelIndex &parent = QModelIndex()) override;
|
||||
|
||||
void setItem(int row, int column, QTableWidgetItem *item);
|
||||
QTableWidgetItem *takeItem(int row, int column);
|
||||
@ -118,7 +118,7 @@ public:
|
||||
QTableWidgetItem *horizontalHeaderItem(int section);
|
||||
QTableWidgetItem *verticalHeaderItem(int section);
|
||||
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override
|
||||
{ return QAbstractTableModel::index(row, column, parent); }
|
||||
|
||||
QModelIndex index(const QTableWidgetItem *item) const;
|
||||
@ -126,21 +126,21 @@ public:
|
||||
void setRowCount(int rows);
|
||||
void setColumnCount(int columns);
|
||||
|
||||
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;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
|
||||
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const;
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role);
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role) override;
|
||||
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
void sort(int column, Qt::SortOrder order);
|
||||
void sort(int column, Qt::SortOrder order) override;
|
||||
static bool itemLessThan(const QPair<QTableWidgetItem*,int> &left,
|
||||
const QPair<QTableWidgetItem*,int> &right);
|
||||
static bool itemGreaterThan(const QPair<QTableWidgetItem*,int> &left,
|
||||
@ -167,11 +167,11 @@ public:
|
||||
void setItemPrototype(const QTableWidgetItem *item);
|
||||
|
||||
// dnd
|
||||
QStringList mimeTypes() const;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||
QStringList mimeTypes() const override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
|
||||
int row, int column, const QModelIndex &parent);
|
||||
Qt::DropActions supportedDropActions() const;
|
||||
int row, int column, const QModelIndex &parent) override;
|
||||
Qt::DropActions supportedDropActions() const override;
|
||||
|
||||
QMimeData *internalMimeData() const;
|
||||
|
||||
|
@ -102,8 +102,8 @@ public:
|
||||
return logicalIndex == logicalIndexForTree();
|
||||
}
|
||||
|
||||
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
|
||||
void adjustViewOptionsForIndex(QStyleOptionViewItem *option, const QModelIndex ¤t) const;
|
||||
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const override;
|
||||
void adjustViewOptionsForIndex(QStyleOptionViewItem *option, const QModelIndex ¤t) const override;
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
struct AnimatedOperation : public QVariantAnimation
|
||||
@ -115,8 +115,8 @@ public:
|
||||
AnimatedOperation() : item(0) { setEasingCurve(QEasingCurve::InOutQuad); }
|
||||
int top() const { return startValue().toInt(); }
|
||||
QRect rect() const { QRect rect = viewport->rect(); rect.moveTop(top()); return rect; }
|
||||
void updateCurrentValue(const QVariant &) { viewport->update(rect()); }
|
||||
void updateState(State state, State) { if (state == Stopped) before = after = QPixmap(); }
|
||||
void updateCurrentValue(const QVariant &) override { viewport->update(rect()); }
|
||||
void updateState(State state, State) override { if (state == Stopped) before = after = QPixmap(); }
|
||||
} animatedOperation;
|
||||
void prepareAnimatedOperation(int item, QVariantAnimation::Direction d);
|
||||
void beginAnimatedOperation();
|
||||
@ -128,11 +128,11 @@ public:
|
||||
void expand(int item, bool emitSignal);
|
||||
void collapse(int item, bool emitSignal);
|
||||
|
||||
void _q_columnsAboutToBeRemoved(const QModelIndex &, int, int);
|
||||
void _q_columnsRemoved(const QModelIndex &, int, int);
|
||||
void _q_columnsAboutToBeRemoved(const QModelIndex &, int, int) override;
|
||||
void _q_columnsRemoved(const QModelIndex &, int, int) override;
|
||||
void _q_modelAboutToBeReset();
|
||||
void _q_sortIndicatorChanged(int column, Qt::SortOrder order);
|
||||
void _q_modelDestroyed();
|
||||
void _q_modelDestroyed() override;
|
||||
|
||||
void layout(int item, bool recusiveExpanding = false, bool afterIsUninitialized = false);
|
||||
|
||||
|
@ -101,14 +101,14 @@ public:
|
||||
void changeSize(int w, int h,
|
||||
QSizePolicy::Policy hData = QSizePolicy::Minimum,
|
||||
QSizePolicy::Policy vData = QSizePolicy::Minimum);
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSize() const;
|
||||
QSize maximumSize() const;
|
||||
Qt::Orientations expandingDirections() const;
|
||||
bool isEmpty() const;
|
||||
void setGeometry(const QRect&);
|
||||
QRect geometry() const;
|
||||
QSpacerItem *spacerItem();
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSize() const override;
|
||||
QSize maximumSize() const override;
|
||||
Qt::Orientations expandingDirections() const override;
|
||||
bool isEmpty() const override;
|
||||
void setGeometry(const QRect&) override;
|
||||
QRect geometry() const override;
|
||||
QSpacerItem *spacerItem() override;
|
||||
QSizePolicy sizePolicy() const { return sizeP; }
|
||||
|
||||
private:
|
||||
@ -126,18 +126,18 @@ public:
|
||||
explicit QWidgetItem(QWidget *w) : wid(w) { }
|
||||
~QWidgetItem();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSize() const;
|
||||
QSize maximumSize() const;
|
||||
Qt::Orientations expandingDirections() const;
|
||||
bool isEmpty() const;
|
||||
void setGeometry(const QRect&);
|
||||
QRect geometry() const;
|
||||
virtual QWidget *widget();
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSize() const override;
|
||||
QSize maximumSize() const override;
|
||||
Qt::Orientations expandingDirections() const override;
|
||||
bool isEmpty() const override;
|
||||
void setGeometry(const QRect&) override;
|
||||
QRect geometry() const override;
|
||||
QWidget *widget() override;
|
||||
|
||||
bool hasHeightForWidth() const;
|
||||
int heightForWidth(int) const;
|
||||
QSizePolicy::ControlTypes controlTypes() const;
|
||||
bool hasHeightForWidth() const override;
|
||||
int heightForWidth(int) const override;
|
||||
QSizePolicy::ControlTypes controlTypes() const override;
|
||||
protected:
|
||||
QWidget *wid;
|
||||
};
|
||||
@ -148,10 +148,10 @@ public:
|
||||
explicit QWidgetItemV2(QWidget *widget);
|
||||
~QWidgetItemV2();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSize() const;
|
||||
QSize maximumSize() const;
|
||||
int heightForWidth(int width) const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSize() const override;
|
||||
QSize maximumSize() const override;
|
||||
int heightForWidth(int width) const override;
|
||||
|
||||
private:
|
||||
enum { Dirty = -123, HfwCacheMaxSize = 3 };
|
||||
|
@ -97,9 +97,9 @@ class QFlickGestureRecognizer : public QGestureRecognizer
|
||||
public:
|
||||
QFlickGestureRecognizer(Qt::MouseButton button);
|
||||
|
||||
QGesture *create(QObject *target);
|
||||
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event);
|
||||
void reset(QGesture *state);
|
||||
QGesture *create(QObject *target) override;
|
||||
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event) override;
|
||||
void reset(QGesture *state) override;
|
||||
|
||||
private:
|
||||
Qt::MouseButton button; // NoButton == Touch
|
||||
|
@ -117,12 +117,12 @@ public:
|
||||
void setGroupSeparatorShown(bool shown);
|
||||
bool isGroupSeparatorShown() const;
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
void interpretText();
|
||||
bool event(QEvent *event);
|
||||
bool event(QEvent *event) override;
|
||||
|
||||
QVariant inputMethodQuery(Qt::InputMethodQuery) const;
|
||||
QVariant inputMethodQuery(Qt::InputMethodQuery) const override;
|
||||
|
||||
virtual QValidator::State validate(QString &input, int &pos) const;
|
||||
virtual void fixup(QString &input) const;
|
||||
@ -134,24 +134,24 @@ public Q_SLOTS:
|
||||
void selectAll();
|
||||
virtual void clear();
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void keyReleaseEvent(QKeyEvent *event);
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void keyReleaseEvent(QKeyEvent *event) override;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
void wheelEvent(QWheelEvent *event);
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
#endif
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
void changeEvent(QEvent *event);
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void hideEvent(QHideEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void timerEvent(QTimerEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
void focusOutEvent(QFocusEvent *event) override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void timerEvent(QTimerEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void initStyleOption(QStyleOptionSpinBox *option) const;
|
||||
|
||||
QLineEdit *lineEdit() const;
|
||||
|
@ -156,8 +156,8 @@ class QSpinBoxValidator : public QValidator
|
||||
{
|
||||
public:
|
||||
QSpinBoxValidator(QAbstractSpinBox *qptr, QAbstractSpinBoxPrivate *dptr);
|
||||
QValidator::State validate(QString &input, int &) const;
|
||||
void fixup(QString &) const;
|
||||
QValidator::State validate(QString &input, int &) const override;
|
||||
void fixup(QString &) const override;
|
||||
private:
|
||||
QAbstractSpinBox *qptr;
|
||||
QAbstractSpinBoxPrivate *dptr;
|
||||
|
@ -86,13 +86,13 @@ public:
|
||||
QComboBoxListView(QComboBox *cmb = 0) : combo(cmb) {}
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event)
|
||||
void resizeEvent(QResizeEvent *event) override
|
||||
{
|
||||
resizeContents(viewport()->width(), contentsSize().height());
|
||||
QListView::resizeEvent(event);
|
||||
}
|
||||
|
||||
QStyleOptionViewItem viewOptions() const
|
||||
QStyleOptionViewItem viewOptions() const override
|
||||
{
|
||||
QStyleOptionViewItem option = QListView::viewOptions();
|
||||
option.showDecorationSelected = true;
|
||||
@ -101,7 +101,7 @@ protected:
|
||||
return option;
|
||||
}
|
||||
|
||||
void paintEvent(QPaintEvent *e)
|
||||
void paintEvent(QPaintEvent *e) override
|
||||
{
|
||||
if (combo) {
|
||||
QStyleOptionComboBox opt;
|
||||
@ -142,7 +142,7 @@ public:
|
||||
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||
setAttribute(Qt::WA_NoMousePropagation);
|
||||
}
|
||||
QSize sizeHint() const {
|
||||
QSize sizeHint() const override {
|
||||
return QSize(20, style()->pixelMetric(QStyle::PM_MenuScrollerHeight));
|
||||
}
|
||||
|
||||
@ -156,14 +156,14 @@ protected:
|
||||
fast = false;
|
||||
}
|
||||
|
||||
void enterEvent(QEvent *) {
|
||||
void enterEvent(QEvent *) override {
|
||||
startTimer();
|
||||
}
|
||||
|
||||
void leaveEvent(QEvent *) {
|
||||
void leaveEvent(QEvent *) override {
|
||||
stopTimer();
|
||||
}
|
||||
void timerEvent(QTimerEvent *e) {
|
||||
void timerEvent(QTimerEvent *e) override {
|
||||
if (e->timerId() == timer.timerId()) {
|
||||
emit doScroll(sliderAction);
|
||||
if (fast) {
|
||||
@ -172,11 +172,11 @@ protected:
|
||||
}
|
||||
}
|
||||
}
|
||||
void hideEvent(QHideEvent *) {
|
||||
void hideEvent(QHideEvent *) override {
|
||||
stopTimer();
|
||||
}
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *e)
|
||||
void mouseMoveEvent(QMouseEvent *e) override
|
||||
{
|
||||
// Enable fast scrolling if the cursor is directly above or below the popup.
|
||||
const int mouseX = e->pos().x();
|
||||
@ -188,7 +188,7 @@ protected:
|
||||
fast = horizontallyInside && verticallyOutside;
|
||||
}
|
||||
|
||||
void paintEvent(QPaintEvent *) {
|
||||
void paintEvent(QPaintEvent *) override {
|
||||
QPainter p(this);
|
||||
QStyleOptionMenuItem menuOpt;
|
||||
menuOpt.init(this);
|
||||
@ -235,15 +235,15 @@ public Q_SLOTS:
|
||||
void viewDestroyed();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
bool eventFilter(QObject *o, QEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void showEvent(QShowEvent *e);
|
||||
void hideEvent(QHideEvent *e);
|
||||
void timerEvent(QTimerEvent *timerEvent);
|
||||
void leaveEvent(QEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void changeEvent(QEvent *e) override;
|
||||
bool eventFilter(QObject *o, QEvent *e) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
void showEvent(QShowEvent *e) override;
|
||||
void hideEvent(QHideEvent *e) override;
|
||||
void timerEvent(QTimerEvent *timerEvent) override;
|
||||
void leaveEvent(QEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
QStyleOptionComboBox comboStyleOption() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
@ -270,13 +270,13 @@ public:
|
||||
protected:
|
||||
void paint(QPainter *painter,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const {
|
||||
const QModelIndex &index) const override {
|
||||
QStyleOptionMenuItem opt = getStyleOption(option, index);
|
||||
painter->fillRect(option.rect, opt.palette.background());
|
||||
mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo);
|
||||
}
|
||||
QSize sizeHint(const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const {
|
||||
const QModelIndex &index) const override {
|
||||
QStyleOptionMenuItem opt = getStyleOption(option, index);
|
||||
return mCombo->style()->sizeFromContents(
|
||||
QStyle::CT_MenuItem, &opt, option.rect.size(), mCombo);
|
||||
@ -309,7 +309,7 @@ public:
|
||||
protected:
|
||||
void paint(QPainter *painter,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const {
|
||||
const QModelIndex &index) const override {
|
||||
if (isSeparator(index)) {
|
||||
QRect rect = option.rect;
|
||||
if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView*>(option.widget))
|
||||
@ -323,7 +323,7 @@ protected:
|
||||
}
|
||||
|
||||
QSize sizeHint(const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const {
|
||||
const QModelIndex &index) const override {
|
||||
if (isSeparator(index)) {
|
||||
int pm = mCombo->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, mCombo);
|
||||
return QSize(pm, pm);
|
||||
|
@ -159,12 +159,12 @@ public:
|
||||
Qt::TimeSpec timeSpec() const;
|
||||
void setTimeSpec(Qt::TimeSpec spec);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
virtual void clear();
|
||||
virtual void stepBy(int steps);
|
||||
void clear() override;
|
||||
void stepBy(int steps) override;
|
||||
|
||||
bool event(QEvent *event);
|
||||
bool event(QEvent *event) override;
|
||||
Q_SIGNALS:
|
||||
void dateTimeChanged(const QDateTime &dateTime);
|
||||
void timeChanged(const QTime &time);
|
||||
@ -176,20 +176,20 @@ public Q_SLOTS:
|
||||
void setTime(const QTime &time);
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
#endif
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual QValidator::State validate(QString &input, int &pos) const;
|
||||
virtual void fixup(QString &input) const;
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
bool focusNextPrevChild(bool next) override;
|
||||
QValidator::State validate(QString &input, int &pos) const override;
|
||||
void fixup(QString &input) const override;
|
||||
|
||||
virtual QDateTime dateTimeFromText(const QString &text) const;
|
||||
virtual QString textFromDateTime(const QDateTime &dt) const;
|
||||
virtual StepEnabled stepEnabled() const;
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
StepEnabled stepEnabled() const override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void initStyleOption(QStyleOptionSpinBox *option) const;
|
||||
|
||||
QDateTimeEdit(const QVariant &val, QVariant::Type parserType, QWidget *parent = Q_NULLPTR);
|
||||
|
@ -167,10 +167,10 @@ private Q_SLOTS:
|
||||
void dateSelectionChanged();
|
||||
|
||||
protected:
|
||||
void hideEvent(QHideEvent *);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
bool event(QEvent *e);
|
||||
void hideEvent(QHideEvent *) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *) override;
|
||||
bool event(QEvent *e) override;
|
||||
|
||||
private:
|
||||
QCalendarWidget *verifyCalendarInstance();
|
||||
|
@ -54,11 +54,11 @@ public:
|
||||
QMacNativeWidget(NSView *parentView = Q_NULLPTR);
|
||||
~QMacNativeWidget();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
NSView *nativeView() const;
|
||||
|
||||
protected:
|
||||
bool event(QEvent *ev);
|
||||
bool event(QEvent *ev) override;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
mdiChild = child;
|
||||
}
|
||||
|
||||
void *qt_metacast(const char *classname)
|
||||
void *qt_metacast(const char *classname) override
|
||||
{
|
||||
if (classname && strcmp(classname, "ControlElement") == 0)
|
||||
return this;
|
||||
|
@ -86,9 +86,9 @@ public:
|
||||
void setDefaultUp(bool);
|
||||
bool isDefaultUp() const;
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
int heightForWidth(int) const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
int heightForWidth(int) const override;
|
||||
|
||||
QRect actionGeometry(QAction *) const;
|
||||
QAction *actionAt(const QPoint &) const;
|
||||
@ -104,27 +104,27 @@ public:
|
||||
void setNativeMenuBar(bool nativeMenuBar);
|
||||
QPlatformMenuBar *platformMenuBar();
|
||||
public Q_SLOTS:
|
||||
virtual void setVisible(bool visible);
|
||||
void setVisible(bool visible) override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void triggered(QAction *action);
|
||||
void hovered(QAction *action);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *);
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
void mousePressEvent(QMouseEvent *);
|
||||
void mouseMoveEvent(QMouseEvent *);
|
||||
void leaveEvent(QEvent *);
|
||||
void paintEvent(QPaintEvent *);
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void actionEvent(QActionEvent *);
|
||||
void focusOutEvent(QFocusEvent *);
|
||||
void focusInEvent(QFocusEvent *);
|
||||
void timerEvent(QTimerEvent *);
|
||||
bool eventFilter(QObject *, QEvent *);
|
||||
bool event(QEvent *);
|
||||
void changeEvent(QEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void mouseReleaseEvent(QMouseEvent *) override;
|
||||
void mousePressEvent(QMouseEvent *) override;
|
||||
void mouseMoveEvent(QMouseEvent *) override;
|
||||
void leaveEvent(QEvent *) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
void actionEvent(QActionEvent *) override;
|
||||
void focusOutEvent(QFocusEvent *) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void timerEvent(QTimerEvent *) override;
|
||||
bool eventFilter(QObject *, QEvent *) override;
|
||||
bool event(QEvent *) override;
|
||||
void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
|
||||
|
||||
private:
|
||||
|
@ -91,11 +91,11 @@ public:
|
||||
void setDisplayIntegerBase(int base);
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
virtual QValidator::State validate(QString &input, int &pos) const;
|
||||
bool event(QEvent *event) override;
|
||||
QValidator::State validate(QString &input, int &pos) const override;
|
||||
virtual int valueFromText(const QString &text) const;
|
||||
virtual QString textFromValue(int val) const;
|
||||
virtual void fixup(QString &str) const;
|
||||
void fixup(QString &str) const override;
|
||||
|
||||
|
||||
public Q_SLOTS:
|
||||
@ -151,10 +151,10 @@ public:
|
||||
int decimals() const;
|
||||
void setDecimals(int prec);
|
||||
|
||||
virtual QValidator::State validate(QString &input, int &pos) const;
|
||||
QValidator::State validate(QString &input, int &pos) const override;
|
||||
virtual double valueFromText(const QString &text) const;
|
||||
virtual QString textFromValue(double val) const;
|
||||
virtual void fixup(QString &str) const;
|
||||
void fixup(QString &str) const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setValue(double val);
|
||||
|
Loading…
x
Reference in New Issue
Block a user