Qt 4.8
Public Functions | Public Variables | List of all members
QMacMenuAction Struct Reference

#include <qmenu_p.h>

Public Functions

 QMacMenuAction ()
 
 ~QMacMenuAction ()
 

Public Variables

QPointer< QActionaction
 
uint command
 
uchar ignore_accel: 1
 
OSMenuRef menu
 
uchar merged: 1
 

Detailed Description

Definition at line 90 of file qmenu_p.h.

Constructors and Destructors

◆ QMacMenuAction()

QMacMenuAction::QMacMenuAction ( )
inline

Definition at line 91 of file qmenu_p.h.

93  : command(0)
94 #else
95  : menuItem(0)
96 #endif
97  , ignore_accel(0), merged(0), menu(0)
98  {
99  }
uchar ignore_accel
Definition: qmenu_p.h:106
uint command
Definition: qmenu_p.h:102
OSMenuRef menu
Definition: qmenu_p.h:109
uchar merged
Definition: qmenu_p.h:107

◆ ~QMacMenuAction()

QMacMenuAction::~QMacMenuAction ( )

Definition at line 755 of file qmenu_mac.mm.

Referenced by QMacMenuAction().

756 {
757 #ifdef QT_MAC_USE_COCOA
758  [menu release];
759  // Update the menu item if this action still owns it. For some items
760  // (like 'Quit') ownership will be transferred between all menu bars...
761  if (action && action.data() == reinterpret_cast<QAction *>([menuItem tag])) {
763  // Check if the item is owned by Qt, and should be hidden to keep it from causing
764  // problems. Do it for everything but the quit menu item since that should always
765  // be visible.
767  [menuItem setHidden:YES];
768  } else if (role == QAction::TextHeuristicRole
769  && menuItem != [getMenuLoader() quitMenuItem]) {
770  [menuItem setHidden:YES];
771  }
772  [menuItem setTag:nil];
773  }
774  [menuItem release];
775 #endif
776 }
MenuRole menuRole
the action&#39;s menu role
Definition: qaction.h:88
OSMenuRef menu
Definition: qmenu_p.h:109
MenuRole
This enum describes how an action should be moved into the application menu on Mac OS X...
Definition: qaction.h:94
T * data() const
Definition: qpointer.h:79
QPointer< QAction > action
Definition: qmenu_p.h:108
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64

Properties

◆ action

QPointer<QAction> QMacMenuAction::action

◆ command

uint QMacMenuAction::command

◆ ignore_accel

uchar QMacMenuAction::ignore_accel

◆ menu

OSMenuRef QMacMenuAction::menu

◆ merged

uchar QMacMenuAction::merged

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