9#include <QtCore/qloggingcategory.h>
10#include <QtGui/qicon.h>
11#include <QtGui/qcursor.h>
12#include <QtGui/qpa/qplatformtheme.h>
13#include <QtGui/private/qguiapplication_p.h>
14#include <QtGui/private/qhighdpiscaling_p.h>
15#include <QtQml/private/qqmlengine_p.h>
16#include <QtQml/private/qv4scopedvalue_p.h>
17#include <QtQml/private/qv4qobjectwrapper_p.h>
18#include <QtQuick/qquickrendercontrol.h>
19#include <QtQuick/qquickwindow.h>
20#include <QtQuick/qquickitem.h>
24#if QT_CONFIG(systemtrayicon)
142 m_parentMenu(
nullptr),
143 m_systemTrayIcon(
nullptr),
145 m_iconLoader(
nullptr),
160 m_iconLoader =
nullptr;
165void QQuickLabsPlatformMenu::unparentSubmenus()
169 subMenu->setParentMenu(
nullptr);
170 item->setMenu(
nullptr);
182 if (m_menuBar && m_menuBar->
handle())
184 else if (m_parentMenu && m_parentMenu->
handle())
186#if QT_CONFIG(systemtrayicon)
187 else if (m_systemTrayIcon && m_systemTrayIcon->
handle())
201 qCDebug(qtLabsPlatformMenus) <<
"Menu ->" << m_handle;
212 handle->setMenu(m_handle);
234 if (!m_complete || !
create())
244 if (m_menuBar && m_menuBar->
handle())
246#if QT_CONFIG(systemtrayicon)
247 else if (m_systemTrayIcon && m_systemTrayIcon->
handle())
316 if (m_parentMenu ==
menu)
324#if QT_CONFIG(systemtrayicon)
334 return m_systemTrayIcon;
339 if (m_systemTrayIcon ==
icon)
342 m_systemTrayIcon =
icon;
422 return m_minimumWidth;
427 if (m_minimumWidth ==
width)
430 m_minimumWidth =
width;
471 if (m_title ==
title)
555 if (m_handle &&
item->create()) {
576 item->setMenu(
nullptr);
601 menu->setParentMenu(
this);
615 menu->setParentMenu(
nullptr);
633 item->setMenu(
nullptr);
659 args->v4engine()->throwTypeError();
679 menuItem = qobject_cast<QQuickLabsPlatformMenuItem *>(
object->object());
720 if (m_handle && m_iconLoader)
729 static int slot = staticMetaObject.indexOfSlot(
"updateIcon()");
752 if (m_menuBar && m_menuBar->
window())
778 menu->m_data.append(
object);
823void QQuickLabsPlatformMenu::updateIcon()
825 if (!m_handle || !m_iconLoader)
834#include "moc_qquicklabsplatformmenu_p.cpp"
static QPoint pos()
Returns the position of the cursor (hot spot) of the primary screen in global screen coordinates.
QGraphicsWidget * window() const
static QPlatformTheme * platformTheme()
qsizetype size() const noexcept
bool isEmpty() const noexcept
iterator insert(qsizetype i, parameter_type t)
bool removeOne(const AT &t)
qsizetype length() const noexcept
T value(qsizetype i) const
void append(parameter_type t)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
\inmodule QtCore\reentrant
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
virtual QRectF boundingRect() const
Returns the extents of the item in its own coordinate system: a rectangle from {0,...
QRectF mapRectToScene(const QRectF &rect) const
Maps the given rect in this item's coordinate system to the equivalent rectangular area within the sc...
static QWindow * renderWindowFor(QQuickWindow *win, QPoint *offset=nullptr)
Returns the real window that win is being rendered to, if any.
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
QRect toAlignedRect() const noexcept
\inmodule QtCore\reentrant
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr void moveTo(int x, int t) noexcept
Moves the rectangle, leaving the top-left corner at the given position (x, y).
\macro QT_RESTRICTED_CAST_FROM_ASCII
T toNativePixels(const T &value, const C *context)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
GLuint64 GLenum void * handle
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
QWindow * qobject_cast< QWindow * >(QObject *o)
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent