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

#include <qmenu_p.h>

Inheritance diagram for QMenuPrivate:
Collaboration diagram for QMenuPrivate:

Classes

struct  DelayState
struct  QMenuCaused
struct  QMenuScroller
class  ScrollerTearOffItem

Public Types

enum  SelectionReason { SelectedFromKeyboard , SelectedFromElsewhere }
enum class  SelectionDirection { Up , Down }
using PositionFunction = std::function<QPoint(const QSize &)>
Public Types inherited from QWidgetPrivate
enum  DrawWidgetFlag {
  DrawAsRoot = 0x01 , DrawPaintOnScreen = 0x02 , DrawRecursive = 0x04 , DrawInvisible = 0x08 ,
  DontSubtractOpaqueChildren = 0x10 , DontDrawOpaqueChildren = 0x20 , DontDrawNativeChildren = 0x40 , DontSetCompositionMode = 0x80 ,
  UseEffectRegionBounds = 0x100
}
enum  Direction { DirectionNorth = 0x01 , DirectionEast = 0x10 , DirectionSouth = 0x02 , DirectionWest = 0x20 }
enum class  WindowHandleMode { Direct , Closest , TopLevel }
enum  CloseMode { CloseNoEvent , CloseWithEvent , CloseWithSpontaneousEvent }
enum class  FocusDirection { Previous , Next }
enum class  FocusChainRemovalRule { EnsureFocusOut = 0x01 , AssertConsistency = 0x02 }
Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>

Public Member Functions

 QMenuPrivate ()
 ~QMenuPrivate ()
void init ()
QPlatformMenucreatePlatformMenu ()
void setPlatformMenu (QPlatformMenu *menu)
void syncPlatformMenu ()
void copyActionToPlatformItem (const QAction *action, QPlatformMenuItem *item)
QPlatformMenuIteminsertActionInPlatformMenu (const QAction *action, QPlatformMenuItem *beforeItem)
int scrollerHeight () const
bool isContextMenu () const
QRect actionRect (QAction *) const
void updateActionRects () const
void updateActionRects (const QRect &screen) const
QRect popupGeometry (QScreen *screen=nullptr) const
bool useFullScreenForPopup () const
int getLastVisibleAction () const
void popup (const QPoint &p, QAction *atAction, PositionFunction positionFunction={})
QActionexec (const QPoint &p, QAction *action, PositionFunction positionFunction={})
QWidgettopCausedWidget () const
QActionactionAt (QPoint p) const
void setFirstActionActive ()
void setCurrentAction (QAction *, int popup=-1, SelectionReason reason=SelectedFromElsewhere, SelectionDirection direction=SelectionDirection::Down, bool activateFirst=false)
void popupAction (QAction *, int, bool)
void setSyncAction ()
void scrollMenu (QMenuScroller::ScrollLocation location, bool active=false)
void scrollMenu (QMenuScroller::ScrollDirection direction, bool page=false, bool active=false)
void scrollMenu (QAction *action, QMenuScroller::ScrollLocation location, bool active=false)
bool mouseEventTaken (QMouseEvent *)
virtual QList< QPointer< QWidget > > calcCausedStack () const
void hideUpToMenuBar ()
void hideMenu (QMenu *menu)
QWindowtransientParentWindow () const
QActionactionAt (int i) const
int indexOf (QAction *act) const
void setOverrideMenuAction (QAction *)
void _q_overrideMenuActionDestroyed ()
void activateAction (QAction *, QAction::ActionEvent, bool self=true)
void activateCausedStack (const QList< QPointer< QWidget > > &, QAction *, QAction::ActionEvent, bool)
void _q_actionTriggered ()
void _q_actionHovered ()
void _q_platformMenuAboutToShow ()
bool hasMouseMoved (const QPoint &globalPos)
void updateLayoutDirection ()
void drawScroller (QPainter *painter, ScrollerTearOffItem::Type type, const QRect &rect)
void drawTearOff (QPainter *painter, const QRect &rect)
QRect rect () const
bool considerAction (const QAction *action) const
Public Member Functions inherited from QWidgetPrivate
 QWidgetPrivate (decltype(QObjectPrivateVersion)=QObjectPrivateVersion)
 ~QWidgetPrivate ()
