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
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
21#include <QtCore/qpointer.h>
22
24
25class QQmlComponent;
27
28class Q_QUICKTEMPLATES2_EXPORT QQuickMenuBarPrivate : public QQuickContainerPrivate
29{
30public:
31 Q_DECLARE_PUBLIC(QQuickMenuBar)
32
34 {
35 return menuBar->d_func();
36 }
37
38 QQmlListProperty<QQuickMenu> menus();
39 QQmlListProperty<QObject> contentData();
40
41 QQuickItem *beginCreateItem(QQuickMenu *menu);
42 void completeCreateItem();
43
44 QQuickItem *createItem(QQuickMenu *menu);
45
46 void toggleCurrentMenu(bool visible, bool activate);
47 void activateItem(QQuickMenuBarItem *item);
48 void activateNextItem();
49 void activatePreviousItem();
50
51 void onItemHovered();
52 void onItemTriggered();
53 void onMenuAboutToHide();
54
55 qreal getContentWidth() const override;
56 qreal getContentHeight() const override;
57
58 void itemImplicitWidthChanged(QQuickItem *item) override;
59 void itemImplicitHeightChanged(QQuickItem *item) override;
60
61 static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);
62
63 static void menus_append(QQmlListProperty<QQuickMenu> *prop, QQuickMenu *obj);
64 static qsizetype menus_count(QQmlListProperty<QQuickMenu> *prop);
65 static QQuickMenu *menus_at(QQmlListProperty<QQuickMenu> *prop, qsizetype index);
66 static void menus_clear(QQmlListProperty<QQuickMenu> *prop);
67
68 QPalette defaultPalette() const override;
69
70 bool popupMode = false;
71 bool triggering = false;
72 bool altPressed = false;
73 QQmlComponent *delegate = nullptr;
74 QPointer<QQuickMenuBarItem> currentItem;
75 QPointer<QQuickItem> windowContentItem;
76};
77
79
80#endif // QQUICKMENUBAR_P_P_H
\inmodule QtCore
Definition qobject.h:103
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
The QQmlComponent class encapsulates a QML component definition.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
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:165
double qreal
Definition qtypes.h:187
QGraphicsItem * item
QMenu menu
[5]
QMenuBar * menuBar
[0]