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
QQuickLabsPlatformMenu Class Reference

#include <qquicklabsplatformmenu_p.h>

Inheritance diagram for QQuickLabsPlatformMenu:
Collaboration diagram for QQuickLabsPlatformMenu:

Public Slots

void open (QQmlV4FunctionPtr args)
 \qmlmethod void Qt.labs.platform::Menu::open(MenuItem item)
void close ()
 \qmlmethod void Qt.labs.platform::Menu::close()
Public Slots inherited from QObject
void deleteLater ()
 \threadsafe

Signals

void aboutToShow ()
void aboutToHide ()
void itemsChanged ()
void menuBarChanged ()
void parentMenuChanged ()
void systemTrayIconChanged ()
void titleChanged ()
void enabledChanged ()
void visibleChanged ()
void minimumWidthChanged ()
void fontChanged ()
void typeChanged ()
 Q_REVISION (1, 1) void iconChanged()
Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.

Public Member Functions

 QQuickLabsPlatformMenu (QObject *parent=nullptr)
 A native menu.
 ~QQuickLabsPlatformMenu ()
QPlatformMenuhandle () const
QPlatformMenucreate ()
void destroy ()
void sync ()
QQmlListProperty< QObjectdata ()
QQmlListProperty< QQuickLabsPlatformMenuItemitems ()
QQuickLabsPlatformMenuBarmenuBar () const
 \readonly \qmlproperty MenuBar Qt.labs.platform::Menu::menuBar
void setMenuBar (QQuickLabsPlatformMenuBar *menuBar)
QQuickLabsPlatformMenuparentMenu () const
 \readonly \qmlproperty Menu Qt.labs.platform::Menu::parentMenu
void setParentMenu (QQuickLabsPlatformMenu *menu)
QQuickLabsPlatformMenuItemmenuItem () const
 \readonly \qmlproperty MenuItem Qt.labs.platform::Menu::menuItem
bool isEnabled () const
 \qmlproperty bool Qt.labs.platform::Menu::enabled
void setEnabled (bool enabled)
bool isVisible () const
 \qmlproperty bool Qt.labs.platform::Menu::visible
void setVisible (bool visible)
int minimumWidth () const
 \qmlproperty int Qt.labs.platform::Menu::minimumWidth
void setMinimumWidth (int width)
QPlatformMenu::MenuType type () const
 \qmlproperty enumeration Qt.labs.platform::Menu::type
void setType (QPlatformMenu::MenuType type)
QString title () const
 \qmlproperty string Qt.labs.platform::Menu::title
void setTitle (const QString &title)
QFont font () const
 \qmlproperty font Qt.labs.platform::Menu::font
void setFont (const QFont &font)
QQuickLabsPlatformIcon icon () const
void setIcon (const QQuickLabsPlatformIcon &icon)
Q_INVOKABLE void addItem (QQuickLabsPlatformMenuItem *item)
 \qmlmethod void Qt.labs.platform::Menu::addItem(MenuItem item)
Q_INVOKABLE void insertItem (int index, QQuickLabsPlatformMenuItem *item)
 \qmlmethod void Qt.labs.platform::Menu::insertItem(int index, MenuItem item)
Q_INVOKABLE void removeItem (QQuickLabsPlatformMenuItem *item)
 \qmlmethod void Qt.labs.platform::Menu::removeItem(MenuItem item)
Q_INVOKABLE void addMenu (QQuickLabsPlatformMenu *menu)
 \qmlmethod void Qt.labs.platform::Menu::addMenu(Menu submenu)
Q_INVOKABLE void insertMenu (int index, QQuickLabsPlatformMenu *menu)
 \qmlmethod void Qt.labs.platform::Menu::insertMenu(int index, Menu submenu)
Q_INVOKABLE void removeMenu (QQuickLabsPlatformMenu *menu)
 \qmlmethod void Qt.labs.platform::Menu::removeMenu(Menu submenu)
Q_INVOKABLE void clear ()
 \qmlmethod void Qt.labs.platform::Menu::clear()
Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
QString objectName () const
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
QBindable< QStringbindableObjectName ()
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
bool isQmlObjectType () const
 Returns whether the object has been created by the QML engine or ownership has been explicitly set via QJSEngine::setObjectOwnership().
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
QThreadthread () const
 Returns the thread in which the object lives.
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
void killTimer (int id)
 Kills the timer with timer identifier, id.
