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

#include <qmenubar_p.h>

+ Inheritance diagram for QMenuBarPrivate:
+ Collaboration diagram for QMenuBarPrivate:

Public Member Functions

 QMenuBarPrivate ()
 
 ~QMenuBarPrivate ()
 
void init ()
 
QActiongetNextAction (const int start, const int increment) const
 
void calcActionRects (int max_width, int start) const
 
QRect actionRect (QAction *) const
 
void updateGeometries ()
 
QActionactionAt (QPoint p) const
 
void setCurrentAction (QAction *, bool=false, bool=false)
 
void popupAction (QAction *, bool)
 
void focusFirstAction ()
 
void setKeyboardMode (bool)
 
void activateAction (QAction *, QAction::ActionEvent)
 
void _q_actionTriggered ()
 
void _q_actionHovered ()
 
void _q_internalShortcutActivated (int)
 
void _q_updateLayout ()
 
bool isVisible (QAction *action)
 
QRect menuRect (bool) const
 
void handleReparent ()
 
QPlatformMenugetPlatformMenu (const QAction *action)
 
QPlatformMenufindInsertionPlatformMenu (const QAction *action)
 
void copyActionToPlatformMenu (const QAction *e, QPlatformMenu *menu)
 
int indexOf (QAction *act) const
 
- Public Member Functions inherited from QWidgetPrivate
 QWidgetPrivate (int version=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 ()
 
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 QPoint &) const
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &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 ()
 
 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 void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

uint itemsDirty: 1
 
QList< int > shortcutIndexMap
 
QList< QRectactionRects
 
QPointer< QActioncurrentAction
 
uint mouseDown: 1
 
uint closePopupMode: 1
 
uint defaultPopDown
 
uint popupState: 1
 
QPointer< QMenuactiveMenu
 
uint keyboardState: 1
 
uint altPressed: 1
 
QPointer< QWidgetkeyboardFocusWidget
 
QPointer< QWidgetleftWidget
 
QPointer< QWidgetrightWidget
 
QMenuBarExtensionextension
 
bool doChildEffects
 
QList< QPointer< QWidget > > oldParents
 
QList< QAction * > hiddenActions
 
QPointer< QActiondefaultAction
 
QBasicTimer autoReleaseTimer
 
QPlatformMenuBarplatformMenuBar
 
- 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
 
- 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 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>
 
- 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)
 
- 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 30 of file qmenubar_p.h.

Constructor & Destructor Documentation

◆ QMenuBarPrivate()

QMenuBarPrivate::QMenuBarPrivate ( )
inline

Definition at line 34 of file qmenubar_p.h.

◆ ~QMenuBarPrivate()

QMenuBarPrivate::~QMenuBarPrivate ( )
inline

Definition at line 39 of file qmenubar_p.h.

References platformMenuBar.

Member Function Documentation

◆ _q_actionHovered()

void QMenuBarPrivate::_q_actionHovered ( )

Definition at line 504 of file qmenubar.cpp.

References QWidgetPrivate::actions, emit, and QListSpecialMethodsBase< T >::indexOf().

+ Here is the call graph for this function:

◆ _q_actionTriggered()

void QMenuBarPrivate::_q_actionTriggered ( )

Definition at line 496 of file qmenubar.cpp.

References emit.

◆ _q_internalShortcutActivated()

void QMenuBarPrivate::_q_internalShortcutActivated ( int id)

Definition at line 1670 of file qmenubar.cpp.

References actionRects, QWidgetPrivate::actions, activateAction(), QList< T >::at(), autoReleaseTimer, QApplication::focusWidget(), keyboardFocusWidget, QAction::menu(), platformMenu, setCurrentAction(), setKeyboardMode(), QStyle::SH_MenuBar_AltKeyNavigation, QBasicTimer::start(), and QAction::Trigger.

+ Here is the call graph for this function:

◆ _q_updateLayout()

void QMenuBarPrivate::_q_updateLayout ( )

Definition at line 1693 of file qmenubar.cpp.

References itemsDirty, and updateGeometries().

+ Here is the call graph for this function:

◆ actionAt()

QAction * QMenuBarPrivate::actionAt ( QPoint p) const

Definition at line 81 of file qmenubar.cpp.

References actionRect(), QWidgetPrivate::actions, QList< T >::at(), QRect::contains(), i, and QList< T >::size().

+ Here is the call graph for this function:

◆ actionRect()

QRect QMenuBarPrivate::actionRect ( QAction * act) const

Definition at line 225 of file qmenubar.cpp.

References actionRects, QWidgetPrivate::actions, QList< T >::at(), QListSpecialMethodsBase< T >::indexOf(), QList< T >::size(), and updateGeometries().

Referenced by actionAt(), popupAction(), and setCurrentAction().

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

◆ activateAction()

void QMenuBarPrivate::activateAction ( QAction * action,
QAction::ActionEvent action_e )

Definition at line 480 of file qmenubar.cpp.