QWExtraextraData () const
QTLWExtratopData () const
QTLWExtramaybeTopData () const
QPaintersharedPainter () const
void setSharedPainter (QPainter *painter)
QWidgetRepaintManagermaybeRepaintManager () const
QRhirhi () const
QWindowwindowHandle (WindowHandleMode mode=WindowHandleMode::Direct) const
QWindow_q_closestWindowHandle () const
QScreenassociatedScreen () const
template<typename T>
void repaint (T t)
template<typename T>
void update (T t)
void init (QWidget *desktopWidget, Qt::WindowFlags f)
void create ()
void createRecursively ()
void createWinId ()
bool setScreenForPoint (const QPoint &pos)
bool setScreen (QScreen *screen)
void createTLExtra ()
void createExtra ()
void deleteExtra ()
void createSysExtra ()
void deleteSysExtra ()
void createTLSysExtra ()
void deleteTLSysExtra ()
void updateSystemBackground ()
void propagatePaletteChange ()
void setPalette_helper (const QPalette &)
void resolvePalette ()
QPalette naturalWidgetPalette (QPalette::ResolveMask inheritedMask) const
void setMask_sys (const QRegion &)
void raise_sys ()
void lower_sys ()
void stackUnder_sys (QWidget *)
QWidgetdeepestFocusProxy () const
void setFocus_sys ()
void updateFocusChild ()
void updateFont (const QFont &)
void setFont_helper (const QFont &font)
QFont localFont () const
void resolveFont ()
QFont naturalWidgetFont (uint inheritedMask) const
void setLayoutDirection_helper (Qt::LayoutDirection)
void resolveLayoutDirection ()
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
void resolveLocale ()
void setStyle_helper (QStyle *newStyle, bool propagate)
void inheritStyle ()
void setUpdatesEnabled_helper (bool)
bool updateBrushOrigin (QPainter *, const QBrush &brush) const
void paintBackground (QPainter *, const QRegion &, DrawWidgetFlags flags=DrawAsRoot) const
bool isAboutToShow () const
 The graphicsEffect function returns a pointer to the widget's graphics effect.
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, DrawWidgetFlags flags, QPainter *sharedPainter=nullptr, QWidgetRepaintManager *repaintManager=nullptr)
void sendPaintEvent (const QRegion &toBePainted)
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, DrawWidgetFlags flags, QPainter *sharedPainter, QWidgetRepaintManager *repaintManager)
bool shouldPaintOnScreen () const
void paintOnScreen (const QRegion &rgn)
QRect clipRect () const
QRegion clipRegion () const
void setSystemClip (QPaintEngine *paintEngine, qreal devicePixelRatio, const QRegion &region)
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=nullptr, bool alsoNonOpaque=false) const
void clipToEffectiveMask (QRegion &region) const
void updateIsOpaque ()
void setOpaque (bool opaque)
void updateIsTranslucent ()
const QRegiongetOpaqueChildren () const
void setDirtyOpaqueRegion ()
bool close ()
bool handleClose (CloseMode mode)
void setWindowIcon_helper ()
void setWindowIcon_sys ()
void setWindowOpacity_sys (qreal opacity)
void adjustQuitOnCloseAttribute ()
void scrollChildren (int dx, int dy)
void moveRect (const QRect &, int dx, int dy)
void scrollRect (const QRect &, int dx, int dy)
void invalidateBackingStore_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the backing store when the widget is resized.
template<class T>
void invalidateBackingStore (const T &)
QRegion overlappedRegion (const QRect &rect, bool breakAfterFirst=false) const
bool isOverlapped (const QRect &rect) const
void syncBackingStore ()
void syncBackingStore (const QRegion &region)
bool shouldDiscardSyncRequest () const
void updateWidgetTransform (QEvent *event)
void reparentFocusWidgets (QWidget *oldtlw)
void setWinId (WId)
void showChildren (bool spontaneous)
void hideChildren (bool spontaneous)
void setParent_sys (QWidget *parent, Qt::WindowFlags)
void reparentWidgetWindows (QWidget *parentWithWindow, Qt::WindowFlags windowFlags={})
void reparentWidgetWindowChildren (QWidget *parentWithWindow)
void scroll_sys (int dx, int dy)
void scroll_sys (int dx, int dy, const QRect &r)
void deactivateWidgetCleanup ()
void setGeometry_sys (int, int, int, int, bool)
void fixPosIncludesFrame ()
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
void activateChildLayoutsRecursively ()
void show_recursive ()
void show_helper ()
void show_sys ()
void hide_sys ()
void hide_helper ()
bool isExplicitlyHidden () const
void _q_showIfNotHidden ()
virtual void setVisible (bool)
void setEnabled_helper (bool)
void updateFrameStrut ()
QRect frameStrut () const
void setWindowIconText_sys (const QString &cap)
void setWindowIconText_helper (const QString &cap)
void setWindowTitle_sys (const QString &cap)
void setWindowFilePath_sys (const QString &filePath)
void setCursor_sys (const QCursor &cursor)
void unsetCursor_sys ()
void setWindowTitle_helper (const QString &cap)
void setWindowFilePath_helper (const QString &filePath)
void setWindowModified_helper ()
virtual void setWindowFlags (Qt::WindowFlags windowFlags)
bool setMinimumSize_helper (int &minw, int &minh)
bool setMaximumSize_helper (int &maxw, int &maxh)
void setConstraints_sys ()
bool pointInsideRectAndMask (const QPointF &) const
QWidgetchildAt_helper (const QPointF &, bool) const
QWidgetchildAtRecursiveHelper (const QPointF &p, bool) const
void updateGeometry_helper (bool forceUpdate)
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
void setLayoutItemMargins (int left, int top, int right, int bottom)
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=nullptr)
void updateContentsRect ()
QMargins safeAreaMargins () const
virtual void aboutToDestroy ()
QWidgeteffectiveFocusWidget ()
void setModal_sys ()
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
QPaintDeviceredirected (QPoint *offset) const
void restoreRedirected ()
void enforceNativeChildren ()
bool nativeChildrenForced () const
QRect effectiveRectFor (const QRegion &region) const
QRect effectiveRectFor (const QRect &rect) const
QSize adjustedSize () const
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
void handleSoftwareInputPanel (bool clickCausedFocus=false)
void setWSGeometry ()
QPoint mapToWS (const QPoint &p) const
QPoint mapFromWS (const QPoint &p) const
QRect mapToWS (const QRect &r) const
QRect mapFromWS (const QRect &r) const
virtual QObjectfocusObject ()
virtual QPlatformBackingStoreRhiConfig rhiConfig () const
virtual TextureData texture () const
virtual QPlatformTextureList::Flags textureListFlags ()
virtual QImage grabFramebuffer ()
virtual void beginBackingStorePainting ()
virtual void endBackingStorePainting ()
virtual void beginCompose ()
virtual void endCompose ()
void setRenderToTexture ()
void setTextureChildSeen ()
virtual void initializeViewportFramebuffer ()
virtual void resizeViewportFramebuffer ()
virtual void resolveSamples ()
virtual bool isStereoEnabled ()
virtual bool toggleStereoTargetBuffer ()
std::string flagsForDumping () const override
QWidgetclosestParentWidgetWithWindowHandle () const
QWidgetnextPrevElementInFocusChain (FocusDirection direction) const
bool removeFromFocusChain (FocusChainRemovalRules rules=FocusChainRemovalRules(), FocusDirection direction=FocusDirection::Next)
bool insertIntoFocusChain (FocusDirection direction, QWidget *position)
bool insertIntoFocusChainBefore (QWidget *position)
bool insertIntoFocusChainAfter (QWidget *position)
void reparentFocusChildren (FocusDirection direction)
QWidgetdetermineLastFocusChild (QWidget *noFurtherThan)
void initFocusChain ()
bool isInFocusChain () const
bool isFocusChainConsistent () const
void setNetWmWindowTypes (bool skipIfMissing=false)
bool stealKeyboardGrab (bool grab)
bool stealMouseGrab (bool grab)
bool hasChildWithFocusPolicy (Qt::FocusPolicy policy, const QWidget *excludeChildrenOf=nullptr) const
Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
void setObjectNameWithoutBindings (const QString &name)
 QObjectPrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