void killTimer (Qt::TimerId id)
template<typename T>
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
template<typename T>
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
template<typename T>
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename T>
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const QObjectListchildren () const
 Returns a list of child objects.
void setParent (QObject *parent)
 Makes the object a child of parent.
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
bool disconnect (const QObject *receiver, const char *member=nullptr) const
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
bool setProperty (const char *name, QVariant &&value)
QVariant property (const char *name) const
 Returns the value of the object's name property.
QList< QByteArraydynamicPropertyNames () const
QBindingStoragebindingStorage ()
const QBindingStoragebindingStorage () const
QObjectparent () const
 Returns a pointer to the parent object.
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
Public Member Functions inherited from QQmlParserStatus
 QQmlParserStatus ()
virtual ~QQmlParserStatus ()

Protected Member Functions

void classBegin () override
 Invoked after class creation, but before any properties have been set.
void componentComplete () override
 Invoked after the root component that caused this instantiation has completed construction.
QQuickLabsPlatformIconLoadericonLoader () const
QWindowfindWindow (QQuickItem *target, QPoint *offset) const
Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
int senderSignalIndex () const
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
bool isSignalConnected (const QMetaMethod &signal) const
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
virtual void connectNotify (const QMetaMethod &signal)
virtual void disconnectNotify (const QMetaMethod &signal)
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)

Static Protected Member Functions

static void data_append (QQmlListProperty< QObject > *property, QObject *object)
static qsizetype data_count (QQmlListProperty< QObject > *property)
static QObjectdata_at (QQmlListProperty< QObject > *property, qsizetype index)
static void data_clear (QQmlListProperty< QObject > *property)
static void items_append (QQmlListProperty< QQuickLabsPlatformMenuItem > *property, QQuickLabsPlatformMenuItem *item)
static qsizetype items_count (QQmlListProperty< QQuickLabsPlatformMenuItem > *property)
static QQuickLabsPlatformMenuItemitems_at (QQmlListProperty< QQuickLabsPlatformMenuItem > *property, qsizetype index)
static void items_clear (QQmlListProperty< QQuickLabsPlatformMenuItem > *property)

Properties

QQmlListProperty< QObjectdata
 \qmldefault \qmlproperty list<QtObject> Qt.labs.platform::Menu::data
QQmlListProperty< QQuickLabsPlatformMenuItemitems
 \qmlproperty list<MenuItem> Qt.labs.platform::Menu::items
QQuickLabsPlatformMenuBarmenuBar
QQuickLabsPlatformMenuparentMenu
QQuickLabsPlatformMenuItemmenuItem
bool enabled
bool visible
int minimumWidth
QPlatformMenu::MenuType type
QString title
QFont font
QQuickLabsPlatformIcon icon
Properties inherited from QObject
QString objectName
 the name of this object

Additional Inherited Members

Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
template<typename Func1, typename Func2>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
template<typename Func1>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr

Detailed Description

Definition at line 43 of file qquicklabsplatformmenu_p.h.

Constructor & Destructor Documentation

◆ QQuickLabsPlatformMenu()

QT_BEGIN_NAMESPACE QQuickLabsPlatformMenu::QQuickLabsPlatformMenu ( QObject * parent = nullptr)
explicit

A native menu.

\qmltype Menu
\inherits QtObject

! \nativetype QQuickLabsPlatformMenu \inqmlmodule Qt.labs.platform

Since
5.8

The Menu type provides a QML API for native platform menu popups.

} {A native popup menu}

Menu can be used in a \l MenuBar, or as a stand-alone context menu. The following example shows how to open a context menu on right mouse click:

MouseArea {
acceptedButtons: Qt.RightButton
onClicked: zoomMenu.open()
}
Menu {
id: zoomMenu
MenuItem {
text: qsTr("Zoom In")
shortcut: StandardKey.ZoomIn
onTriggered: zoomIn()
}
MenuItem {
text: qsTr("Zoom Out")
shortcut: StandardKey.ZoomOut
onTriggered: zoomOut()
}
}
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:349
Definition qcompare.h:76
GLenum GLuint id
QQuickAnchors * anchors(QQuickItem *item)

Definition at line 135 of file qquicklabsplatformmenu.cpp.

◆ ~QQuickLabsPlatformMenu()

QQuickLabsPlatformMenu::~QQuickLabsPlatformMenu ( )

Definition at line 151 of file qquicklabsplatformmenu.cpp.

Member Function Documentation

