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
qquickmenubaritem_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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKMENUBARITEM_P_H
6
#
define
QQUICKMENUBARITEM_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
<
QtQuickTemplates2
/
private
/
qquickabstractbutton_p
.
h
>
20
21
QT_REQUIRE_CONFIG
(
quicktemplates2_container
);
22
23
QT_BEGIN_NAMESPACE
24
25
class
QQuickMenu;
26
class
QQuickMenuBar;
27
class
QQuickMenuBarItemPrivate
;
28
29
class
Q_QUICKTEMPLATES2_EXPORT
QQuickMenuBarItem
:
public
QQuickAbstractButton
30
{
31
Q_OBJECT
32
Q_PROPERTY(QQuickMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL)
33
Q_PROPERTY(QQuickMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
34
Q_PROPERTY(
bool
highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL)
35
QML_NAMED_ELEMENT(MenuBarItem)
36
QML_ADDED_IN_VERSION(2, 3)
37
38
public
:
39
explicit
QQuickMenuBarItem(QQuickItem *parent =
nullptr
);
40
41
QQuickMenuBar *menuBar()
const
;
42
43
QQuickMenu *menu()
const
;
44
void
setMenu(QQuickMenu *menu);
45
46
bool
isHighlighted()
const
;
47
void
setHighlighted(
bool
highlighted);
48
49
Q_SIGNALS:
50
void
triggered();
51
void
menuBarChanged();
52
void
menuChanged();
53
void
highlightedChanged();
54
55
protected
:
56
bool
event(QEvent *event) override;
57
void
keyPressEvent(QKeyEvent *event) override;
58
void
keyReleaseEvent(QKeyEvent *event) override;
59
60
void
geometryChange(
const
QRectF &newGeometry,
const
QRectF &oldGeometry) override;
61
62
QFont defaultFont()
const
override;
63
64
#
if
QT_CONFIG
(
accessibility
)
65
QAccessible::Role accessibleRole()
const
override;
66
#
endif
67
68
private
:
69
Q_DISABLE_COPY(QQuickMenuBarItem)
70
Q_DECLARE_PRIVATE(QQuickMenuBarItem)
71
};
72
73
QT_END_NAMESPACE
74
75
#
endif
// QQUICKMENUBARITEM_P_H
QQuickMenuBarItemPrivate
Definition
qquickmenubaritem_p_p.h:28
QQuickMenuBarItemPrivate::handleRelease
bool handleRelease(const QPointF &point, ulong timestamp) override
Definition
qquickmenubaritem.cpp:79
QQuickMenuBarItemPrivate::defaultPalette
QPalette defaultPalette() const override
Definition
qquickmenubaritem.cpp:100
QQuickMenuBarItemPrivate::menuBar
QQuickMenuBar * menuBar
Definition
qquickmenubaritem_p_p.h:48
QQuickMenuBarItemPrivate::accessiblePressAction
void accessiblePressAction() override
Definition
qquickmenubaritem.cpp:51
QQuickMenuBarItemPrivate::handlePress
bool handlePress(const QPointF &point, ulong timestamp) override
Definition
qquickmenubaritem.cpp:63
QQuickMenuBarItem
Definition
qquickmenubaritem_p.h:30
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(quicktemplates2_container)
qtdeclarative
src
quicktemplates
qquickmenubaritem_p.h
Generated on
for Qt by
1.18.0