Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qaction_p.h
Go to the documentation of this file.
1
// Copyright (C) 2019 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
QACTION_P_H
6
#
define
QACTION_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 for the convenience
13
// of other Qt classes. 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
<
QtGui
/
qaction
.
h
>
21
#
include
<
QtGui
/
qfont
.
h
>
22
#
if
QT_CONFIG
(
shortcut
)
23
#
include
<
QtGui
/
private
/
qshortcutmap_p
.
h
>
24
#
endif
25
26
#
include
<
QtCore
/
qpointer
.
h
>
27
#
include
"private/qobject_p.h"
28
29
QT_REQUIRE_CONFIG
(
action
);
30
31
QT_BEGIN_NAMESPACE
32
33
class
QShortcutMap;
34
35
class
Q_GUI_EXPORT
QActionPrivate
:
public
QObjectPrivate
36
{
37
Q_DECLARE_PUBLIC(QAction)
38
public
:
39
QActionPrivate();
40
~QActionPrivate();
41
42
virtual
void
destroy();
43
44
#
if
QT_CONFIG
(
shortcut
)
45
virtual
QShortcutMap::ContextMatcher contextMatcher()
const
;
46
#
endif
47
48
static
QActionPrivate *get(QAction *q)
49
{
50
return
q->d_func();
51
}
52
53
bool
setEnabled(
bool
enable,
bool
byGroup);
54
void
setVisible(
bool
b);
55
56
QPointer<QActionGroup> group;
57
QString text;
58
QString iconText;
59
QIcon icon;
60
QString tooltip;
61
QString statustip;
62
QString whatsthis;
63
#
if
QT_CONFIG
(
shortcut
)
64
QList<QKeySequence> shortcuts;
65
#
endif
66
QVariant userData;
67
68
QObjectList associatedObjects;
69
virtual
QObject *menu()
const
;
70
virtual
void
setMenu(QObject *menu);
71
72
#
if
QT_CONFIG
(
shortcut
)
73
QList<
int
> shortcutIds;
74
Qt::ShortcutContext shortcutContext = Qt::WindowShortcut;
75
uint autorepeat : 1;
76
#
endif
77
QFont font;
78
uint enabled : 1, explicitEnabled : 1, explicitEnabledValue : 1;
79
uint visible : 1, forceInvisible : 1;
80
uint checkable : 1;
81
uint checked : 1;
82
uint separator : 1;
83
uint fontSet : 1;
84
85
int
iconVisibleInMenu : 2;
// Only has values -1, 0, and 1
86
int
shortcutVisibleInContextMenu : 2;
// Only has values -1, 0, and 1
87
88
QAction::MenuRole menuRole = QAction::TextHeuristicRole;
89
QAction::Priority priority = QAction::NormalPriority;
90
91
#
if
QT_CONFIG
(
shortcut
)
92
void
redoGrab(QShortcutMap &map);
93
void
redoGrabAlternate(QShortcutMap &map);
94
void
setShortcutEnabled(
bool
enable, QShortcutMap &map);
95
#
endif
// QT_NO_SHORTCUT
96
97
bool
showStatusText(QObject *widget,
const
QString &str);
98
void
sendDataChanged();
99
};
100
101
QT_END_NAMESPACE
102
103
#
endif
// QACTION_P_H
QActionGroup
The QActionGroup class groups actions together.
Definition
qactiongroup.h:18
QActionPrivate
Definition
qaction_p.h:36
QAction
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition
qaction.h:31
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(action)
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QAPP_CHECK
#define QAPP_CHECK(functionName)
Definition
qaction.cpp:19
qt_strippedText
static QString qt_strippedText(QString s)
Definition
qaction.cpp:32
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(animation)
operator<<
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition
qdir.cpp:2620
qtbase
src
gui
kernel
qaction_p.h
Generated on
for Qt by
1.18.0