virtual ~QObjectPrivate ()
void deleteChildren ()
void clearBindingStorage ()
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 void writeToDebugStream (QDebug &) const
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
Public Member Functions inherited from QObjectData
 QObjectData ()=default
virtual ~QObjectData ()=0
const QMetaObjectdynamicMetaObject () const

Static Public Member Functions

static QMenuPrivateget (QMenu *m)
Static Public Member Functions inherited from QWidgetPrivate
static QWidgetPrivateget (QWidget *w)
static const QWidgetPrivateget (const QWidget *w)
static void checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight)
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr)
static QWidgetparentGraphicsView (const QWidget *widget)
static QRect screenGeometry (const QWidget *widget)
static QRect availableScreenGeometry (const QWidget *widget)
static QScreenscreen (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true)
static QRect screenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true)
static QRect availableScreenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true)
static void sendComposeStatus (QWidget *w, bool end)
static void setWidgetParentHelper (QObject *widgetAsObject, QObject *newParent)
static bool insertIntoFocusChain (const QWidgetList &toBeInserted, FocusDirection direction, QWidget *position)
static QWidgetList takeFromFocusChain (QWidget *from, QWidget *to, FocusDirection direction=FocusDirection::Next)
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

QList< QRectactionRects
QHash< QAction *, QWidget * > widgetItems
QPointF mousePopupPos
QActioncurrentAction = nullptr
struct QMenuPrivate::DelayState delayState
struct QMenuPrivate::QMenuScrollerscroll = nullptr
QEventLoopeventLoop = nullptr
QPointer< QActionsyncAction
QString searchBuffer
QBasicTimer searchBufferTimer
QPointer< QMenuactiveMenu
QMenuCaused causedPopup
QPointer< QTornOffMenutornPopup
QMenuSloppyState sloppyState
QPointer< QActiondefaultAction
QActionmenuAction = nullptr
QActiondefaultMenuAction = nullptr
QPointer< QPlatformMenuplatformMenu
QPointer< QActionactionAboutToTrigger
QPointer< QWidgetnoReplayFor
ScrollerTearOffItemscrollUpTearOffItem = nullptr
ScrollerTearOffItemscrollDownItem = nullptr
uint maxIconWidth = 0
uint tabWidth = 0
int motions = 0
int mousePopupDelay = 0
bool activationRecursionGuard = false
quint8 ncols = 0
QPointer< QScreenpopupScreen
bool itemsDirty: 1
bool hasCheckableItems: 1
bool lastContextMenu: 1
bool collapsibleSeparators: 1
bool toolTipsVisible: 1
bool delayedPopupGuard: 1
bool hasReceievedEnter: 1
bool hasHadMouse: 1
bool aboutToHide: 1
bool tearoff: 1
bool tornoff: 1
bool tearoffHighlighted: 1
bool doChildEffects: 1
Public Attributes inherited from QWidgetPrivate
std::unique_ptr< QWExtraextra
QWidgetfocus_next
QWidgetfocus_prev
QWidgetfocus_child
QLayoutlayout
QRegionneedsFlush
QPaintDeviceredirectDev
QWidgetItemV2widgetItem
QPaintEngineextraPaintEngine
const QMetaObjectpolished
QGraphicsEffectgraphicsEffect
Qt::InputMethodHints imHints
QRegion opaqueChildren
QRegion dirty
uint directFontResolveMask
uint inheritedFontResolveMask
decltype(std::declval< QPalette >().resolveMask()) directPaletteResolveMask
QPalette::ResolveMask inheritedPaletteResolveMask
short leftmargin
short topmargin
short rightmargin
short bottommargin
signed char leftLayoutItemMargin
signed char topLayoutItemMargin
signed char rightLayoutItemMargin
signed char bottomLayoutItemMargin
Qt::HANDLE hd
QWidgetData data
QSizePolicy size_policy
QLocale locale
QPoint redirectOffset
QList< QAction * > actions
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
uint high_attributes [4]
QPalette::ColorRole fg_role: 8
QPalette::ColorRole bg_role: 8
uint dirtyOpaqueChildren: 1
uint isOpaque: 1
uint retainSizeWhenHiddenChanged: 1
uint inDirtyList: 1
uint isScrolled: 1
uint isMoved: 1
uint usesDoubleBufferedGLContext: 1
uint mustHaveWindowHandle: 1
uint renderToTexture: 1
uint textureChildSeen: 1
uint inheritsInputMethodHints: 1
uint renderToTextureReallyDirty: 1
uint usesRhiFlush: 1
uint childrenHiddenByWState: 1
uint childrenShownByExpose: 1
uint dontSetExplicitShowHide: 1
uint inheritStyleRecursionGuard: 1
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

