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
qquickactiongroup_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QQUICKACTIONGROUP_P_H
5#define QQUICKACTIONGROUP_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 <QtCore/qobject.h>
19#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
20#include <QtQml/qqml.h>
21
23
24class QQuickAction;
28
29class Q_QUICKTEMPLATES2_EXPORT QQuickActionGroup : public QObject
30{
32 Q_PROPERTY(QQuickAction *checkedAction READ checkedAction WRITE setCheckedAction NOTIFY checkedActionChanged FINAL)
33 Q_PROPERTY(QQmlListProperty<QQuickAction> actions READ actions NOTIFY actionsChanged FINAL)
34 Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL)
35 Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
36 Q_CLASSINFO("DefaultProperty", "actions")
37 QML_NAMED_ELEMENT(ActionGroup)
40
41public:
42 explicit QQuickActionGroup(QObject *parent = nullptr);
44
45 static QQuickActionGroupAttached *qmlAttachedProperties(QObject *object);
46
47 QQuickAction *checkedAction() const;
48 void setCheckedAction(QQuickAction *checkedAction);
49
51
52 bool isExclusive() const;
53 void setExclusive(bool exclusive);
54
55 bool isEnabled() const;
56 void setEnabled(bool enabled);
57
58public Q_SLOTS:
59 void addAction(QQuickAction *action);
60 void removeAction(QQuickAction *action);
61
63 void checkedActionChanged();
64 void actionsChanged();
65 void exclusiveChanged();
66 void enabledChanged();
67 void triggered(QQuickAction *action);
68
70 Q_DISABLE_COPY(QQuickActionGroup)
71 Q_DECLARE_PRIVATE(QQuickActionGroup)
72
73 Q_PRIVATE_SLOT(d_func(), void _q_updateCurrent())
74};
75
76class Q_QUICKTEMPLATES2_EXPORT QQuickActionGroupAttached : public QObject
77{
79 Q_PROPERTY(QQuickActionGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL)
80
81public:
82 explicit QQuickActionGroupAttached(QObject *parent = nullptr);
83
84 QQuickActionGroup *group() const;
85 void setGroup(QQuickActionGroup *group);
86
89
90private:
91 Q_DISABLE_COPY(QQuickActionGroupAttached)
92 Q_DECLARE_PRIVATE(QQuickActionGroupAttached)
93};
94
96
97#endif // QQUICKACTIONGROUP_P_H
\inmodule QtCore
Definition qobject.h:103
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
Groups actions together.
Combined button and popup list for selecting options.
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLboolean GLuint group
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_SLOTS
#define Q_PRIVATE_SLOT(d, signature)
#define Q_SIGNALS
#define explicit