Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qquickmenubar_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QQUICKMENUBAR_P_P_H
5#define QQUICKMENUBAR_P_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 <QtQuickTemplates2/private/qquickmenubar_p.h>
19#include <QtQuickTemplates2/private/qquickcontainer_p_p.h>
20
22
23class QQmlComponent;
25
26class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBarPrivate : public QQuickContainerPrivate
27{
28public:
29 Q_DECLARE_PUBLIC(QQuickMenuBar)
30
32 {
33 return menuBar->d_func();
34 }
35
38
39 QQuickItem *beginCreateItem(QQuickMenu *menu);
40 void completeCreateItem();
41
42 QQuickItem *createItem(QQuickMenu *menu);
43
44 void toggleCurrentMenu(bool visible, bool activate);
45 void activateItem(QQuickMenuBarItem *item);
46 void activateNextItem();
47 void activatePreviousItem();
48
49 void onItemHovered();
50 void onItemTriggered();
51 void onMenuAboutToHide();
52
53 qreal getContentWidth() const override;
54 qreal getContentHeight() const override;
55
58
60
61 static void menus_append(QQmlListProperty<QQuickMenu> *prop, QQuickMenu *obj);
62 static qsizetype menus_count(QQmlListProperty<QQuickMenu> *prop);
64 static void menus_clear(QQmlListProperty<QQuickMenu> *prop);
65
66 QPalette defaultPalette() const override;
67
68 bool popupMode = false;
69 bool triggering = false;
70 bool altPressed = false;
71 QQmlComponent *delegate = nullptr;
74};
75
77
78#endif // QQUICKMENUBAR_P_P_H
\inmodule QtCore
Definition qobject.h:90
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
\inmodule QtCore
Definition qpointer.h:18
The QQmlComponent class encapsulates a QML component definition.
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
static void contentData_append(QQmlListProperty< QObject > *prop, QObject *obj)
void itemImplicitWidthChanged(QQuickItem *item) override
virtual qreal getContentWidth() const
QPalette defaultPalette() const override
virtual qreal getContentHeight() const
void itemImplicitHeightChanged(QQuickItem *item) override
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
QPointer< QQuickMenuBarItem > currentItem
QPointer< QQuickItem > windowContentItem
Combined button and popup list for selecting options.
static QDBusError::ErrorType get(const char *name)
GLuint index
[2]
GLhandleARB obj
[2]
ptrdiff_t qsizetype
Definition qtypes.h:70
double qreal
Definition qtypes.h:92
QGraphicsItem * item
QMenu menu
[5]
QMenuBar * menuBar
[0]