Static Public Attributes

static QMenumouseDown = nullptr
Static Public Attributes inherited from QWidgetPrivate
static QWidgetMappermapper = nullptr
static QWidgetSetallWidgets = nullptr
static int instanceCounter = 0
static int maxInstances = 0

Detailed Description

Definition at line 272 of file qmenu_p.h.

Member Typedef Documentation

◆ PositionFunction

using QMenuPrivate::PositionFunction = std::function<QPoint(const QSize &)>

Definition at line 276 of file qmenu_p.h.

Member Enumeration Documentation

◆ SelectionDirection

Enumerator
Up 
Down 

Definition at line 367 of file qmenu_p.h.

◆ SelectionReason

Enumerator
SelectedFromKeyboard 
SelectedFromElsewhere 

Definition at line 363 of file qmenu_p.h.

Constructor & Destructor Documentation

◆ QMenuPrivate()

◆ ~QMenuPrivate()

QMenuPrivate::~QMenuPrivate ( )
inline

Definition at line 294 of file qmenu_p.h.

Member Function Documentation

◆ _q_actionHovered()

void QMenuPrivate::_q_actionHovered ( )

Definition at line 1543 of file qmenu.cpp.

◆ _q_actionTriggered()

void QMenuPrivate::_q_actionTriggered ( )

