Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickMenuPrivate Class Reference

#include <qquickmenu_p_p.h>

+ Inheritance diagram for QQuickMenuPrivate:
+ Collaboration diagram for QQuickMenuPrivate:

Public Member Functions

 QQuickMenuPrivate ()
 
void init ()
 
QQuickItemitemAt (int index) const
 
void insertItem (int index, QQuickItem *item)
 
void moveItem (int from, int to)
 
void removeItem (int index, QQuickItem *item)
 
QQuickItembeginCreateItem ()
 
void completeCreateItem ()
 
QQuickItemcreateItem (QQuickMenu *menu)
 
QQuickItemcreateItem (QQuickAction *action)
 
void resizeItem (QQuickItem *item)
 
void resizeItems ()
 
void itemChildAdded (QQuickItem *item, QQuickItem *child) override
 
void itemSiblingOrderChanged (QQuickItem *item) override
 
void itemParentChanged (QQuickItem *item, QQuickItem *parent) override
 
void itemDestroyed (QQuickItem *item) override
 
void itemGeometryChanged (QQuickItem *, QQuickGeometryChange change, const QRectF &diff) override
 
QQuickPopupPositionergetPositioner () override
 
bool prepareEnterTransition () override
 
bool prepareExitTransition () override
 
bool blockInput (QQuickItem *item, const QPointF &point) const override
 
void onItemHovered ()
 
void onItemTriggered ()
 
void onItemActiveFocusChanged ()
 
QQuickMenucurrentSubMenu () const
 
void setParentMenu (QQuickMenu *parent)
 
void resolveParentItem ()
 
void propagateKeyEvent (QKeyEvent *event)
 
void startHoverTimer ()
 
void stopHoverTimer ()
 
void setCurrentIndex (int index, Qt::FocusReason reason)
 
bool activateNextItem ()
 
bool activatePreviousItem ()
 
QQuickMenuItemfirstEnabledMenuItem () const
 
QPalette defaultPalette () const override
 
- Public Member Functions inherited from QQuickPopupPrivate
 QQuickPopupPrivate ()
 
QQmlListProperty< QObjectcontentData ()
 \qmlproperty list<QtObject> QtQuick.Controls::Popup::contentData \qmldefault
 
QQmlListProperty< QQuickItemcontentChildren ()
 \qmlproperty list<Item> QtQuick.Controls::Popup::contentChildren
 
void init ()
 
void closeOrReject ()
 
bool tryClose (const QPointF &pos, QQuickPopup::ClosePolicy flags)
 
bool contains (const QPointF &scenePos) const
 
