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 QFOCUSFRAME_H |
5 | #define QFOCUSFRAME_H |
6 | |
7 | #include <QtWidgets/qtwidgetsglobal.h> |
8 | #include <QtWidgets/qwidget.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | |
13 | class QFocusFramePrivate; |
14 | class QStyleOption; |
15 | |
16 | class Q_WIDGETS_EXPORT QFocusFrame : public QWidget |
17 | { |
18 | Q_OBJECT |
19 | public: |
20 | QFocusFrame(QWidget *parent = nullptr); |
21 | ~QFocusFrame(); |
22 | |
23 | void setWidget(QWidget *widget); |
24 | QWidget *widget() const; |
25 | |
26 | protected: |
27 | bool event(QEvent *e) override; |
28 | |
29 | bool eventFilter(QObject *, QEvent *) override; |
30 | void paintEvent(QPaintEvent *) override; |
31 | virtual void initStyleOption(QStyleOption *option) const; |
32 | |
33 | private: |
34 | Q_DECLARE_PRIVATE(QFocusFrame) |
35 | Q_DISABLE_COPY(QFocusFrame) |
36 | }; |
37 | |
38 | QT_END_NAMESPACE |
39 | |
40 | #endif // QFOCUSFRAME_H |
41 | |