Definition at line 1511 of file qmenu.cpp.

References activationRecursionGuard, and hideUpToMenuBar().

Here is the call graph for this function:

◆ _q_overrideMenuActionDestroyed()

void QMenuPrivate::_q_overrideMenuActionDestroyed ( )

Definition at line 939 of file qmenu.cpp.

References defaultMenuAction, and menuAction.

◆ _q_platformMenuAboutToShow()

void QMenuPrivate::_q_platformMenuAboutToShow ( )

Definition at line 1551 of file qmenu.cpp.

◆ actionAt() [1/2]

QAction * QMenuPrivate::actionAt ( int i) const
inline

Definition at line 420 of file qmenu_p.h.

◆ actionAt() [2/2]

QAction * QMenuPrivate::actionAt ( QPoint p) const

Definition at line 915 of file qmenu.cpp.

◆ actionRect()

QRect QMenuPrivate::actionRect ( QAction * act) const

Definition at line 504 of file qmenu.cpp.

References updateActionRects().

Here is the call graph for this function:

◆ activateAction()

void QMenuPrivate::activateAction ( QAction * action,
QAction::ActionEvent action_e,
bool self = true )

Definition at line 1442 of file qmenu.cpp.

References hideUpToMenuBar().

Here is the call graph for this function:

◆ activateCausedStack()

void QMenuPrivate::activateCausedStack ( const QList< QPointer< QWidget > > & causedStack,
QAction * action,
QAction::ActionEvent action_e,
bool self )

Definition at line 1401 of file qmenu.cpp.

References activationRecursionGuard.

◆ calcCausedStack()

QList< QPointer< QWidget > > QMenuPrivate::calcCausedStack ( ) const
virtual

Definition at line 307 of file qmenu.cpp.

◆ considerAction()

bool QMenuPrivate::considerAction ( const QAction * action) const
inline

Definition at line 475 of file qmenu_p.h.

◆ copyActionToPlatformItem()

void QMenuPrivate::copyActionToPlatformItem ( const QAction * action,
QPlatformMenuItem * item )

Definition at line 226 of file qmenu.cpp.

◆ createPlatformMenu()

QPlatformMenu * QMenuPrivate::createPlatformMenu ( )

Definition at line 181 of file qmenu.cpp.

◆ drawScroller()

void QMenuPrivate::drawScroller ( QPainter * painter,
ScrollerTearOffItem::Type type,
const QRect & rect )

◆ drawTearOff()

void QMenuPrivate::drawTearOff ( QPainter * painter,
const QRect & rect )

Definition at line 986 of file qmenu.cpp.

References tearoff.

◆ exec()

QAction * QMenuPrivate::exec ( const QPoint & p,
QAction * action,
PositionFunction positionFunction = {} )

Definition at line 2660 of file qmenu.cpp.

References eventLoop.

◆ get()

QMenuPrivate * QMenuPrivate::get ( QMenu * m)
inlinestatic

Definition at line 311 of file qmenu_p.h.

◆ getLastVisibleAction()

int QMenuPrivate::getLastVisibleAction ( ) const

Definition at line 487 of file qmenu.cpp.

References collapsibleSeparators.

Referenced by updateActionRects().

Here is the caller graph for this function:

◆ hasMouseMoved()

bool QMenuPrivate::hasMouseMoved ( const QPoint & globalPos)

Definition at line 1572 of file qmenu.cpp.

◆ hideMenu()

void QMenuPrivate::hideMenu ( QMenu * menu)

Definition at line 544 of file qmenu.cpp.

◆ hideUpToMenuBar()

void QMenuPrivate::hideUpToMenuBar ( )

Definition at line 516 of file qmenu.cpp.

References tornoff.

Referenced by _q_actionTriggered(), activateAction(), and mouseEventTaken().

Here is the caller graph for this function:

◆ indexOf()

int QMenuPrivate::indexOf ( QAction * act) const
inline

Definition at line 421 of file qmenu_p.h.

◆ init()

void QMenuPrivate::init ( )

Definition at line 156 of file qmenu.cpp.

References QMenuPrivate::QMenuScroller::ScrollNone.

◆ insertActionInPlatformMenu()

