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
qplatformmenu.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2014 Martin Graesslin <mgraesslin@kde.org>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
7
8#include <qpa/qplatformtheme.h>
9#include <private/qguiapplication_p.h>
10
12
13QPlatformMenuItem::QPlatformMenuItem()
14{
15 m_tag = reinterpret_cast<quintptr>(this);
16}
17
18void QPlatformMenuItem::setTag(quintptr tag)
19{
20 m_tag = tag;
21}
22
23quintptr QPlatformMenuItem::tag() const
24{
25 return m_tag;
26}
27
28QPlatformMenu::QPlatformMenu()
29{
30 m_tag = reinterpret_cast<quintptr>(this);
31}
32
33void QPlatformMenu::setTag(quintptr tag)
34{
35 m_tag = tag;
36}
37
38quintptr QPlatformMenu::tag() const
39{
40 return m_tag;
41
42}
43
44QPlatformMenuItem *QPlatformMenu::createMenuItem() const
45{
46 return QGuiApplicationPrivate::platformTheme()->createPlatformMenuItem();
47}
48
49QPlatformMenu *QPlatformMenu::createSubMenu() const
50{
51 return QGuiApplicationPrivate::platformTheme()->createPlatformMenu();
52}
53
54QPlatformMenu *QPlatformMenuBar::createMenu() const
55{
56 return QGuiApplicationPrivate::platformTheme()->createPlatformMenu();
57}
58
59QT_END_NAMESPACE
60
61#include "moc_qplatformmenu.cpp"
Combined button and popup list for selecting options.