◆ aboutToHide

void QQuickLabsPlatformMenu::aboutToHide ( )
signal

◆ aboutToShow

void QQuickLabsPlatformMenu::aboutToShow ( )
signal

◆ addItem()

void QQuickLabsPlatformMenu::addItem ( QQuickLabsPlatformMenuItem * item)

\qmlmethod void Qt.labs.platform::Menu::addItem(MenuItem item)

Adds an item to the end of the menu.

Definition at line 538 of file qquicklabsplatformmenu.cpp.

◆ addMenu()

void QQuickLabsPlatformMenu::addMenu ( QQuickLabsPlatformMenu * menu)

\qmlmethod void Qt.labs.platform::Menu::addMenu(Menu submenu)

Adds a submenu to the end of the menu.

Definition at line 587 of file qquicklabsplatformmenu.cpp.

◆ classBegin()

void QQuickLabsPlatformMenu::classBegin ( )
overrideprotectedvirtual

Invoked after class creation, but before any properties have been set.

Implements QQmlParserStatus.

Definition at line 714 of file qquicklabsplatformmenu.cpp.

◆ clear()

void QQuickLabsPlatformMenu::clear ( )

\qmlmethod void Qt.labs.platform::Menu::clear()

Removes all items from the menu.

Definition at line 625 of file qquicklabsplatformmenu.cpp.

References sync().

Here is the call graph for this function:

◆ close

void QQuickLabsPlatformMenu::close ( )
slot

\qmlmethod void Qt.labs.platform::Menu::close()

Closes the menu.

Definition at line 708 of file qquicklabsplatformmenu.cpp.

◆ componentComplete()

void QQuickLabsPlatformMenu::componentComplete ( )
overrideprotectedvirtual

Invoked after the root component that caused this instantiation has completed construction.

At this point all static values and binding values have been assigned to the class.

Implements QQmlParserStatus.

Definition at line 718 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformIconLoader::setEnabled(), and sync().

Here is the call graph for this function:

◆ create()

QPlatformMenu * QQuickLabsPlatformMenu::create ( )

Definition at line 180 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformMenuItem::create(), handle(), and QQuickLabsPlatformMenuBar::handle().

Referenced by QQuickLabsPlatformMenuBar::insertMenu(), and sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

QQmlListProperty< QObject > QQuickLabsPlatformMenu::data ( )

◆ data_append()

void QQuickLabsPlatformMenu::data_append ( QQmlListProperty< QObject > * property,
QObject * object )
staticprotected

Definition at line 771 of file qquicklabsplatformmenu.cpp.

◆ data_at()

QObject * QQuickLabsPlatformMenu::data_at ( QQmlListProperty< QObject > * property,
qsizetype index )
staticprotected

Definition at line 788 of file qquicklabsplatformmenu.cpp.

◆ data_clear()

void QQuickLabsPlatformMenu::data_clear ( QQmlListProperty< QObject > * property)
staticprotected

Definition at line 794 of file qquicklabsplatformmenu.cpp.

◆ data_count()

qsizetype QQuickLabsPlatformMenu::data_count ( QQmlListProperty< QObject > * property)
staticprotected

Definition at line 782 of file qquicklabsplatformmenu.cpp.

◆ destroy()

void QQuickLabsPlatformMenu::destroy ( )

Definition at line 220 of file qquicklabsplatformmenu.cpp.

Referenced by setMenuBar(), and setParentMenu().

Here is the caller graph for this function:

◆ enabledChanged

void QQuickLabsPlatformMenu::enabledChanged ( )
signal

◆ findWindow()

QWindow * QQuickLabsPlatformMenu::findWindow ( QQuickItem * target,
QPoint * offset ) const
protected

Definition at line 748 of file qquicklabsplatformmenu.cpp.

◆ font()

QFont QQuickLabsPlatformMenu::font ( ) const

\qmlproperty font Qt.labs.platform::Menu::font

This property holds the menu's font.

See also
title

Definition at line 490 of file qquicklabsplatformmenu.cpp.

◆ fontChanged

void QQuickLabsPlatformMenu::fontChanged ( )
signal

◆ handle()

QPlatformMenu * QQuickLabsPlatformMenu::handle ( ) const

Definition at line 175 of file qquicklabsplatformmenu.cpp.

Referenced by create(), QQuickLabsPlatformMenuItem::create(), QQuickLabsPlatformMenuBar::insertMenu(), QQuickLabsPlatformMenuBar::removeMenu(), and QQuickLabsPlatformMenuItem::sync().