QPlatformMenuItem * QMenuPrivate::insertActionInPlatformMenu ( const QAction * action,
QPlatformMenuItem * beforeItem )

Definition at line 263 of file qmenu.cpp.

◆ isContextMenu()

bool QMenuPrivate::isContextMenu ( ) const

Definition at line 322 of file qmenu.cpp.

Referenced by popup().

Here is the caller graph for this function:

◆ mouseEventTaken()

bool QMenuPrivate::mouseEventTaken ( QMouseEvent * e)

Definition at line 1312 of file qmenu.cpp.

References hideUpToMenuBar(), QMenuPrivate::QMenuScroller::ScrollDown, scrollerHeight(), QMenuPrivate::QMenuScroller::ScrollUp, tearoff, and tearoffHighlighted.

Here is the call graph for this function:

◆ popup()

void QMenuPrivate::popup ( const QPoint & p,
QAction * atAction,
PositionFunction positionFunction = {} )

Definition at line 2306 of file qmenu.cpp.

References doChildEffects, eventLoop, isContextMenu(), itemsDirty, lastContextMenu, motions, QMenuPrivate::QMenuScroller::ScrollDown, QMenuPrivate::QMenuScroller::ScrollNone, QMenuPrivate::QMenuScroller::scrollOffset, QMenuPrivate::QMenuScroller::ScrollUp, tearoffHighlighted, updateActionRects(), and updateLayoutDirection().

Here is the call graph for this function:

◆ popupAction()

void QMenuPrivate::popupAction ( QAction * action,
int delay,
bool activateFirst )

Definition at line 646 of file qmenu.cpp.

◆ popupGeometry()

QRect QMenuPrivate::popupGeometry ( QScreen * screen = nullptr) const

Definition at line 290 of file qmenu.cpp.

◆ rect()

QRect QMenuPrivate::rect ( ) const

Definition at line 1010 of file qmenu.cpp.

◆ scrollerHeight()

int QMenuPrivate::scrollerHeight ( ) const

Definition at line 277 of file qmenu.cpp.

Referenced by mouseEventTaken(), QMenuPrivate::ScrollerTearOffItem::paintEvent(), scrollMenu(), scrollMenu(), and setFirstActionActive().

Here is the caller graph for this function:

◆ scrollMenu() [1/3]

void QMenuPrivate::scrollMenu ( QAction * action,
QMenuScroller::ScrollLocation location,
bool active = false )

Definition at line 1118 of file qmenu.cpp.

References itemsDirty, QMenuPrivate::QMenuScroller::ScrollDown, scrollerHeight(), QMenuPrivate::QMenuScroller::ScrollNone, QMenuPrivate::QMenuScroller::scrollOffset, QMenuPrivate::QMenuScroller::ScrollTop, QMenuPrivate::QMenuScroller::ScrollUp, and updateActionRects().

Here is the call graph for this function:

◆ scrollMenu() [2/3]

void QMenuPrivate::scrollMenu ( QMenuScroller::ScrollDirection direction,
bool page = false,
bool active = false )

Definition at line 1265 of file qmenu.cpp.

References QMenuPrivate::QMenuScroller::ScrollDown, scrollerHeight(), QMenuPrivate::QMenuScroller::scrollOffset, QMenuPrivate::QMenuScroller::ScrollUp, and updateActionRects().

Here is the call graph for this function:

◆ scrollMenu() [3/3]

void QMenuPrivate::scrollMenu ( QMenuScroller::ScrollLocation location,
bool active = false )

Definition at line 1232 of file qmenu.cpp.

References Down, QMenuPrivate::QMenuScroller::ScrollBottom, QMenuPrivate::QMenuScroller::ScrollDown, QMenuPrivate::QMenuScroller::ScrollTop, QMenuPrivate::QMenuScroller::ScrollUp, SelectedFromKeyboard, Up, and updateActionRects().

Here is the call graph for this function:

◆ setCurrentAction()

void QMenuPrivate::setCurrentAction ( QAction * action,
int popup = -1,
SelectionReason reason = SelectedFromElsewhere,
SelectionDirection direction = SelectionDirection::Down,
bool activateFirst = false )

Definition at line 704 of file qmenu.cpp.

References currentAction, SelectedFromKeyboard, and tearoffHighlighted.

◆ setFirstActionActive()

void QMenuPrivate::setFirstActionActive ( )

Definition at line 683 of file qmenu.cpp.

References scrollerHeight(), QMenuPrivate::QMenuScroller::scrollOffset, QMenuPrivate::QMenuScroller::ScrollUp, and updateActionRects().

Here is the call graph for this function:

