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
qquicklabsplatformmenubar_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 QQUICKLABSPLATFORMMENUBAR_P_H
5#define QQUICKLABSPLATFORMMENUBAR_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 <QtQml/qqmlparserstatus.h>
20#include <QtQml/qqmllist.h>
21#include <QtQml/qqml.h>
22#include <QtCore/private/qglobal_p.h>
23
25
26class QWindow;
29
31{
33 QML_NAMED_ELEMENT(MenuBar)
38 Q_CLASSINFO("DefaultProperty", "data")
39
40public:
43
44 QPlatformMenuBar *handle() const;
45
48
49 QWindow *window() const;
51
55 Q_INVOKABLE void clear();
56
60
61protected:
62 void classBegin() override;
63 void componentComplete() override;
64
65 QWindow *findWindow() const;
66
67 static void data_append(QQmlListProperty<QObject> *property, QObject *object);
71
76
78 bool m_complete;
79 QWindow *m_window;
80 QList<QObject *> m_data;
82 QPlatformMenuBar *m_handle;
83};
84
86
87#endif // QQUICKLABSPLATFORMMENUBAR_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
The QQmlParserStatus class provides updates on the QML parser state.
Q_INVOKABLE void removeMenu(QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::MenuBar::removeMenu(Menu menu)
static qsizetype data_count(QQmlListProperty< QObject > *property)
static qsizetype menus_count(QQmlListProperty< QQuickLabsPlatformMenu > *property)
Q_INVOKABLE void clear()
\qmlmethod void Qt.labs.platform::MenuBar::clear()
static void menus_clear(QQmlListProperty< QQuickLabsPlatformMenu > *property)
static QQuickLabsPlatformMenu * menus_at(QQmlListProperty< QQuickLabsPlatformMenu > *property, qsizetype index)
static QObject * data_at(QQmlListProperty< QObject > *property, qsizetype index)
static void data_append(QQmlListProperty< QObject > *property, QObject *object)
void classBegin() override
Invoked after class creation, but before any properties have been set.
QQmlListProperty< QQuickLabsPlatformMenu > menus
\qmlproperty list<Menu> Qt.labs.platform::MenuBar::menus
Q_INVOKABLE void insertMenu(int index, QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::MenuBar::insertMenu(int index, Menu menu)
static void data_clear(QQmlListProperty< QObject > *property)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
static void menus_append(QQmlListProperty< QQuickLabsPlatformMenu > *property, QQuickLabsPlatformMenu *menu)
Q_INVOKABLE void addMenu(QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::MenuBar::addMenu(Menu menu)
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
GLuint64 GLenum void * handle
GLuint index
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_INVOKABLE
#define Q_INTERFACES(x)
#define Q_SIGNALS
ptrdiff_t qsizetype
Definition qtypes.h:165
const char property[13]
Definition qwizard.cpp:101
#define explicit
QMenu menu
[5]