References QAction::activate(), QAction::Hover, QAction::isEnabled(), and QAction::showStatusText().

Referenced by _q_internalShortcutActivated(), and setCurrentAction().

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

◆ calcActionRects()

void QMenuBarPrivate::calcActionRects ( int max_width,
int start ) const

Definition at line 384 of file qmenubar.cpp.

References actionRects, QWidgetPrivate::actions, QList< T >::at(), QStyle::CT_MenuBarItem, QSize::expandedTo(), QList< T >::fill(), QSize::height(), i, QAction::icon, QSize::isEmpty(), QIcon::isNull(), QAction::isSeparator(), QAction::isVisible(), itemsDirty, opt, QStyle::pixelMetric(), QStyle::PM_MenuBarHMargin, QStyle::PM_MenuBarItemSpacing, QStyle::PM_MenuBarPanelWidth, QStyle::PM_MenuBarVMargin, QStyle::PM_SmallIconSize, qMax(), rect, QList< T >::resize(), QStyle::SH_DrawMenuBarSeparator, QList< T >::size(), QStyle::styleHint(), QAction::text, Qt::TextShowMnemonic, QStyle::visualRect(), and QSize::width().

Referenced by updateGeometries().

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

◆ copyActionToPlatformMenu()

void QMenuBarPrivate::copyActionToPlatformMenu ( const QAction * e,
QPlatformMenu * menu )

Definition at line 1180 of file qmenubar.cpp.

References QAction::isEnabled(), QAction::isVisible(), menu, QWidget::setEnabled(), QWidget::setVisible(), tag, and QAction::text.

+ Here is the call graph for this function:

◆ findInsertionPlatformMenu()

QPlatformMenu * QMenuBarPrivate::findInsertionPlatformMenu ( const QAction * action)

Definition at line 1167 of file qmenubar.cpp.

References getPlatformMenu(), and indexOf().

+ Here is the call graph for this function:

◆ focusFirstAction()

void QMenuBarPrivate::focusFirstAction ( )

Definition at line 238 of file qmenubar.cpp.

References actionRects, QWidgetPrivate::actions, QList< T >::at(), currentAction, QRect::isNull(), setCurrentAction(), QList< T >::size(), and updateGeometries().

Referenced by setKeyboardMode().

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

◆ getNextAction()

QAction * QMenuBarPrivate::getNextAction ( const int start,
const int increment ) const

Definition at line 691 of file qmenubar.cpp.

References actionRects, QWidgetPrivate::actions, QList< T >::at(), getNextAction(), i, increment(), QAction::isEnabled(), QRect::isNull(), QStyle::SH_Menu_AllowActiveAndDisabled, QList< T >::size(), and updateGeometries().

Referenced by getNextAction().

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

◆ getPlatformMenu()

QPlatformMenu * QMenuBarPrivate::getPlatformMenu ( const QAction * action)

Definition at line 1152 of file qmenubar.cpp.

References QPlatformMenuBar::createMenu(), QAction::menu(), platformMenu, and platformMenuBar.

Referenced by findInsertionPlatformMenu().

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

◆ handleReparent()

void QMenuBarPrivate::handleReparent ( )

Definition at line 1288 of file qmenubar.cpp.

References QList< T >::append(), copy(), QPlatformMenuBar::handleReparent(), QObject::installEventFilter(), oldParents, QWidget::parentWidget(), platformMenuBar, QObject::removeEventFilter(), and QWidget::window().

Referenced by init().

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

◆ indexOf()

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

Definition at line 105 of file qmenubar_p.h.

Referenced by findInsertionPlatformMenu().

+ Here is the caller graph for this function:

◆ init()

void QMenuBarPrivate::init ( )

◆ isVisible()

bool QMenuBarPrivate::isVisible ( QAction * action)

Definition at line 124 of file qmenubar.cpp.

References QListSpecialMethodsBase< T >::contains(), and hiddenActions.

+ Here is the call graph for this function:

◆ menuRect()

QRect QMenuBarPrivate::menuRect ( bool extVisible) const

Definition at line 90 of file qmenubar.cpp.

References QRect::adjust(), extension, QWidget::isVisible(), leftWidget, QStyle::PM_MenuBarPanelWidth, rightWidget, QWidget::sizeHint, QMenuBarExtension::sizeHint(), and QSize::width().

Referenced by updateGeometries().

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

◆ popupAction()

void QMenuBarPrivate::popupAction ( QAction * action,
bool activateFirst )

Definition at line 275 of file qmenubar.cpp.

References actionRect(), activeMenu, QRect::bottom(), closePopupMode, defaultPopDown, QMenuPrivate::get(), QAction::isEnabled(), QAction::menu(), QMenu::popup(), popupState, pos, qMax(), QRect::right(), QMenu::sizeHint(), QRect::top(), QWidget::update(), QRect::x(), and QRect::y().

Referenced by setCurrentAction().

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

◆ setCurrentAction()

void QMenuBarPrivate::setCurrentAction ( QAction * action,
bool popup = false,
bool activateFirst = false )