◆ setOverrideMenuAction()

void QMenuPrivate::setOverrideMenuAction ( QAction * a)

Definition at line 927 of file qmenu.cpp.

References defaultMenuAction, and menuAction.

◆ setPlatformMenu()

void QMenuPrivate::setPlatformMenu ( QPlatformMenu * menu)

Definition at line 189 of file qmenu.cpp.

◆ setSyncAction()

void QMenuPrivate::setSyncAction ( )

Definition at line 665 of file qmenu.cpp.

References currentAction.

◆ syncPlatformMenu()

void QMenuPrivate::syncPlatformMenu ( )

Definition at line 202 of file qmenu.cpp.

◆ topCausedWidget()

QWidget * QMenuPrivate::topCausedWidget ( ) const

Definition at line 907 of file qmenu.cpp.

◆ transientParentWindow()

QWindow * QMenuPrivate::transientParentWindow ( ) const

Definition at line 623 of file qmenu.cpp.

◆ updateActionRects() [1/2]

void QMenuPrivate::updateActionRects ( ) const

Definition at line 331 of file qmenu.cpp.

Referenced by actionRect(), popup(), scrollMenu(), scrollMenu(), scrollMenu(), and setFirstActionActive().

Here is the caller graph for this function:

◆ updateActionRects() [2/2]

void QMenuPrivate::updateActionRects ( const QRect & screen) const

Definition at line 336 of file qmenu.cpp.

References collapsibleSeparators, getLastVisibleAction(), hasCheckableItems, itemsDirty, maxIconWidth, tabWidth, and tornoff.

Here is the call graph for this function:

◆ updateLayoutDirection()

void QMenuPrivate::updateLayoutDirection ( )

Definition at line 944 of file qmenu.cpp.

Referenced by popup().

Here is the caller graph for this function:

◆ useFullScreenForPopup()

bool QMenuPrivate::useFullScreenForPopup ( ) const
inline

Definition at line 285 of file qmenu.cpp.

Member Data Documentation

◆ aboutToHide

bool QMenuPrivate::aboutToHide

Definition at line 508 of file qmenu_p.h.

Referenced by QMenuPrivate().

◆ actionAboutToTrigger

QPointer<QAction> QMenuPrivate::actionAboutToTrigger

Definition at line 452 of file qmenu_p.h.

◆ actionRects

QList<QRect> QMenuPrivate::actionRects
mutable

Definition at line 319 of file qmenu_p.h.

◆ activationRecursionGuard

bool QMenuPrivate::activationRecursionGuard = false

Definition at line 490 of file qmenu_p.h.

Referenced by _q_actionTriggered(), and activateCausedStack().

◆ activeMenu

QPointer<QMenu> QMenuPrivate::activeMenu

Definition at line 405 of file qmenu_p.h.

◆ causedPopup

QMenuCaused QMenuPrivate::causedPopup

Definition at line 414 of file qmenu_p.h.

◆ collapsibleSeparators

bool QMenuPrivate::collapsibleSeparators

Definition at line 502 of file qmenu_p.h.

Referenced by QMenuPrivate(), getLastVisibleAction(), and updateActionRects().

◆ currentAction

QAction* QMenuPrivate::currentAction = nullptr

Definition at line 333 of file qmenu_p.h.

Referenced by setCurrentAction(), setSyncAction(), and QMenuSloppyState::timeout().

◆ defaultAction

QPointer<QAction> QMenuPrivate::defaultAction

Definition at line 429 of file qmenu_p.h.

◆ defaultMenuAction

QAction* QMenuPrivate::defaultMenuAction = nullptr

Definition at line 432 of file qmenu_p.h.

Referenced by _q_overrideMenuActionDestroyed(), and setOverrideMenuAction().

◆ delayedPopupGuard

bool QMenuPrivate::delayedPopupGuard

Definition at line 504 of file qmenu_p.h.

Referenced by QMenuPrivate().

◆ delayState

struct QMenuPrivate::DelayState QMenuPrivate::delayState

◆ doChildEffects

bool QMenuPrivate::doChildEffects

Definition at line 514 of file qmenu_p.h.

Referenced by QMenuPrivate(), and popup().

◆ eventLoop

QEventLoop* QMenuPrivate::eventLoop = nullptr

Definition at line 397 of file qmenu_p.h.

Referenced by exec(), and popup().

◆ hasCheckableItems

bool QMenuPrivate::hasCheckableItems
mutable

Definition at line 500 of file qmenu_p.h.

Referenced by QMenuPrivate(), and updateActionRects().

