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 QSHORTCUT_P_H
5#define QSHORTCUT_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 purely as an
12// implementation detail. 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/qtguiglobal_p.h>
19#include "qshortcut.h"
20#include <QtGui/qkeysequence.h>
21
22#include <QtCore/qlist.h>
23#include <QtCore/qstring.h>
24#include <QtCore/private/qobject_p.h>
25
26#include <private/qshortcutmap_p.h>
27
28
29QT_BEGIN_NAMESPACE
30
31class QShortcutMap;
32
33/*
34 \internal
35 Private data accessed through d-pointer.
36*/
37class Q_GUI_EXPORT QShortcutPrivate : public QObjectPrivate
38{
39 Q_DECLARE_PUBLIC(QShortcut)
40public:
41 QShortcutPrivate() = default;
42
43 virtual QShortcutMap::ContextMatcher contextMatcher() const;
44 virtual bool handleWhatsThis() { return false; }
45
46 QList<QKeySequence> sc_sequences;
47 QString sc_whatsthis;
48 Qt::ShortcutContext sc_context = Qt::WindowShortcut;
49 bool sc_enabled = true;
50 bool sc_autorepeat = true;
51 QList<int> sc_ids;
52 void redoGrab(QShortcutMap &map);
53};
54
55QT_END_NAMESPACE
56
57#endif // QSHORTCUT_P_H
58

source code of qtbase/src/gui/kernel/qshortcut_p.h