1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QSIZEGRIP_H |
5 | #define QSIZEGRIP_H |
6 | |
7 | #include <QtWidgets/qtwidgetsglobal.h> |
8 | #include <QtWidgets/qwidget.h> |
9 | |
10 | QT_REQUIRE_CONFIG(sizegrip); |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | class QSizeGripPrivate; |
15 | class Q_WIDGETS_EXPORT QSizeGrip : public QWidget |
16 | { |
17 | Q_OBJECT |
18 | public: |
19 | explicit QSizeGrip(QWidget *parent); |
20 | ~QSizeGrip(); |
21 | |
22 | QSize sizeHint() const override; |
23 | void setVisible(bool) override; |
24 | |
25 | protected: |
26 | void paintEvent(QPaintEvent *) override; |
27 | void mousePressEvent(QMouseEvent *) override; |
28 | void mouseMoveEvent(QMouseEvent *) override; |
29 | void mouseReleaseEvent(QMouseEvent *mouseEvent) override; |
30 | void moveEvent(QMoveEvent *moveEvent) override; |
31 | void showEvent(QShowEvent *showEvent) override; |
32 | void hideEvent(QHideEvent *hideEvent) override; |
33 | bool eventFilter(QObject *, QEvent *) override; |
34 | bool event(QEvent *) override; |
35 | |
36 | public: |
37 | |
38 | private: |
39 | Q_DECLARE_PRIVATE(QSizeGrip) |
40 | Q_DISABLE_COPY(QSizeGrip) |
41 | Q_PRIVATE_SLOT(d_func(), void _q_showIfNotHidden()) |
42 | }; |
43 | |
44 | QT_END_NAMESPACE |
45 | |
46 | #endif // QSIZEGRIP_H |
47 | |