◆ hasHadMouse

bool QMenuPrivate::hasHadMouse

Definition at line 507 of file qmenu_p.h.

Referenced by QMenuPrivate().

◆ hasReceievedEnter

bool QMenuPrivate::hasReceievedEnter

Definition at line 505 of file qmenu_p.h.

Referenced by QMenuPrivate(), and QMenuSloppyState::timeout().

◆ itemsDirty

bool QMenuPrivate::itemsDirty
mutable

Definition at line 499 of file qmenu_p.h.

Referenced by QMenuPrivate(), popup(), scrollMenu(), and updateActionRects().

◆ lastContextMenu

bool QMenuPrivate::lastContextMenu

Definition at line 501 of file qmenu_p.h.

Referenced by QMenuPrivate(), and popup().

◆ maxIconWidth

uint QMenuPrivate::maxIconWidth = 0
mutable

Definition at line 485 of file qmenu_p.h.

Referenced by updateActionRects().

◆ menuAction

QAction* QMenuPrivate::menuAction = nullptr

Definition at line 431 of file qmenu_p.h.

Referenced by _q_overrideMenuActionDestroyed(), and setOverrideMenuAction().

◆ motions

int QMenuPrivate::motions = 0

Definition at line 487 of file qmenu_p.h.

Referenced by popup().

◆ mouseDown

QT_BEGIN_NAMESPACE QMenu * QMenuPrivate::mouseDown = nullptr
static

Definition at line 330 of file qmenu_p.h.

◆ mousePopupDelay

int QMenuPrivate::mousePopupDelay = 0

Definition at line 488 of file qmenu_p.h.

◆ mousePopupPos

QPointF QMenuPrivate::mousePopupPos

Definition at line 331 of file qmenu_p.h.

◆ ncols

quint8 QMenuPrivate::ncols = 0
mutable

Definition at line 492 of file qmenu_p.h.

◆ noReplayFor

QPointer<QWidget> QMenuPrivate::noReplayFor

Definition at line 454 of file qmenu_p.h.

◆ platformMenu

QPointer<QPlatformMenu> QMenuPrivate::platformMenu

Definition at line 450 of file qmenu_p.h.

◆ popupScreen

QPointer<QScreen> QMenuPrivate::popupScreen

Definition at line 497 of file qmenu_p.h.

◆ scroll

struct QMenuPrivate::QMenuScroller * QMenuPrivate::scroll = nullptr

◆ scrollDownItem

ScrollerTearOffItem* QMenuPrivate::scrollDownItem = nullptr

Definition at line 469 of file qmenu_p.h.

◆ scrollUpTearOffItem

ScrollerTearOffItem* QMenuPrivate::scrollUpTearOffItem = nullptr

Definition at line 468 of file qmenu_p.h.

◆ searchBuffer

QString QMenuPrivate::searchBuffer

Definition at line 401 of file qmenu_p.h.

◆ searchBufferTimer

QBasicTimer QMenuPrivate::searchBufferTimer

Definition at line 402 of file qmenu_p.h.

◆ sloppyState

QMenuSloppyState QMenuPrivate::sloppyState

Definition at line 426 of file qmenu_p.h.

◆ syncAction

QPointer<QAction> QMenuPrivate::syncAction

Definition at line 398 of file qmenu_p.h.

◆ tabWidth

uint QMenuPrivate::tabWidth = 0
mutable

Definition at line 486 of file qmenu_p.h.

Referenced by updateActionRects().

◆ tearoff

bool QMenuPrivate::tearoff

Definition at line 510 of file qmenu_p.h.

Referenced by QMenuPrivate(), drawTearOff(), and mouseEventTaken().

◆ tearoffHighlighted

bool QMenuPrivate::tearoffHighlighted

Definition at line 512 of file qmenu_p.h.

Referenced by QMenuPrivate(), mouseEventTaken(), popup(), and setCurrentAction().

◆ toolTipsVisible

bool QMenuPrivate::toolTipsVisible

Definition at line 503 of file qmenu_p.h.

Referenced by QMenuPrivate().

◆ tornoff

bool QMenuPrivate::tornoff

Definition at line 511 of file qmenu_p.h.

Referenced by QMenuPrivate(), hideUpToMenuBar(), and updateActionRects().

◆ tornPopup

QPointer<QTornOffMenu> QMenuPrivate::tornPopup

Definition at line 424 of file qmenu_p.h.

◆ widgetItems

QHash<QAction *, QWidget *> QMenuPrivate::widgetItems
mutable

Definition at line 320 of file qmenu_p.h.


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