virtual bool handlePress (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual bool handleMove (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual bool handleRelease (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual void handleUngrab ()
 
bool handleMouseEvent (QQuickItem *item, QMouseEvent *event)
 
bool handleHoverEvent (QQuickItem *item, QHoverEvent *event)
 
void reposition ()
 
void createOverlay ()
 
void destroyDimmer ()
 
void toggleOverlay ()
 
void updateContentPalettes (const QPalette &parentPalette)
 
virtual void showDimmer ()
 
virtual void hideDimmer ()
 
virtual void resizeDimmer ()
 
virtual void finalizeEnterTransition ()
 
virtual void finalizeExitTransition ()
 
virtual void opened ()
 
QMarginsF getMargins () const
 
void setTopMargin (qreal value, bool reset=false)
 
void setLeftMargin (qreal value, bool reset=false)
 
void setRightMargin (qreal value, bool reset=false)
 
void setBottomMargin (qreal value, bool reset=false)
 
QQuickPopupAnchorsgetAnchors ()
 
void setWindow (QQuickWindow *window)
 
void itemDestroyed (QQuickItem *item) override
 
QPalette defaultPalette () const override
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 
- Public Member Functions inherited from QQuickItemChangeListener
virtual ~QQuickItemChangeListener ()
 
virtual void itemVisibilityChanged (QQuickItem *)
 
virtual void itemEnabledChanged (QQuickItem *)
 
virtual void itemOpacityChanged (QQuickItem *)
 
virtual void itemChildRemoved (QQuickItem *, QQuickItem *)
 
virtual void itemRotationChanged (QQuickItem *)
 
virtual void itemImplicitWidthChanged (QQuickItem *)
 
virtual void itemImplicitHeightChanged (QQuickItem *)
 
virtual void itemFocusChanged (QQuickItem *, Qt::FocusReason)
 
virtual QQuickAnchorsPrivateanchorPrivate ()
 
- Public Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >
virtual ~QQuickPaletteProviderPrivateBase ()=default
 
virtual QQuickPalettepalette () const
 
virtual void setPalette (QQuickPalette *p)
 
virtual void resetPalette ()
 
virtual bool providesPalette () const
 
QPalette parentPalette (const QPalette &fallbackPalette) const override
 
void inheritPalette (const QPalette &parentPalette)
 
virtual void updateChildrenPalettes (const QPalette &parentPalette)
 
- Public Member Functions inherited from QQuickAbstractPaletteProvider
virtual ~QQuickAbstractPaletteProvider ()=default
 

Static Public Member Functions

static QQuickMenuPrivateget (QQuickMenu *menu)
 
static void contentData_append (QQmlListProperty< QObject > *prop, QObject *obj)
 
static qsizetype contentData_count (QQmlListProperty< QObject > *prop)
 
static QObjectcontentData_at (QQmlListProperty< QObject > *prop, qsizetype index)
 
static void contentData_clear (QQmlListProperty< QObject > *prop)
 
- Static Public Member Functions inherited from QQuickPopupPrivate
static QQuickPopupPrivateget (QQuickPopup *popup)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

bool cascade = false
 
int hoverTimer = 0
 
int currentIndex = -1
 
qreal overlap = 0
 
QPointer< QQuickMenuparentMenu
 
QPointer< QQuickMenuItemcurrentItem
 
QQuickItemcontentItem = nullptr
 
QList< QObject * > contentData
 
QQmlObjectModelcontentModel
 
QQmlComponentdelegate = nullptr
 
QString title
 
QQuickIcon icon
 
- Public Attributes inherited from QQuickPopupPrivate
bool focus = false
 
bool modal = false
 
bool dim = false
 
bool hasDim = false
 
bool visible = false
 
bool complete = true
 
bool positioning = false
 
bool hasWidth = false
 
bool hasHeight = false
 
bool hasTopMargin = false
 
bool hasLeftMargin = false
 
bool hasRightMargin = false
 
bool hasBottomMargin = false
 
bool hasZ = false
 
bool allowVerticalFlip = false
 
bool allowHorizontalFlip = false
 
bool allowVerticalMove = true
 
bool allowHorizontalMove = true
 
bool allowVerticalResize = true
 
bool allowHorizontalResize = true
 
bool hadActiveFocusBeforeExitTransition = false
 
bool interactive = true
 
bool hasClosePolicy = false
 
bool outsidePressed = false
 
bool outsideParentPressed = false
 
bool inDestructor = false
 
bool relaxEdgeConstraint = false
 
int touchId = -1
 
qreal x = 0
 
qreal y = 0
 
qreal effectiveX = 0
 
qreal effectiveY = 0
 
qreal margins = -1
 
qreal topMargin = 0
 
qreal leftMargin = 0
 
qreal rightMargin = 0
 
qreal bottomMargin = 0
 
QPointF pressPoint
 
TransitionState transitionState = NoTransition
 
QQuickPopup::ClosePolicy closePolicy = DefaultClosePolicy
 
QQuickItemparentItem = nullptr
 
QQuickItemdimmer = nullptr
 
QPointer< QQuickWindowwindow
 
QQuickTransitionenter = nullptr
 
QQuickTransitionexit = nullptr
 
QQuickPopupItempopupItem = nullptr
 
QQuickPopupPositionerpositioner = nullptr
 
QList< QQuickStateActionenterActions
 
QList< QQuickStateActionexitActions
 
QQuickPopupTransitionManager transitionManager
 
QQuickPopupAnchorsanchors = nullptr
 
qreal explicitDimmerOpacity = 0
 
qreal prevOpacity = 0
 
qreal prevScale = 0
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QQuickPopupPrivate
enum  TransitionState { NoTransition , EnterTransition , ExitTransition }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 
- Static Public Attributes inherited from QQuickPopupPrivate
static const QQuickPopup::ClosePolicy DefaultClosePolicy = QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutside
 Base type of popup-like user interface controls.
 
- Protected Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >
void setCurrentColorGroup ()
 

Detailed Description

Definition at line 31 of file qquickmenu_p_p.h.

Constructor & Destructor Documentation

◆ QQuickMenuPrivate()

QQuickMenuPrivate::QQuickMenuPrivate ( )

Definition at line 222 of file qquickmenu.cpp.

References cascade, and shouldCascade().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateNextItem()

bool QQuickMenuPrivate::activateNextItem ( )

Definition at line 641 of file qquickmenu.cpp.

References contentModel, QQmlObjectModel::count(), currentIndex, QGraphicsItem::isEnabled(), item, itemAt(), setCurrentIndex(), and Qt::TabFocusReason.

+ Here is the call graph for this function:

◆ activatePreviousItem()

bool QQuickMenuPrivate::activatePreviousItem ( )

Definition at line 655 of file qquickmenu.cpp.

References Qt::BacktabFocusReason, currentIndex, QGraphicsItem::isEnabled(), item, itemAt(), and setCurrentIndex().

+ Here is the call graph for this function:

◆ beginCreateItem()

QQuickItem * QQuickMenuPrivate::beginCreateItem ( )

Definition at line 286 of file qquickmenu.cpp.

References QQmlComponent::beginCreate(), context, QQmlComponent::creationContext(), delegate, item, qmlContext(), qobject_cast< QQuickItem * >(), and QQml_setParent_noEvent().

Referenced by createItem(), and createItem().

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

◆ blockInput()

bool QQuickMenuPrivate::blockInput ( QQuickItem * item,
const QPointF & point ) const
overridevirtual

Reimplemented from QQuickPopupPrivate.

Definition at line 471 of file qquickmenu.cpp.

References QQuickPopupPrivate::blockInput(), cascade, QQuickPopupPrivate::contains(), item, and parentMenu.

+ Here is the call graph for this function:

◆ completeCreateItem()

void QQuickMenuPrivate::completeCreateItem ( )

Definition at line 306 of file qquickmenu.cpp.

References QQmlComponent::completeCreate(), and delegate.

Referenced by createItem(), and createItem().

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

◆ contentData_append()

void QQuickMenuPrivate::contentData_append ( QQmlListProperty< QObject > * prop,
QObject * obj )
static

Definition at line 684 of file qquickmenu.cpp.

References QQuickItemPrivate::get(), get(), item, menu, qobject_cast< QQuickItem * >(), QGraphicsItem::setParentItem(), and QQuickItemPrivate::SiblingOrder.

+ Here is the call graph for this function:

◆ contentData_at()

QObject * QQuickMenuPrivate::contentData_at ( QQmlListProperty< QObject > * prop,
qsizetype index )
static

Definition at line 715 of file qquickmenu.cpp.

References get().

+ Here is the call graph for this function:

◆ contentData_clear()

void QQuickMenuPrivate::contentData_clear ( QQmlListProperty< QObject > * prop)
static

Definition at line 726 of file qquickmenu.cpp.

References get().

+ Here is the call graph for this function:

◆ contentData_count()

qsizetype QQuickMenuPrivate::contentData_count ( QQmlListProperty< QObject > * prop)
static

Definition at line 709 of file qquickmenu.cpp.

References get().

+ Here is the call graph for this function:

◆ createItem() [1/2]

QQuickItem * QQuickMenuPrivate::createItem ( QQuickAction * action)

Definition at line 323 of file qquickmenu.cpp.

References beginCreateItem(), button, completeCreateItem(), and item.

+ Here is the call graph for this function:

◆ createItem() [2/2]

QQuickItem * QQuickMenuPrivate::createItem ( QQuickMenu * menu)

Definition at line 314 of file qquickmenu.cpp.

References beginCreateItem(), completeCreateItem(), QQuickMenuItemPrivate::get(), item, and menu.

+ Here is the call graph for this function:

◆ currentSubMenu()

QQuickMenu * QQuickMenuPrivate::currentSubMenu ( ) const

Definition at line 531 of file qquickmenu.cpp.

References currentItem, and QQuickMenuItem::subMenu.

Referenced by prepareExitTransition().

+ Here is the caller graph for this function:

◆ defaultPalette()

QPalette QQuickMenuPrivate::defaultPalette ( ) const
overridevirtual

Implements QQuickAbstractPaletteProvider.

Definition at line 721 of file qquickmenu.cpp.

References QQuickTheme::Menu, and QQuickTheme::palette().

+ Here is the call graph for this function:

◆ firstEnabledMenuItem()

QQuickMenuItem * QQuickMenuPrivate::firstEnabledMenuItem ( ) const

Definition at line 668 of file qquickmenu.cpp.

References contentModel, QQmlObjectModel::count(), i, QGraphicsItem::isEnabled(), item, and itemAt().

+ Here is the call graph for this function:

◆ get()

static QQuickMenuPrivate * QQuickMenuPrivate::get ( QQuickMenu * menu)
inlinestatic

Definition at line 38 of file qquickmenu_p_p.h.

References menu.

Referenced by contentData_append(), contentData_at(), contentData_clear(), contentData_count(), findParentMenuItem(), insertItem(), QQuickMenu::keyPressEvent(), QQuickShortcutContext::matcher(), onItemTriggered(), prepareExitTransition(), propagateKeyEvent(), removeItem(), and QQuickMenuPositioner::reposition().

+ Here is the caller graph for this function:

◆ getPositioner()

QQuickPopupPositioner * QQuickMenuPrivate::getPositioner ( )
overridevirtual

Reimplemented from QQuickPopupPrivate.

Definition at line 407 of file qquickmenu.cpp.

References QQuickPopupPrivate::positioner.

◆ init()

void QQuickMenuPrivate::init ( )

Definition at line 227 of file qquickmenu.cpp.

References contentModel.

◆ insertItem()

void QQuickMenuPrivate::insertItem ( int index,
QQuickItem * item )

Definition at line 238 of file qquickmenu.cpp.

References QQuickItem::activeFocusChanged(), QList< T >::append(), QQuickPopupPrivate::complete, QObjectPrivate::connect(), contentData, contentItem, contentModel, QQuickItemPrivate::Destroyed, QQuickItemPrivate::get(), get(), QQuickMenuItemPrivate::get(), QQuickControl::hoveredChanged(), item, onItemActiveFocusChanged(), onItemHovered(), onItemTriggered(), QQuickItemPrivate::Parent, resizeItem(), QGraphicsItem::setParentItem(), QQuickMenuItem::subMenu, QQuickMenuItem::triggered(), and QQuickGeometryChange::Width.

Referenced by itemChildAdded().

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

◆ itemAt()

QQuickItem * QQuickMenuPrivate::itemAt ( int index) const

Definition at line 233 of file qquickmenu.cpp.

References contentModel, and qobject_cast< QQuickItem * >().

Referenced by activateNextItem(), activatePreviousItem(), firstEnabledMenuItem(), resizeItems(), and setCurrentIndex().

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

◆ itemChildAdded()

void QQuickMenuPrivate::itemChildAdded ( QQuickItem * item,
QQuickItem * child )
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 353 of file qquickmenu.cpp.

References child, QListSpecialMethodsBase< T >::contains(), contentData, contentModel, QQmlObjectModel::count(), QQuickItemPrivate::get(), and insertItem().

+ Here is the call graph for this function:

◆ itemDestroyed()

void QQuickMenuPrivate::itemDestroyed ( QQuickItem * item)
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 383 of file qquickmenu.cpp.

References contentModel, QQmlObjectModel::indexOf(), item, QQuickPopupPrivate::itemDestroyed(), and removeItem().

+ Here is the call graph for this function:

◆ itemGeometryChanged()

void QQuickMenuPrivate::itemGeometryChanged ( QQuickItem * item,
QQuickGeometryChange change,
const QRectF & diff )
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 391 of file qquickmenu.cpp.

References QQuickPopupPrivate::complete, contentItem, item, resizeItem(), and resizeItems().

+ Here is the call graph for this function:

◆ itemParentChanged()

void QQuickMenuPrivate::itemParentChanged ( QQuickItem * item,
QQuickItem * parent )
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 360 of file qquickmenu.cpp.

References contentModel, QQmlObjectModel::indexOf(), item, QObjectData::parent, and removeItem().

+ Here is the call graph for this function:

◆ itemSiblingOrderChanged()

void QQuickMenuPrivate::itemSiblingOrderChanged ( QQuickItem * item)
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 367 of file qquickmenu.cpp.

References QQuickItem::childItems(), contentItem, contentModel, QQuickItemPrivate::get(), i, and QQmlObjectModel::indexOf().

+ Here is the call graph for this function:

◆ moveItem()

void QQuickMenuPrivate::moveItem ( int from,
int to )

Definition at line 261 of file qquickmenu.cpp.

References contentModel.

◆ onItemActiveFocusChanged()

void QQuickMenuPrivate::onItemActiveFocusChanged ( )

Definition at line 519 of file qquickmenu.cpp.

References contentModel, QQuickControl::focusReason, QQmlObjectModel::indexOf(), item, Qt::OtherFocusReason, qobject_cast< QQuickItem * >(), and setCurrentIndex().

Referenced by insertItem(), and removeItem().

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

◆ onItemHovered()

void QQuickMenuPrivate::onItemHovered ( )

Definition at line 477 of file qquickmenu.cpp.

References button, QQuickMenu::cascade, QQuickPopup::close(), contentModel, currentItem, QQuickAbstractButtonPrivate::get(), QQmlObjectModel::indexOf(), QWidget::isEnabled(), QQuickMenuItem::menu, Qt::OtherFocusReason, setCurrentIndex(), and startHoverTimer().

Referenced by insertItem(), and removeItem().

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

◆ onItemTriggered()

void QQuickMenuPrivate::onItemTriggered ( )

Definition at line 504 of file qquickmenu.cpp.

References get(), and item.

Referenced by insertItem(), and removeItem().

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

◆ prepareEnterTransition()

bool QQuickMenuPrivate::prepareEnterTransition ( )
overridevirtual

Reimplemented from QQuickPopupPrivate.

Definition at line 433 of file qquickmenu.cpp.

References QQuickPopupPrivate::allowHorizontalFlip, cascade, cascadingSubMenuClosePolicy, QQuickPopup::close(), QQuickPopupPrivate::closePolicy, QQuickPopupPrivate::hasClosePolicy, parentMenu, and QQuickPopupPrivate::prepareEnterTransition().

+ Here is the call graph for this function:

◆ prepareExitTransition()

bool QQuickMenuPrivate::prepareExitTransition ( )
overridevirtual

Reimplemented from QQuickPopupPrivate.

Definition at line 455 of file qquickmenu.cpp.

References QQuickPopup::close(), currentSubMenu(), get(), QQuickPopupPrivate::prepareExitTransition(), and stopHoverTimer().

+ Here is the call graph for this function:

◆ propagateKeyEvent()

void QQuickMenuPrivate::propagateKeyEvent ( QKeyEvent * event)

Definition at line 581 of file qquickmenu.cpp.

References get(), menu, menuBar, QQuickPopupPrivate::parentItem, and QCoreApplication::sendEvent().

+ Here is the call graph for this function:

◆ removeItem()

void QQuickMenuPrivate::removeItem ( int index,
QQuickItem * item )

Definition at line 266 of file qquickmenu.cpp.

References QQuickItem::activeFocusChanged(), contentData, contentModel, QQuickItemPrivate::Destroyed, QObjectPrivate::disconnect(), QQuickItemPrivate::Geometry, QQuickItemPrivate::get(), get(), QQuickMenuItemPrivate::get(), QQuickControl::hoveredChanged(), item, onItemActiveFocusChanged(), onItemHovered(), onItemTriggered(), QQuickItemPrivate::Parent, QList< T >::removeOne(), QGraphicsItem::setParentItem(), QQuickMenuItem::subMenu, and QQuickMenuItem::triggered().

Referenced by itemDestroyed(), and itemParentChanged().

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

◆ resizeItem()

void QQuickMenuPrivate::resizeItem ( QQuickItem * item)

Definition at line 332 of file qquickmenu.cpp.

References contentItem, QQuickItemPrivate::get(), item, and QQuickItem::width.

Referenced by insertItem(), itemGeometryChanged(), and resizeItems().

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

◆ resizeItems()

void QQuickMenuPrivate::resizeItems ( )

Definition at line 344 of file qquickmenu.cpp.

References contentModel, QQmlObjectModel::count(), i, itemAt(), and resizeItem().

Referenced by itemGeometryChanged().

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

◆ resolveParentItem()

void QQuickMenuPrivate::resolveParentItem ( )

Definition at line 570 of file qquickmenu.cpp.

References cascade, findParentMenuItem(), and parentMenu.

Referenced by setParentMenu().

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

◆ setCurrentIndex()

void QQuickMenuPrivate::setCurrentIndex ( int index,
Qt::FocusReason reason )

Definition at line 613 of file qquickmenu.cpp.

References contentItem, currentIndex, currentItem, emit, QQuickItemPrivate::get(), QQuickWindowPrivate::get(), itemAt(), Qt::OtherFocusReason, QQuickMenuItem::setHighlighted(), stopHoverTimer(), and QQuickPopupPrivate::window.

Referenced by activateNextItem(), activatePreviousItem(), onItemActiveFocusChanged(), and onItemHovered().

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

◆ setParentMenu()

void QQuickMenuPrivate::setParentMenu ( QQuickMenu * parent)

Definition at line 539 of file qquickmenu.cpp.

References QObject::connect(), QObjectPrivate::connect(), QPointer< T >::data(), disconnect(), QObject::disconnect(), QObjectData::parent, QQuickPopup::parentChanged(), parentMenu, resolveParentItem(), and QQuickMenu::setCascade().

+ Here is the call graph for this function:

◆ startHoverTimer()

void QQuickMenuPrivate::startHoverTimer ( )

Definition at line 596 of file qquickmenu.cpp.

References hoverTimer, stopHoverTimer(), and SUBMENU_DELAY.

Referenced by onItemHovered().

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

◆ stopHoverTimer()

void QQuickMenuPrivate::stopHoverTimer ( )

Definition at line 603 of file qquickmenu.cpp.

References hoverTimer.

Referenced by prepareExitTransition(), setCurrentIndex(), and startHoverTimer().

+ Here is the caller graph for this function:

Member Data Documentation

◆ cascade

bool QQuickMenuPrivate::cascade = false

◆ contentData

QList<QObject *> QQuickMenuPrivate::contentData

Definition at line 103 of file qquickmenu_p_p.h.

Referenced by insertItem(), itemChildAdded(), and removeItem().

◆ contentItem

QQuickItem* QQuickMenuPrivate::contentItem = nullptr

◆ contentModel

◆ currentIndex

int QQuickMenuPrivate::currentIndex = -1

Definition at line 98 of file qquickmenu_p_p.h.

Referenced by activateNextItem(), activatePreviousItem(), and setCurrentIndex().

◆ currentItem

QPointer<QQuickMenuItem> QQuickMenuPrivate::currentItem

Definition at line 101 of file qquickmenu_p_p.h.

Referenced by currentSubMenu(), onItemHovered(), and setCurrentIndex().

◆ delegate

QQmlComponent* QQuickMenuPrivate::delegate = nullptr

Definition at line 105 of file qquickmenu_p_p.h.

Referenced by beginCreateItem(), and completeCreateItem().

◆ hoverTimer

int QQuickMenuPrivate::hoverTimer = 0

Definition at line 97 of file qquickmenu_p_p.h.

Referenced by startHoverTimer(), and stopHoverTimer().

◆ icon

QQuickIcon QQuickMenuPrivate::icon

Definition at line 107 of file qquickmenu_p_p.h.

◆ overlap

qreal QQuickMenuPrivate::overlap = 0

Definition at line 99 of file qquickmenu_p_p.h.

◆ parentMenu

QPointer<QQuickMenu> QQuickMenuPrivate::parentMenu

◆ title

QString QQuickMenuPrivate::title

Definition at line 106 of file qquickmenu_p_p.h.


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