Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdbusmenubar_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Dmitry Shachnev <mitya57@gmail.com>
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 QDBUSMENUBAR_P_H
6#define QDBUSMENUBAR_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 <private/qdbusplatformmenu_p.h>
20#include <private/qdbusmenuadaptor_p.h>
21#include <QtCore/QHash>
22#include <QtCore/QString>
23#include <QtGui/QWindow>
24
25QT_BEGIN_NAMESPACE
26
27class QDBusMenuBar : public QPlatformMenuBar
28{
29 Q_OBJECT
30
31public:
32 QDBusMenuBar();
33 virtual ~QDBusMenuBar();
34
35 void insertMenu(QPlatformMenu *menu, QPlatformMenu *before) override;
36 void removeMenu(QPlatformMenu *menu) override;
37 void syncMenu(QPlatformMenu *menu) override;
38 void handleReparent(QWindow *newParentWindow) override;
39 QPlatformMenu *menuForTag(quintptr tag) const override;
40 QPlatformMenu *createMenu() const override;
41
42private:
43 QDBusPlatformMenu *m_menu;
44 QDBusMenuAdaptor *m_menuAdaptor;
45 QHash<quintptr, QDBusPlatformMenuItem *> m_menuItems;
46 QPointer<QWindow> m_window;
47 QString m_objectPath;
48
49 QDBusPlatformMenuItem *menuItemForMenu(QPlatformMenu *menu);
50 static void updateMenuItem(QDBusPlatformMenuItem *item, QPlatformMenu *menu);
51 void registerMenuBar();
52 void unregisterMenuBar();
53};
54
55QT_END_NAMESPACE
56
57#endif // QDBUSMENUBAR_P_H
Combined button and popup list for selecting options.
#define REGISTRAR_PATH
#define REGISTRAR_SERVICE