Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qshortcut_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QSHORTCUT_P_H
6#define QSHORTCUT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtGui/private/qtguiglobal_p.h>
20#include "qshortcut.h"
21#include <QtGui/qkeysequence.h>
22
23#include <QtCore/qlist.h>
24#include <QtCore/qstring.h>
25#include <QtCore/private/qobject_p.h>
26
27#include <private/qshortcutmap_p.h>
28
29
31
32class QShortcutMap;
33
34/*
35 \internal
36 Private data accessed through d-pointer.
37*/
38class Q_GUI_EXPORT QShortcutPrivate : public QObjectPrivate
39{
40 Q_DECLARE_PUBLIC(QShortcut)
41public:
42 QShortcutPrivate() = default;
43
44 virtual QShortcutMap::ContextMatcher contextMatcher() const;
45 virtual bool handleWhatsThis() { return false; }
46
47 static bool simpleContextMatcher(QObject *object, Qt::ShortcutContext context);
48
49 QList<QKeySequence> sc_sequences;
50 QString sc_whatsthis;
51 Qt::ShortcutContext sc_context = Qt::WindowShortcut;
52 bool sc_enabled = true;
53 bool sc_autorepeat = true;
54 QList<int> sc_ids;
55 void redoGrab(QShortcutMap &map);
56};
57
58QT_END_NAMESPACE
59
60#endif // QSHORTCUT_P_H
The QShortcut class is used to create keyboard shortcuts.
Definition qshortcut.h:20
Combined button and popup list for selecting options.
#define QAPP_CHECK(functionName)
Definition qaction.cpp:19
#define qApp
QT_REQUIRE_CONFIG(shortcut)