![]() |
Qt 6.x
The Qt SDK
|
#include <qquicklabsplatformmenu_p.h>
Public Slots | |
void | open (QQmlV4Function *args) |
\qmlmethod void Qt.labs.platform::Menu::open(MenuItem item) | |
void | close () |
\qmlmethod void Qt.labs.platform::Menu::close() | |
![]() | |
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 (2, 1) void iconChanged() | |
![]() | |
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 () | |
QPlatformMenu * | handle () const |
QPlatformMenu * | create () |
void | destroy () |
void | sync () |
QQmlListProperty< QObject > | data () |
QQmlListProperty< QQuickLabsPlatformMenuItem > | items () |
QQuickLabsPlatformMenuBar * | menuBar () const |
\readonly \qmlproperty MenuBar Qt.labs.platform::Menu::menuBar | |
void | setMenuBar (QQuickLabsPlatformMenuBar *menuBar) |
QQuickLabsPlatformMenu * | parentMenu () const |
\readonly \qmlproperty Menu Qt.labs.platform::Menu::parentMenu | |
void | setParentMenu (QQuickLabsPlatformMenu *menu) |
QQuickLabsPlatformMenuItem * | menuItem () 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() | |
![]() | |
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< QString > | bindableObjectName () |
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 | 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). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
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::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), 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 (const QString &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 > | |
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 QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () 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 . | |
![]() | |
QQmlParserStatus () | |
virtual | ~QQmlParserStatus () |
virtual void | classBegin ()=0 |
Invoked after class creation, but before any properties have been set. | |
virtual void | componentComplete ()=0 |
Invoked after the root component that caused this instantiation has completed construction. | |
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. | |
QQuickLabsPlatformIconLoader * | iconLoader () const |
QWindow * | findWindow (QQuickItem *target, QPoint *offset) const |
![]() | |
QObject * | sender () 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 QObject * | data_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 QQuickLabsPlatformMenuItem * | items_at (QQmlListProperty< QQuickLabsPlatformMenuItem > *property, qsizetype index) |
static void | items_clear (QQmlListProperty< QQuickLabsPlatformMenuItem > *property) |
Properties | |
QQmlListProperty< QObject > | data |
\qmldefault \qmlproperty list<QtObject> Qt.labs.platform::Menu::data | |
QQmlListProperty< QQuickLabsPlatformMenuItem > | items |
\qmlproperty list<MenuItem> Qt.labs.platform::Menu::items | |
QQuickLabsPlatformMenuBar * | menuBar |
QQuickLabsPlatformMenu * | parentMenu |
QQuickLabsPlatformMenuItem * | menuItem |
bool | enabled |
bool | visible |
int | minimumWidth |
QPlatformMenu::MenuType | type |
QString | title |
QFont | font |
QQuickLabsPlatformIcon | icon |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 40 of file qquicklabsplatformmenu_p.h.
|
explicit |
A native menu.
\qmltype Menu \inherits QtObject
! \instantiates QQuickLabsPlatformMenu \inqmlmodule Qt.labs.platform
The Menu type provides a QML API for native platform menu popups.
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:
Definition at line 134 of file qquicklabsplatformmenu.cpp.
QQuickLabsPlatformMenu::~QQuickLabsPlatformMenu | ( | ) |
Definition at line 150 of file qquicklabsplatformmenu.cpp.
References removeMenu(), and QQuickLabsPlatformMenuBar::removeMenu().
|
signal |
|
signal |
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 537 of file qquicklabsplatformmenu.cpp.
References insertItem(), item, and QList< T >::size().
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 586 of file qquicklabsplatformmenu.cpp.
References insertMenu(), menu, and QList< T >::size().
|
overrideprotectedvirtual |
Invoked after class creation, but before any properties have been set.
Implements QQmlParserStatus.
Definition at line 713 of file qquicklabsplatformmenu.cpp.
void QQuickLabsPlatformMenu::clear | ( | ) |
\qmlmethod void Qt.labs.platform::Menu::clear()
Removes all items from the menu.
Definition at line 624 of file qquicklabsplatformmenu.cpp.
References QList< T >::clear(), emit, QList< T >::isEmpty(), item, itemsChanged(), QPlatformMenu::removeMenuItem(), QList< T >::removeOne(), and sync().
|
slot |
\qmlmethod void Qt.labs.platform::Menu::close()
Closes the menu.
Definition at line 707 of file qquicklabsplatformmenu.cpp.
References QPlatformMenu::dismiss().
|
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 717 of file qquicklabsplatformmenu.cpp.
References QQuickLabsPlatformIconLoader::setEnabled(), and sync().
QPlatformMenu * QQuickLabsPlatformMenu::create | ( | ) |
Definition at line 179 of file qquicklabsplatformmenu.cpp.
References QPlatformMenu::aboutToHide(), aboutToHide(), QPlatformMenu::aboutToShow(), aboutToShow(), QObject::connect(), QQuickLabsPlatformMenuItem::create(), QPlatformMenuBar::createMenu(), QPlatformSystemTrayIcon::createMenu(), QWidgetPlatform::createMenu(), QPlatformTheme::createPlatformMenu(), QPlatformMenu::createSubMenu(), handle(), QQuickLabsPlatformMenuBar::handle(), QQuickLabsPlatformSystemTrayIcon::handle(), QPlatformMenu::insertMenuItem(), item, QGuiApplicationPrivate::platformTheme(), and qCDebug.
Referenced by QQuickLabsPlatformSystemTrayIcon::init(), QQuickLabsPlatformSystemTrayIcon::setMenu(), and sync().
QQmlListProperty< QObject > QQuickLabsPlatformMenu::data | ( | ) |
|
staticprotected |
Definition at line 770 of file qquicklabsplatformmenu.cpp.
References QMenu::addMenu(), item, and menu.
|
staticprotected |
Definition at line 787 of file qquicklabsplatformmenu.cpp.
References menu.
|
staticprotected |
Definition at line 793 of file qquicklabsplatformmenu.cpp.
References QMenu::clear(), and menu.
|
staticprotected |
Definition at line 781 of file qquicklabsplatformmenu.cpp.
References menu, and QWidget::size.
void QQuickLabsPlatformMenu::destroy | ( | ) |
Definition at line 219 of file qquicklabsplatformmenu.cpp.
Referenced by setMenuBar(), and setParentMenu().
|
signal |
|
protected |
Definition at line 747 of file qquicklabsplatformmenu.cpp.
References effectiveWindow(), item, QObject::parent(), qobject_cast< QQuickItem * >(), qobject_cast< QWindow * >(), window(), QGraphicsItem::window(), and QQuickLabsPlatformMenuBar::window.
Referenced by open().
QFont QQuickLabsPlatformMenu::font | ( | ) | const |
\qmlproperty font Qt.labs.platform::Menu::font
This property holds the menu's font.
Definition at line 489 of file qquicklabsplatformmenu.cpp.
|
signal |
QPlatformMenu * QQuickLabsPlatformMenu::handle | ( | ) | const |
Definition at line 174 of file qquicklabsplatformmenu.cpp.
Referenced by create(), QQuickLabsPlatformMenuItem::create(), QQuickLabsPlatformSystemTrayIcon::init(), QQuickLabsPlatformMenuBar::insertMenu(), QQuickLabsPlatformSystemTrayIcon::setMenu(), and QQuickLabsPlatformMenuItem::sync().
QQuickLabsPlatformIcon QQuickLabsPlatformMenu::icon | ( | ) | const |
This property holds the menu item's icon.
Definition at line 512 of file qquicklabsplatformmenu.cpp.
References QQuickLabsPlatformIconLoader::icon(), and iconLoader().
|
protected |
Definition at line 725 of file qquicklabsplatformmenu.cpp.
References QQuickLabsPlatformIconLoader::setEnabled().
Referenced by icon(), and setIcon().
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 547 of file qquicklabsplatformmenu.cpp.
References QList< T >::append(), QListSpecialMethodsBase< T >::contains(), QQuickLabsPlatformMenuItem::create(), emit, QList< T >::insert(), QPlatformMenu::insertMenuItem(), item, itemsChanged(), sync(), and QList< T >::value().
Referenced by addItem(), and 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 596 of file qquicklabsplatformmenu.cpp.
References insertItem(), and menu.
Referenced by addMenu().
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 374 of file qquicklabsplatformmenu.cpp.
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 397 of file qquicklabsplatformmenu.cpp.
QQmlListProperty< QQuickLabsPlatformMenuItem > QQuickLabsPlatformMenu::items | ( | ) |
|
staticprotected |
Definition at line 799 of file qquicklabsplatformmenu.cpp.
|
staticprotected |
Definition at line 811 of file qquicklabsplatformmenu.cpp.
References menu.
|
staticprotected |
Definition at line 817 of file qquicklabsplatformmenu.cpp.
References QMenu::clear(), and menu.
|
staticprotected |
Definition at line 805 of file qquicklabsplatformmenu.cpp.
References menu, and QWidget::size.
|
signal |
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 287 of file qquicklabsplatformmenu.cpp.
|
signal |
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 354 of file qquicklabsplatformmenu.cpp.
References QQuickLabsPlatformMenuItem::componentComplete(), icon, QQuickLabsPlatformMenuItem::setEnabled(), QQuickLabsPlatformMenuItem::setIcon(), QQuickLabsPlatformMenuItem::setSubMenu(), QQuickLabsPlatformMenuItem::setText(), and QQuickLabsPlatformMenuItem::setVisible().
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 420 of file qquicklabsplatformmenu.cpp.
|
signal |
|
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 653 of file qquicklabsplatformmenu.cpp.
References args, QQuickItem::boundingRect(), findWindow(), QQuickLabsPlatformMenuItem::handle(), QList< T >::length(), QQuickItem::mapRectToScene(), menuItem, QRect::moveTo(), pos, QCursor::pos(), qobject_cast< QQuickItem * >(), QPlatformMenu::showPopup(), QRectF::toAlignedRect(), QHighDpi::toNativePixels(), QRect::translated(), and window().
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 309 of file qquicklabsplatformmenu.cpp.
|
signal |
|
signal |
void QQuickLabsPlatformMenu::removeItem | ( | QQuickLabsPlatformMenuItem * | item | ) |
\qmlmethod void Qt.labs.platform::Menu::removeItem(MenuItem item)
Removes an item from the menu.
Definition at line 568 of file qquicklabsplatformmenu.cpp.
References emit, item, itemsChanged(), QPlatformMenu::removeMenuItem(), QList< T >::removeOne(), and sync().
Referenced by QQuickLabsPlatformMenuItem::~QQuickLabsPlatformMenuItem(), and removeMenu().
void QQuickLabsPlatformMenu::removeMenu | ( | QQuickLabsPlatformMenu * | menu | ) |
\qmlmethod void Qt.labs.platform::Menu::removeMenu(Menu submenu)
Removes a submenu from the menu.
Definition at line 610 of file qquicklabsplatformmenu.cpp.
References menu, and removeItem().
Referenced by ~QQuickLabsPlatformMenu().
void QQuickLabsPlatformMenu::setEnabled | ( | bool | enabled | ) |
Definition at line 379 of file qquicklabsplatformmenu.cpp.
References emit, enabled, enabledChanged(), QQuickLabsPlatformMenuItem::setEnabled(), and sync().
Definition at line 494 of file qquicklabsplatformmenu.cpp.
References emit, font, fontChanged(), and sync().
void QQuickLabsPlatformMenu::setIcon | ( | const QQuickLabsPlatformIcon & | icon | ) |
Definition at line 520 of file qquicklabsplatformmenu.cpp.
References emit, icon, iconLoader(), QQuickLabsPlatformIconLoader::setIcon(), and QQuickLabsPlatformMenuItem::setIcon().
void QQuickLabsPlatformMenu::setMenuBar | ( | QQuickLabsPlatformMenuBar * | menuBar | ) |
Definition at line 292 of file qquicklabsplatformmenu.cpp.
References destroy(), emit, menuBar, and menuBarChanged().
void QQuickLabsPlatformMenu::setMinimumWidth | ( | int | width | ) |
Definition at line 425 of file qquicklabsplatformmenu.cpp.
References emit, minimumWidthChanged(), and sync().
void QQuickLabsPlatformMenu::setParentMenu | ( | QQuickLabsPlatformMenu * | menu | ) |
Definition at line 314 of file qquicklabsplatformmenu.cpp.
References destroy(), emit, menu, and parentMenuChanged().
Definition at line 469 of file qquicklabsplatformmenu.cpp.
References emit, QQuickLabsPlatformMenuItem::setText(), sync(), title, and titleChanged().
void QQuickLabsPlatformMenu::setType | ( | QPlatformMenu::MenuType | type | ) |
Definition at line 449 of file qquicklabsplatformmenu.cpp.
References emit, sync(), type, and typeChanged().
void QQuickLabsPlatformMenu::setVisible | ( | bool | visible | ) |
Definition at line 402 of file qquicklabsplatformmenu.cpp.
References emit, QQuickLabsPlatformMenuItem::setVisible(), sync(), visible, and visibleChanged().
void QQuickLabsPlatformMenu::sync | ( | ) |
Definition at line 232 of file qquicklabsplatformmenu.cpp.
References create(), QQuickLabsPlatformMenuBar::handle(), QQuickLabsPlatformSystemTrayIcon::handle(), item, QPlatformMenu::setEnabled(), QPlatformMenu::setFont(), QPlatformMenu::setMenuType(), QPlatformMenu::setMinimumWidth(), QPlatformMenu::setText(), QPlatformMenu::setVisible(), QPlatformMenuBar::syncMenu(), and QPlatformSystemTrayIcon::updateMenu().
Referenced by clear(), componentComplete(), insertItem(), removeItem(), setEnabled(), setFont(), setMinimumWidth(), setTitle(), setType(), setVisible(), and QQuickLabsPlatformMenuItem::sync().
|
signal |
QString QQuickLabsPlatformMenu::title | ( | ) | const |
\qmlproperty string Qt.labs.platform::Menu::title
This property holds the menu's title.
Definition at line 464 of file qquicklabsplatformmenu.cpp.
|
signal |
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 444 of file qquicklabsplatformmenu.cpp.
|
signal |
|
signal |
|
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.
Definition at line 180 of file qquicklabsplatformmenu_p.h.
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by setEnabled().
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by setFont().
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by menuItem(), and setIcon().
|
read |
\qmlproperty list<MenuItem> Qt.labs.platform::Menu::items
This property holds the list of items in the menu.
Definition at line 180 of file qquicklabsplatformmenu_p.h.
|
read |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by setMenuBar().
|
read |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by open().
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
|
read |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by setTitle().
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by setType().
|
readwrite |
Definition at line 180 of file qquicklabsplatformmenu_p.h.
Referenced by setVisible().