Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKLABSPLATFORMMENUBAR_P_H
6
#
define
QQUICKLABSPLATFORMMENUBAR_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qobject
.
h
>
20
#
include
<
QtQml
/
qqmlparserstatus
.
h
>
21
#
include
<
QtQml
/
qqmllist
.
h
>
22
#
include
<
QtQml
/
qqml
.
h
>
23
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
24
25
QT_BEGIN_NAMESPACE
26
27
class
QWindow;
28
class
QPlatformMenuBar;
29
class
QQuickLabsPlatformMenu
;
30
31
class
QQuickLabsPlatformMenuBar
:
public
QObject
,
public
QQmlParserStatus
32
{
33
Q_OBJECT
34
QML_NAMED_ELEMENT(MenuBar)
35
QML_ADDED_IN_VERSION
(1, 0)
36
Q_INTERFACES
(
QQmlParserStatus
)
37
Q_PROPERTY
(
QQmlListProperty
<
QObject
>
data
READ
data
FINAL
)
38
Q_PROPERTY
(
QQmlListProperty
<
QQuickLabsPlatformMenu
>
menus
READ
menus
NOTIFY
menusChanged
FINAL
)
39
Q_PROPERTY
(
QWindow
*
window
READ
window
WRITE
setWindow
NOTIFY
windowChanged
FINAL
)
40
Q_CLASSINFO
(
"DefaultProperty"
,
"data"
)
41
42
public
:
43
explicit
QQuickLabsPlatformMenuBar
(
QObject
*
parent
=
nullptr
);
44
~
QQuickLabsPlatformMenuBar
();
45
46
QPlatformMenuBar *
handle
()
const
;
47
48
QQmlListProperty
<
QObject
>
data
();
49
QQmlListProperty
<
QQuickLabsPlatformMenu
>
menus
();
50
51
QWindow *
window
()
const
;
52
void
setWindow
(QWindow *window);
53
54
Q_INVOKABLE
void
addMenu
(
QQuickLabsPlatformMenu
*menu);
55
Q_INVOKABLE
void
insertMenu
(
int
index,
QQuickLabsPlatformMenu
*menu);
56
Q_INVOKABLE
void
removeMenu
(
QQuickLabsPlatformMenu
*menu);
57
Q_INVOKABLE
void
clear
();
58
59
Q_SIGNALS
:
60
void
menusChanged
();
61
void
windowChanged
();
62
63
protected
:
64
void
classBegin
()
override
;
65
void
componentComplete
()
override
;
66
67
QWindow *
findWindow
()
const
;
68
69
static
void
data_append(QQmlListProperty<QObject> *property, QObject *object);
70
static
qsizetype
data_count
(QQmlListProperty<QObject> *property);
71
static
QObject *
data_at
(QQmlListProperty<QObject> *property, qsizetype index);
72
static
void
data_clear
(QQmlListProperty<QObject> *property);
73
74
static
void
menus_append
(QQmlListProperty<QQuickLabsPlatformMenu> *property,
QQuickLabsPlatformMenu
*menu);
75
static
qsizetype
menus_count
(QQmlListProperty<QQuickLabsPlatformMenu> *property);
76
static
QQuickLabsPlatformMenu
*
menus_at
(QQmlListProperty<QQuickLabsPlatformMenu> *property, qsizetype index);
77
static
void
menus_clear
(QQmlListProperty<QQuickLabsPlatformMenu> *property);
78
79
private
:
80
bool
m_complete;
81
QWindow *m_window;
82
QList<QObject *> m_data;
83
QList<QQuickLabsPlatformMenu *> m_menus;
84
QPlatformMenuBar *m_handle;
85
};
86
87
QT_END_NAMESPACE
88
89
#
endif
// QQUICKLABSPLATFORMMENUBAR_P_H
QQuickLabsPlatformIconLoader
Definition
qquicklabsplatformiconloader_p.h:31
QQuickLabsPlatformIconLoader::setIcon
void setIcon(const QQuickLabsPlatformIcon &icon)
Definition
qquicklabsplatformiconloader.cpp:46
QQuickLabsPlatformIconLoader::icon
QQuickLabsPlatformIcon icon() const
Definition
qquicklabsplatformiconloader.cpp:41
QQuickLabsPlatformIconLoader::setEnabled
void setEnabled(bool enabled)
Definition
qquicklabsplatformiconloader.cpp:26
QQuickLabsPlatformIcon
Definition
qquicklabsplatformicon_p.h:30
QQuickLabsPlatformIcon::operator==
bool operator==(const QQuickLabsPlatformIcon &other) const
Definition
qquicklabsplatformicon.cpp:39
QQuickLabsPlatformMenuBar
Definition
qquicklabsplatformmenubar_p.h:32
QQuickLabsPlatformMenuBar::~QQuickLabsPlatformMenuBar
~QQuickLabsPlatformMenuBar()
Definition
qquicklabsplatformmenubar.cpp:85
QQuickLabsPlatformMenuBar::data
QQmlListProperty< QObject > data()
QQuickLabsPlatformMenuBar::removeMenu
Q_INVOKABLE void removeMenu(QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::MenuBar::removeMenu(Menu menu)
Definition
qquicklabsplatformmenubar.cpp:184
QQuickLabsPlatformMenuBar::setWindow
void setWindow(QWindow *window)
Definition
qquicklabsplatformmenubar.cpp:137
QQuickLabsPlatformMenuBar::data_count
static qsizetype data_count(QQmlListProperty< QObject > *property)
Definition
qquicklabsplatformmenubar.cpp:256
QQuickLabsPlatformMenuBar::menus_count
static qsizetype menus_count(QQmlListProperty< QQuickLabsPlatformMenu > *property)
Definition
qquicklabsplatformmenubar.cpp:280
QQuickLabsPlatformMenuBar::findWindow
QWindow * findWindow() const
Definition
qquicklabsplatformmenubar.cpp:231
QQuickLabsPlatformMenuBar::clear
Q_INVOKABLE void clear()
\qmlmethod void Qt.labs.platform::MenuBar::clear()
Definition
qquicklabsplatformmenubar.cpp:201
QQuickLabsPlatformMenuBar::menus_clear
static void menus_clear(QQmlListProperty< QQuickLabsPlatformMenu > *property)
Definition
qquicklabsplatformmenubar.cpp:292
QQuickLabsPlatformMenuBar::menus_at
static QQuickLabsPlatformMenu * menus_at(QQmlListProperty< QQuickLabsPlatformMenu > *property, qsizetype index)
Definition
qquicklabsplatformmenubar.cpp:286
QQuickLabsPlatformMenuBar::data_at
static QObject * data_at(QQmlListProperty< QObject > *property, qsizetype index)
Definition
qquicklabsplatformmenubar.cpp:262
QQuickLabsPlatformMenuBar::classBegin
void classBegin() override
Invoked after class creation, but before any properties have been set.
Definition
qquicklabsplatformmenubar.cpp:218
QQuickLabsPlatformMenuBar::window
QWindow * window() const
\qmlproperty Window Qt.labs.platform::MenuBar::window
Definition
qquicklabsplatformmenubar.cpp:132
QQuickLabsPlatformMenuBar::windowChanged
void windowChanged()
QQuickLabsPlatformMenuBar::insertMenu
Q_INVOKABLE void insertMenu(int index, QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::MenuBar::insertMenu(int index, Menu menu)
Definition
qquicklabsplatformmenubar.cpp:164
QQuickLabsPlatformMenuBar::data_clear
static void data_clear(QQmlListProperty< QObject > *property)
Definition
qquicklabsplatformmenubar.cpp:268
QQuickLabsPlatformMenuBar::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquicklabsplatformmenubar.cpp:222
QQuickLabsPlatformMenuBar::menus
QQmlListProperty< QQuickLabsPlatformMenu > menus()
QQuickLabsPlatformMenuBar::menus_append
static void menus_append(QQmlListProperty< QQuickLabsPlatformMenu > *property, QQuickLabsPlatformMenu *menu)
Definition
qquicklabsplatformmenubar.cpp:274
QQuickLabsPlatformMenuBar::addMenu
Q_INVOKABLE void addMenu(QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::MenuBar::addMenu(Menu menu)
Definition
qquicklabsplatformmenubar.cpp:154
QQuickLabsPlatformMenuBar::handle
QPlatformMenuBar * handle() const
Definition
qquicklabsplatformmenubar.cpp:93
QQuickLabsPlatformMenuItem
Definition
qquicklabsplatformmenuitem_p.h:36
QQuickLabsPlatformMenuItem::setVisible
void setVisible(bool visible)
Definition
qquicklabsplatformmenuitem.cpp:288
QQuickLabsPlatformMenuItem::setIcon
void setIcon(const QQuickLabsPlatformIcon &icon)
Definition
qquicklabsplatformmenuitem.cpp:533
QQuickLabsPlatformMenuItem::setMenu
void setMenu(QQuickLabsPlatformMenu *menu)
Definition
qquicklabsplatformmenuitem.cpp:180
QQuickLabsPlatformMenuItem::setEnabled
void setEnabled(bool enabled)
Definition
qquicklabsplatformmenuitem.cpp:259
QQuickLabsPlatformMenuItem::setSubMenu
void setSubMenu(QQuickLabsPlatformMenu *menu)
Definition
qquicklabsplatformmenuitem.cpp:201
QQuickLabsPlatformMenuItem::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquicklabsplatformmenuitem.cpp:557
QQuickLabsPlatformMenuItem::create
QPlatformMenuItem * create()
Definition
qquicklabsplatformmenuitem.cpp:107
QQuickLabsPlatformMenuItem::handle
QPlatformMenuItem * handle() const
Definition
qquicklabsplatformmenuitem.cpp:102
QQuickLabsPlatformMenu
Definition
qquicklabsplatformmenu_p.h:44
QQuickLabsPlatformMenu::items_at
static QQuickLabsPlatformMenuItem * items_at(QQmlListProperty< QQuickLabsPlatformMenuItem > *property, qsizetype index)
Definition
qquicklabsplatformmenu.cpp:812
QQuickLabsPlatformMenu::sync
void sync()
Definition
qquicklabsplatformmenu.cpp:233
QQuickLabsPlatformMenu::data_at
static QObject * data_at(QQmlListProperty< QObject > *property, qsizetype index)
Definition
qquicklabsplatformmenu.cpp:788
QQuickLabsPlatformMenu::items_append
static void items_append(QQmlListProperty< QQuickLabsPlatformMenuItem > *property, QQuickLabsPlatformMenuItem *item)
Definition
qquicklabsplatformmenu.cpp:800
QQuickLabsPlatformMenu::Q_REVISION
Q_REVISION(1, 1) void iconChanged()
QQuickLabsPlatformMenu::menuBar
QQuickLabsPlatformMenuBar * menuBar() const
\readonly \qmlproperty MenuBar Qt.labs.platform::Menu::menuBar
Definition
qquicklabsplatformmenu.cpp:288
QQuickLabsPlatformMenu::isVisible
bool isVisible() const
\qmlproperty bool Qt.labs.platform::Menu::visible
Definition
qquicklabsplatformmenu.cpp:398
QQuickLabsPlatformMenu::insertItem
Q_INVOKABLE void insertItem(int index, QQuickLabsPlatformMenuItem *item)
\qmlmethod void Qt.labs.platform::Menu::insertItem(int index, MenuItem item)
Definition
qquicklabsplatformmenu.cpp:548
QQuickLabsPlatformMenu::minimumWidthChanged
void minimumWidthChanged()
QQuickLabsPlatformMenu::font
QFont font() const
\qmlproperty font Qt.labs.platform::Menu::font
Definition
qquicklabsplatformmenu.cpp:490
QQuickLabsPlatformMenu::items_clear
static void items_clear(QQmlListProperty< QQuickLabsPlatformMenuItem > *property)
Definition
qquicklabsplatformmenu.cpp:818
QQuickLabsPlatformMenu::title
QString title() const
\qmlproperty string Qt.labs.platform::Menu::title
Definition
qquicklabsplatformmenu.cpp:465
QQuickLabsPlatformMenu::setMinimumWidth
void setMinimumWidth(int width)
Definition
qquicklabsplatformmenu.cpp:426
QQuickLabsPlatformMenu::removeMenu
Q_INVOKABLE void removeMenu(QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::Menu::removeMenu(Menu submenu)
Definition
qquicklabsplatformmenu.cpp:611
QQuickLabsPlatformMenu::fontChanged
void fontChanged()
QQuickLabsPlatformMenu::create
QPlatformMenu * create()
Definition
qquicklabsplatformmenu.cpp:180
QQuickLabsPlatformMenu::data_count
static qsizetype data_count(QQmlListProperty< QObject > *property)
Definition
qquicklabsplatformmenu.cpp:782
QQuickLabsPlatformMenu::icon
QQuickLabsPlatformIcon icon() const
Definition
qquicklabsplatformmenu.cpp:513
QQuickLabsPlatformMenu::iconLoader
QQuickLabsPlatformIconLoader * iconLoader() const
Definition
qquicklabsplatformmenu.cpp:726
QQuickLabsPlatformMenu::setVisible
void setVisible(bool visible)
Definition
qquicklabsplatformmenu.cpp:403
QQuickLabsPlatformMenu::parentMenu
QQuickLabsPlatformMenu * parentMenu() const
\readonly \qmlproperty Menu Qt.labs.platform::Menu::parentMenu
Definition
qquicklabsplatformmenu.cpp:310
QQuickLabsPlatformMenu::typeChanged
void typeChanged()
QQuickLabsPlatformMenu::addMenu
Q_INVOKABLE void addMenu(QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::Menu::addMenu(Menu submenu)
Definition
qquicklabsplatformmenu.cpp:587
QQuickLabsPlatformMenu::removeItem
Q_INVOKABLE void removeItem(QQuickLabsPlatformMenuItem *item)
\qmlmethod void Qt.labs.platform::Menu::removeItem(MenuItem item)
Definition
qquicklabsplatformmenu.cpp:569
QQuickLabsPlatformMenu::setIcon
void setIcon(const QQuickLabsPlatformIcon &icon)
Definition
qquicklabsplatformmenu.cpp:521
QQuickLabsPlatformMenu::items_count
static qsizetype items_count(QQmlListProperty< QQuickLabsPlatformMenuItem > *property)
Definition
qquicklabsplatformmenu.cpp:806
QQuickLabsPlatformMenu::setEnabled
void setEnabled(bool enabled)
Definition
qquicklabsplatformmenu.cpp:380
QQuickLabsPlatformMenu::clear
Q_INVOKABLE void clear()
\qmlmethod void Qt.labs.platform::Menu::clear()
Definition
qquicklabsplatformmenu.cpp:625
QQuickLabsPlatformMenu::setFont
void setFont(const QFont &font)
Definition
qquicklabsplatformmenu.cpp:495
QQuickLabsPlatformMenu::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquicklabsplatformmenu.cpp:718
QQuickLabsPlatformMenu::addItem
Q_INVOKABLE void addItem(QQuickLabsPlatformMenuItem *item)
\qmlmethod void Qt.labs.platform::Menu::addItem(MenuItem item)
Definition
qquicklabsplatformmenu.cpp:538
QQuickLabsPlatformMenu::setType
void setType(QPlatformMenu::MenuType type)
Definition
qquicklabsplatformmenu.cpp:450
QQuickLabsPlatformMenu::data_append
static void data_append(QQmlListProperty< QObject > *property, QObject *object)
Definition
qquicklabsplatformmenu.cpp:771
QQuickLabsPlatformMenu::visibleChanged
void visibleChanged()
QQuickLabsPlatformMenu::data
QQmlListProperty< QObject > data()
QQuickLabsPlatformMenu::insertMenu
Q_INVOKABLE void insertMenu(int index, QQuickLabsPlatformMenu *menu)
\qmlmethod void Qt.labs.platform::Menu::insertMenu(int index, Menu submenu)
Definition
qquicklabsplatformmenu.cpp:597
QQuickLabsPlatformMenu::enabledChanged
void enabledChanged()
QQuickLabsPlatformMenu::~QQuickLabsPlatformMenu
~QQuickLabsPlatformMenu()
Definition
qquicklabsplatformmenu.cpp:151
QQuickLabsPlatformMenu::minimumWidth
int minimumWidth() const
\qmlproperty int Qt.labs.platform::Menu::minimumWidth
Definition
qquicklabsplatformmenu.cpp:421
QQuickLabsPlatformMenu::type
QPlatformMenu::MenuType type() const
\qmlproperty enumeration Qt.labs.platform::Menu::type
Definition
qquicklabsplatformmenu.cpp:445
QQuickLabsPlatformMenu::menuItem
QQuickLabsPlatformMenuItem * menuItem() const
\readonly \qmlproperty MenuItem Qt.labs.platform::Menu::menuItem
Definition
qquicklabsplatformmenu.cpp:355
QQuickLabsPlatformMenu::titleChanged
void titleChanged()
QQuickLabsPlatformMenu::items
QQmlListProperty< QQuickLabsPlatformMenuItem > items()
QQuickLabsPlatformMenu::data_clear
static void data_clear(QQmlListProperty< QObject > *property)
Definition
qquicklabsplatformmenu.cpp:794
QQuickLabsPlatformMenu::handle
QPlatformMenu * handle() const
Definition
qquicklabsplatformmenu.cpp:175
QQuickLabsPlatformMenu::close
void close()
\qmlmethod void Qt.labs.platform::Menu::close()
Definition
qquicklabsplatformmenu.cpp:708
QQuickLabsPlatformMenu::isEnabled
bool isEnabled() const
\qmlproperty bool Qt.labs.platform::Menu::enabled
Definition
qquicklabsplatformmenu.cpp:375
QQuickLabsPlatformMenu::aboutToHide
void aboutToHide()
QQuickLabsPlatformMenu::itemsChanged
void itemsChanged()
QQuickLabsPlatformMenu::classBegin
void classBegin() override
Invoked after class creation, but before any properties have been set.
Definition
qquicklabsplatformmenu.cpp:714
QQuickLabsPlatformMenu::setMenuBar
void setMenuBar(QQuickLabsPlatformMenuBar *menuBar)
Definition
qquicklabsplatformmenu.cpp:293
QQuickLabsPlatformMenu::parentMenuChanged
void parentMenuChanged()
QQuickLabsPlatformMenu::menuBarChanged
void menuBarChanged()
QQuickLabsPlatformMenu::setTitle
void setTitle(const QString &title)
Definition
qquicklabsplatformmenu.cpp:470
QQuickLabsPlatformMenu::setParentMenu
void setParentMenu(QQuickLabsPlatformMenu *menu)
Definition
qquicklabsplatformmenu.cpp:315
QQuickLabsPlatformMenu::findWindow
QWindow * findWindow(QQuickItem *target, QPoint *offset) const
Definition
qquicklabsplatformmenu.cpp:748
QQuickLabsPlatformMenu::systemTrayIconChanged
void systemTrayIconChanged()
QQuickLabsPlatformMenu::destroy
void destroy()
Definition
qquicklabsplatformmenu.cpp:220
QQuickLabsPlatformSystemTrayIcon
Definition
qquicklabsplatformsystemtrayicon_p.h:35
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QWidgetPlatform
Definition
qwidgetplatform_p.h:61
effectiveWindow
static QWindow * effectiveWindow(QWindow *window, QPoint *offset)
Definition
qquicklabsplatformmenu.cpp:737
qtdeclarative
src
labs
platform
qquicklabsplatformmenubar_p.h
Generated on
for Qt by
1.18.0