Here is the caller graph for this function:

◆ icon()

QQuickLabsPlatformIcon QQuickLabsPlatformMenu::icon ( ) const
Since
Qt.labs.platform 1.1 (Qt 5.12) \qmlproperty url Qt.labs.platform::Menu::icon.source \qmlproperty string Qt.labs.platform::Menu::icon.name \qmlproperty bool Qt.labs.platform::Menu::icon.mask

This property holds the menu item's icon.

Definition at line 513 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformIconLoader::icon(), and iconLoader().

Referenced by menuItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iconLoader()

QQuickLabsPlatformIconLoader * QQuickLabsPlatformMenu::iconLoader ( ) const
protected

Definition at line 726 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformIconLoader::setEnabled().

Referenced by icon(), and setIcon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertItem()

void QQuickLabsPlatformMenu::insertItem ( int index,
QQuickLabsPlatformMenuItem * item )

\qmlmethod void Qt.labs.platform::Menu::insertItem(int index, MenuItem item)

Inserts an item at the specified index in the menu.

Definition at line 548 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformMenuItem::create(), QQuickLabsPlatformMenuItem::handle(), QQuickLabsPlatformMenuItem::setMenu(), and sync().

Here is the call graph for this function:

◆ insertMenu()

void QQuickLabsPlatformMenu::insertMenu ( int index,
QQuickLabsPlatformMenu * menu )

\qmlmethod void Qt.labs.platform::Menu::insertMenu(int index, Menu submenu)

Inserts a submenu at the specified index in the menu.

Definition at line 597 of file qquicklabsplatformmenu.cpp.

References setParentMenu().

Here is the call graph for this function:

◆ isEnabled()

bool QQuickLabsPlatformMenu::isEnabled ( ) const

\qmlproperty bool Qt.labs.platform::Menu::enabled

This property holds whether the menu is enabled. The default value is true.

Definition at line 375 of file qquicklabsplatformmenu.cpp.

◆ isVisible()

bool QQuickLabsPlatformMenu::isVisible ( ) const

\qmlproperty bool Qt.labs.platform::Menu::visible

This property holds whether the menu is visible. The default value is true.

Definition at line 398 of file qquicklabsplatformmenu.cpp.

◆ items()

QQmlListProperty< QQuickLabsPlatformMenuItem > QQuickLabsPlatformMenu::items ( )

◆ items_append()

void QQuickLabsPlatformMenu::items_append ( QQmlListProperty< QQuickLabsPlatformMenuItem > * property,
QQuickLabsPlatformMenuItem * item )
staticprotected

Definition at line 800 of file qquicklabsplatformmenu.cpp.

◆ items_at()

QQuickLabsPlatformMenuItem * QQuickLabsPlatformMenu::items_at ( QQmlListProperty< QQuickLabsPlatformMenuItem > * property,
qsizetype index )
staticprotected

Definition at line 812 of file qquicklabsplatformmenu.cpp.

◆ items_clear()

void QQuickLabsPlatformMenu::items_clear ( QQmlListProperty< QQuickLabsPlatformMenuItem > * property)
staticprotected

Definition at line 818 of file qquicklabsplatformmenu.cpp.

◆ items_count()

qsizetype QQuickLabsPlatformMenu::items_count ( QQmlListProperty< QQuickLabsPlatformMenuItem > * property)
staticprotected

Definition at line 806 of file qquicklabsplatformmenu.cpp.

◆ itemsChanged

void QQuickLabsPlatformMenu::itemsChanged ( )
signal

◆ menuBar()

QQuickLabsPlatformMenuBar * QQuickLabsPlatformMenu::menuBar ( ) const

\readonly \qmlproperty MenuBar Qt.labs.platform::Menu::menuBar

This property holds the menubar that the menu belongs to, or null if the menu is not in a menubar.

Definition at line 288 of file qquicklabsplatformmenu.cpp.

◆ menuBarChanged

void QQuickLabsPlatformMenu::menuBarChanged ( )
signal

◆ menuItem()

QQuickLabsPlatformMenuItem * QQuickLabsPlatformMenu::menuItem ( ) const

\readonly \qmlproperty MenuItem Qt.labs.platform::Menu::menuItem

This property holds the item that presents the menu (in a parent menu).

