1// Copyright (C) 2020 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 QACTION_WIDGETS_P_H
5#define QACTION_WIDGETS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qaction_p.h>
19#if QT_CONFIG(menu)
20#include <QtWidgets/qmenu.h>
21#endif
22
23QT_REQUIRE_CONFIG(action);
24
25QT_BEGIN_NAMESPACE
26
27class QShortcutMap;
28
29class Q_WIDGETS_EXPORT QtWidgetsActionPrivate : public QActionPrivate
30{
31 Q_DECLARE_PUBLIC(QAction)
32public:
33 QtWidgetsActionPrivate() = default;
34 ~QtWidgetsActionPrivate();
35
36 void destroy() override;
37
38#if QT_CONFIG(shortcut)
39 QShortcutMap::ContextMatcher contextMatcher() const override;
40#endif
41
42#if QT_CONFIG(menu)
43 QPointer<QMenu> m_menu;
44
45 QObject *menu() const override;
46 void setMenu(QObject *menu) override;
47#endif
48};
49
50QT_END_NAMESPACE
51
52#endif // QACTION_WIDGETS_P_H
53

source code of qtbase/src/widgets/kernel/qaction_widgets_p.h