Definition at line 341 of file qmenubar.cpp.

References actionRect(), activateAction(), activeMenu, autoReleaseTimer, currentAction, doChildEffects, QWidget::focusWidget(), QWidget::hide(), QAction::Hover, QAction::isEnabled(), menu, Qt::NoFocusReason, popupAction(), popupState, QCoreApplication::sendEvent(), QWidget::setFocus(), QBasicTimer::stop(), and QWidget::window().

Referenced by _q_internalShortcutActivated(), focusFirstAction(), and setKeyboardMode().

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

◆ setKeyboardMode()

void QMenuBarPrivate::setKeyboardMode ( bool b)

Definition at line 249 of file qmenubar.cpp.

References QApplication::activePopupWidget(), focusFirstAction(), QApplication::focusWidget(), keyboardFocusWidget, keyboardState, Qt::MenuBarFocusReason, popupState, setCurrentAction(), QWidget::setFocus(), QStyle::SH_MenuBar_AltKeyNavigation, QWidget::update(), and QWidget::window().

Referenced by _q_internalShortcutActivated().

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

◆ updateGeometries()

Member Data Documentation

◆ actionRects

QList<QRect> QMenuBarPrivate::actionRects
mutable

◆ activeMenu

QPointer<QMenu> QMenuBarPrivate::activeMenu

Definition at line 65 of file qmenubar_p.h.

Referenced by popupAction(), and setCurrentAction().

◆ altPressed

uint QMenuBarPrivate::altPressed

Definition at line 70 of file qmenubar_p.h.

◆ autoReleaseTimer

QBasicTimer QMenuBarPrivate::autoReleaseTimer

Definition at line 99 of file qmenubar_p.h.

Referenced by _q_internalShortcutActivated(), and setCurrentAction().

◆ closePopupMode

uint QMenuBarPrivate::closePopupMode

Definition at line 58 of file qmenubar_p.h.

Referenced by popupAction().

◆ currentAction

QPointer<QAction> QMenuBarPrivate::currentAction

Definition at line 57 of file qmenubar_p.h.

Referenced by focusFirstAction(), setCurrentAction(), and updateGeometries().

◆ defaultAction

QPointer<QAction> QMenuBarPrivate::defaultAction

Definition at line 97 of file qmenubar_p.h.

◆ defaultPopDown

uint QMenuBarPrivate::defaultPopDown

Definition at line 58 of file qmenubar_p.h.

Referenced by popupAction().

◆ doChildEffects

bool QMenuBarPrivate::doChildEffects

Definition at line 87 of file qmenubar_p.h.

Referenced by setCurrentAction().

◆ extension

QMenuBarExtension* QMenuBarPrivate::extension

Definition at line 83 of file qmenubar_p.h.

Referenced by init(), menuRect(), and updateGeometries().

◆ hiddenActions

QList<QAction*> QMenuBarPrivate::hiddenActions

Definition at line 95 of file qmenubar_p.h.

Referenced by isVisible(), and updateGeometries().

◆ itemsDirty

uint QMenuBarPrivate::itemsDirty

Definition at line 48 of file qmenubar_p.h.

Referenced by _q_updateLayout(), calcActionRects(), and updateGeometries().

◆ keyboardFocusWidget

QPointer<QWidget> QMenuBarPrivate::keyboardFocusWidget

Definition at line 71 of file qmenubar_p.h.

Referenced by _q_internalShortcutActivated(), and setKeyboardMode().

◆ keyboardState

uint QMenuBarPrivate::keyboardState

Definition at line 70 of file qmenubar_p.h.

Referenced by setKeyboardMode().

◆ leftWidget

QPointer<QWidget> QMenuBarPrivate::leftWidget

Definition at line 82 of file qmenubar_p.h.

Referenced by menuRect(), and updateGeometries().

◆ mouseDown

uint QMenuBarPrivate::mouseDown

Definition at line 58 of file qmenubar_p.h.

◆ oldParents

QList<QPointer<QWidget> > QMenuBarPrivate::oldParents

Definition at line 93 of file qmenubar_p.h.

Referenced by handleReparent().

◆ platformMenuBar

QPlatformMenuBar* QMenuBarPrivate::platformMenuBar

Definition at line 100 of file qmenubar_p.h.

Referenced by ~QMenuBarPrivate(), getPlatformMenu(), handleReparent(), and init().

◆ popupState

uint QMenuBarPrivate::popupState

Definition at line 64 of file qmenubar_p.h.

Referenced by popupAction(), setCurrentAction(), and setKeyboardMode().

◆ rightWidget

QPointer<QWidget> QMenuBarPrivate::rightWidget

Definition at line 82 of file qmenubar_p.h.

Referenced by menuRect(), and updateGeometries().

◆ shortcutIndexMap

QList<int> QMenuBarPrivate::shortcutIndexMap

Definition at line 50 of file qmenubar_p.h.

Referenced by updateGeometries().


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