Definition at line 355 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformMenuItem::componentComplete(), icon(), QQuickLabsPlatformMenuItem::setEnabled(), QQuickLabsPlatformMenuItem::setIcon(), QQuickLabsPlatformMenuItem::setSubMenu(), and QQuickLabsPlatformMenuItem::setVisible().

Here is the call graph for this function:

◆ minimumWidth()

int QQuickLabsPlatformMenu::minimumWidth ( ) const

\qmlproperty int Qt.labs.platform::Menu::minimumWidth

This property holds the minimum width of the menu. The default value is -1 (no minimum width).

Definition at line 421 of file qquicklabsplatformmenu.cpp.

◆ minimumWidthChanged

void QQuickLabsPlatformMenu::minimumWidthChanged ( )
signal

◆ open

void QQuickLabsPlatformMenu::open ( QQmlV4FunctionPtr args)
slot

\qmlmethod void Qt.labs.platform::Menu::open(MenuItem item)

Opens the menu at the current mouse position, optionally aligned to a menu item.

\qmlmethod void Qt.labs.platform::Menu::open(Item target, MenuItem item)

Opens the menu at the specified target item, optionally aligned to a menu item.

Definition at line 654 of file qquicklabsplatformmenu.cpp.

◆ parentMenu()

QQuickLabsPlatformMenu * QQuickLabsPlatformMenu::parentMenu ( ) const

\readonly \qmlproperty Menu Qt.labs.platform::Menu::parentMenu

This property holds the parent menu that the menu belongs to, or null if the menu is not a sub-menu.

Definition at line 310 of file qquicklabsplatformmenu.cpp.

◆ parentMenuChanged

void QQuickLabsPlatformMenu::parentMenuChanged ( )
signal

◆ Q_REVISION

QQuickLabsPlatformMenu::Q_REVISION ( 1 ,
1  )
signal

◆ removeItem()

void QQuickLabsPlatformMenu::removeItem ( QQuickLabsPlatformMenuItem * item)

\qmlmethod void Qt.labs.platform::Menu::removeItem(MenuItem item)

Removes an item from the menu.

Definition at line 569 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformMenuItem::handle(), QQuickLabsPlatformMenuItem::setMenu(), and sync().

Here is the call graph for this function:

◆ removeMenu()

void QQuickLabsPlatformMenu::removeMenu ( QQuickLabsPlatformMenu * menu)

\qmlmethod void Qt.labs.platform::Menu::removeMenu(Menu submenu)

Removes a submenu from the menu.

Definition at line 611 of file qquicklabsplatformmenu.cpp.

References setParentMenu().

Here is the call graph for this function:

◆ setEnabled()

void QQuickLabsPlatformMenu::setEnabled ( bool enabled)

Definition at line 380 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformMenuItem::setEnabled(), and sync().

Here is the call graph for this function:

◆ setFont()

void QQuickLabsPlatformMenu::setFont ( const QFont & font)

Definition at line 495 of file qquicklabsplatformmenu.cpp.

References sync().

Here is the call graph for this function:

◆ setIcon()

void QQuickLabsPlatformMenu::setIcon ( const QQuickLabsPlatformIcon & icon)

Definition at line 521 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformIconLoader::icon(), iconLoader(), QQuickLabsPlatformIcon::operator==(), QQuickLabsPlatformIconLoader::setIcon(), and QQuickLabsPlatformMenuItem::setIcon().

Here is the call graph for this function:

◆ setMenuBar()

void QQuickLabsPlatformMenu::setMenuBar ( QQuickLabsPlatformMenuBar * menuBar)

Definition at line 293 of file qquicklabsplatformmenu.cpp.

References destroy().

Referenced by QQuickLabsPlatformMenuBar::insertMenu(), and QQuickLabsPlatformMenuBar::removeMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMinimumWidth()

void QQuickLabsPlatformMenu::setMinimumWidth ( int width)

Definition at line 426 of file qquicklabsplatformmenu.cpp.

References sync().

Here is the call graph for this function:

◆ setParentMenu()

void QQuickLabsPlatformMenu::setParentMenu ( QQuickLabsPlatformMenu * menu)

Definition at line 315 of file qquicklabsplatformmenu.cpp.

References destroy().

Referenced by insertMenu(), and removeMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTitle()

void QQuickLabsPlatformMenu::setTitle ( const QString & title)

Definition at line 470 of file qquicklabsplatformmenu.cpp.

References sync().

Here is the call graph for this function:

◆ setType()

