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 QGUIACTIONGROUP_P_H
5#define QGUIACTIONGROUP_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/qactiongroup.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
28QT_REQUIRE_CONFIG(action);
29
30QT_BEGIN_NAMESPACE
31
32class Q_GUI_EXPORT QActionGroupPrivate : public QObjectPrivate
33{
34 Q_DECLARE_PUBLIC(QActionGroup)
35public:
36 enum Signal { Triggered, Hovered };
37
38 QActionGroupPrivate();
39 ~QActionGroupPrivate();
40
41 virtual void emitSignal(Signal, QAction *) {}
42
43 QList<QAction *> actions;
44 QPointer<QAction> current;
45 uint enabled : 1;
46 uint visible : 1;
47 QActionGroup::ExclusionPolicy exclusionPolicy = QActionGroup::ExclusionPolicy::Exclusive;
48
49private:
50 void _q_actionTriggered(); //private slot
51 void _q_actionChanged(); //private slot
52 void _q_actionHovered(); //private slot
53};
54
55QT_END_NAMESPACE
56
57#endif // QACTIONGROUP_P_H
58

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

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