Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QACTION_P_H
5#define QACTION_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/qtguiglobal_p.h>
19#include <QtGui/qaction.h>
20#include <QtGui/qfont.h>
21#if QT_CONFIG(shortcut)
22# include <QtGui/private/qshortcutmap_p.h>
23#endif
24
25#include <QtCore/qpointer.h>
26#include "private/qobject_p.h"
27
29
31
32class QShortcutMap;
33
34class Q_GUI_EXPORT QActionPrivate : public QObjectPrivate
35{
36 Q_DECLARE_PUBLIC(QAction)
37public:
40
41 virtual void destroy();
42
43#if QT_CONFIG(shortcut)
44 virtual QShortcutMap::ContextMatcher contextMatcher() const;
45#endif
46
48 {
49 return q->d_func();
50 }
51
52 bool setEnabled(bool enable, bool byGroup);
53 void setVisible(bool b);
54
55 QPointer<QActionGroup> group;
62#if QT_CONFIG(shortcut)
63 QList<QKeySequence> shortcuts;
64#endif
66
68 virtual QObject *menu() const;
69 virtual void setMenu(QObject *menu);
70
71#if QT_CONFIG(shortcut)
72 QList<int> shortcutIds;
74 uint autorepeat : 1;
75#endif
77 uint enabled : 1, explicitEnabled : 1, explicitEnabledValue : 1;
78 uint visible : 1, forceInvisible : 1;
83
84 int iconVisibleInMenu : 2; // Only has values -1, 0, and 1
85 int shortcutVisibleInContextMenu : 2; // Only has values -1, 0, and 1
86
89
90#if QT_CONFIG(shortcut)
91 void redoGrab(QShortcutMap &map);
92 void redoGrabAlternate(QShortcutMap &map);
93 void setShortcutEnabled(bool enable, QShortcutMap &map);
94#endif // QT_NO_SHORTCUT
95
96 bool showStatusText(QObject *widget, const QString &str);
97 void sendDataChanged();
98};
99
101
102#endif // QACTION_P_H
QString whatsthis
Definition qaction_p.h:61
uint forceInvisible
Definition qaction_p.h:78
static QActionPrivate * get(QAction *q)
Definition qaction_p.h:47
QString iconText
Definition qaction_p.h:57
QObjectList associatedObjects
Definition qaction_p.h:67
int shortcutVisibleInContextMenu
Definition qaction_p.h:85
QPointer< QActionGroup > group
Definition qaction_p.h:55
int iconVisibleInMenu
Definition qaction_p.h:84
QVariant userData
Definition qaction_p.h:65
QString tooltip
Definition qaction_p.h:59
QString statustip
Definition qaction_p.h:60
QString text
Definition qaction_p.h:56
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
MenuRole
This enum describes how an action should be moved into the application menu on \macos.
Definition qaction.h:61
@ TextHeuristicRole
Definition qaction.h:61
Priority
This enum defines priorities for actions in user interface.
Definition qaction.h:64
@ NormalPriority
Definition qaction.h:65
\reentrant
Definition qfont.h:22
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
\inmodule QtCore
Definition qobject.h:103
bool(* ContextMatcher)(QObject *object, Qt::ShortcutContext context)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
QOpenGLWidget * widget
[1]
QString str
[2]
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
ShortcutContext
@ WindowShortcut
GLboolean GLboolean GLboolean b
GLboolean enable
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
#define QT_REQUIRE_CONFIG(feature)
unsigned int uint
Definition qtypes.h:34
QMenu menu
[5]