void QQuickLabsPlatformMenu::setType ( QPlatformMenu::MenuType type)

Definition at line 450 of file qquicklabsplatformmenu.cpp.

◆ setVisible()

void QQuickLabsPlatformMenu::setVisible ( bool visible)

Definition at line 403 of file qquicklabsplatformmenu.cpp.

References QQuickLabsPlatformMenuItem::setVisible(), and sync().

Here is the call graph for this function:

◆ sync()

void QQuickLabsPlatformMenu::sync ( )

Definition at line 233 of file qquicklabsplatformmenu.cpp.

References create(), and QQuickLabsPlatformMenuBar::handle().

Referenced by clear(), componentComplete(), insertItem(), QQuickLabsPlatformMenuBar::insertMenu(), removeItem(), setEnabled(), setFont(), setMinimumWidth(), setTitle(), setVisible(), and QQuickLabsPlatformMenuItem::sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ systemTrayIconChanged

void QQuickLabsPlatformMenu::systemTrayIconChanged ( )
signal

◆ title()

QString QQuickLabsPlatformMenu::title ( ) const

\qmlproperty string Qt.labs.platform::Menu::title

This property holds the menu's title.

Definition at line 465 of file qquicklabsplatformmenu.cpp.

◆ titleChanged

void QQuickLabsPlatformMenu::titleChanged ( )
signal

◆ type()

QPlatformMenu::MenuType QQuickLabsPlatformMenu::type ( ) const

\qmlproperty enumeration Qt.labs.platform::Menu::type

This property holds the type of the menu.

Available values: \value Menu.DefaultMenu A normal menu (default). \value Menu.EditMenu An edit menu with pre-populated cut, copy and paste items.

Definition at line 445 of file qquicklabsplatformmenu.cpp.

◆ typeChanged

void QQuickLabsPlatformMenu::typeChanged ( )
signal

◆ visibleChanged

void QQuickLabsPlatformMenu::visibleChanged ( )
signal

Property Documentation

◆ data

QQmlListProperty< QObject > QQuickLabsPlatformMenu::data
read

\qmldefault \qmlproperty list<QtObject> Qt.labs.platform::Menu::data

This default property holds the list of all objects declared as children of the menu. The data property includes objects that are not \l MenuItem instances, such as \l Timer and \l QtObject.

See also
items

Definition at line 49 of file qquicklabsplatformmenu_p.h.

◆ enabled

bool QQuickLabsPlatformMenu::enabled
readwrite

Definition at line 57 of file qquicklabsplatformmenu_p.h.

◆ font

QFont QQuickLabsPlatformMenu::font
readwrite

Definition at line 62 of file qquicklabsplatformmenu_p.h.

◆ icon

QQuickLabsPlatformIcon QQuickLabsPlatformMenu::icon
readwrite

Definition at line 63 of file qquicklabsplatformmenu_p.h.

◆ items

QQmlListProperty< QQuickLabsPlatformMenuItem > QQuickLabsPlatformMenu::items
read

\qmlproperty list<MenuItem> Qt.labs.platform::Menu::items

This property holds the list of items in the menu.

Definition at line 50 of file qquicklabsplatformmenu_p.h.

◆ menuBar

QQuickLabsPlatformMenuBar * QQuickLabsPlatformMenu::menuBar
read

Definition at line 51 of file qquicklabsplatformmenu_p.h.

◆ menuItem

QQuickLabsPlatformMenuItem * QQuickLabsPlatformMenu::menuItem
read

Definition at line 56 of file qquicklabsplatformmenu_p.h.

◆ minimumWidth

int QQuickLabsPlatformMenu::minimumWidth
readwrite

Definition at line 59 of file qquicklabsplatformmenu_p.h.

◆ parentMenu

QQuickLabsPlatformMenu * QQuickLabsPlatformMenu::parentMenu
read

Definition at line 52 of file qquicklabsplatformmenu_p.h.

◆ title

QString QQuickLabsPlatformMenu::title
readwrite

Definition at line 61 of file qquicklabsplatformmenu_p.h.

◆ type

QPlatformMenu::MenuType QQuickLabsPlatformMenu::type
readwrite

Definition at line 60 of file qquicklabsplatformmenu_p.h.

◆ visible

bool QQuickLabsPlatformMenu::visible
readwrite

Definition at line 58 of file qquicklabsplatformmenu_p.h.


The documentation for this class was generated from the following files: