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
qquicklabsplatformmenuitemgroup_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QQUICKLABSPLATFORMMENUITEMGROUP_P_H
5#define QQUICKLABSPLATFORMMENUITEMGROUP_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 <QtCore/qlist.h>
20#include <QtQml/qqml.h>
21#include <QtCore/private/qglobal_p.h>
22
24
26class QQuickLabsPlatformMenuItemGroupPrivate;
27
29{
31 QML_NAMED_ELEMENT(MenuItemGroup)
37
38public:
41
42 bool isEnabled() const;
43 void setEnabled(bool enabled);
44
45 bool isVisible() const;
46 void setVisible(bool visible);
47
48 bool isExclusive() const;
49 void setExclusive(bool exclusive);
50
53
55
58 Q_INVOKABLE void clear();
59
63
69
71 QQuickLabsPlatformMenuItem *findCurrent() const;
72 void updateCurrent();
73 void activateItem();
74 void hoverItem();
75
77 static qsizetype items_count(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop);
79 static void items_clear(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop);
80
81 bool m_enabled;
82 bool m_visible;
83 bool m_exclusive;
84 QQuickLabsPlatformMenuItem *m_checkedItem;
86};
87
89
90#endif // QQUICKLABSPLATFORMMENUITEMGROUP_P_H
Definition qlist.h:75
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
QQmlListProperty< QQuickLabsPlatformMenuItem > items
\qmlproperty list<MenuItem> Qt.labs.platform::MenuItemGroup::items
Q_INVOKABLE void removeItem(QQuickLabsPlatformMenuItem *item)
\qmlmethod void Qt.labs.platform::MenuItemGroup::removeItem(MenuItem item)
Q_INVOKABLE void clear()
\qmlmethod void Qt.labs.platform::MenuItemGroup::clear()
void setCheckedItem(QQuickLabsPlatformMenuItem *item)
void hovered(QQuickLabsPlatformMenuItem *item)
void triggered(QQuickLabsPlatformMenuItem *item)
bool isEnabled() const
\qmlproperty bool Qt.labs.platform::MenuItemGroup::enabled
bool isVisible() const
\qmlproperty bool Qt.labs.platform::MenuItemGroup::visible
Q_INVOKABLE void addItem(QQuickLabsPlatformMenuItem *item)
\qmlmethod void Qt.labs.platform::MenuItemGroup::addItem(MenuItem item)
bool isExclusive() const
\qmlproperty bool Qt.labs.platform::MenuItemGroup::exclusive
Combined button and popup list for selecting options.
GLuint index
[2]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLhandleARB obj
[2]
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SIGNALS
ptrdiff_t qsizetype
Definition qtypes.h:165
#define explicit
QGraphicsItem * item