LibreOffice Module vcl (master) 1
Public Member Functions | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
QtMenu Class Reference

#include <QtMenu.hxx>

Inheritance diagram for QtMenu:
[legend]
Collaboration diagram for QtMenu:
[legend]

Public Member Functions

 QtMenu (bool bMenuBar)
 
virtual bool VisibleMenuBar () override
 
virtual void InsertItem (SalMenuItem *pSalMenuItem, unsigned nPos) override
 
virtual void RemoveItem (unsigned nPos) override
 
virtual void SetSubMenu (SalMenuItem *pSalMenuItem, SalMenu *pSubMenu, unsigned nPos) override
 
virtual void SetFrame (const SalFrame *pFrame) override
 
const QtFrameGetFrame () const
 
virtual void ShowMenuBar (bool bVisible) override
 
virtual bool ShowNativePopupMenu (FloatingWindow *pWin, const tools::Rectangle &rRect, FloatWinPopupFlags nFlags) override
 
QtMenuGetTopLevel ()
 
virtual void SetItemBits (unsigned nPos, MenuItemBits nBits) override
 
virtual void CheckItem (unsigned nPos, bool bCheck) override
 
virtual void EnableItem (unsigned nPos, bool bEnable) override
 
virtual void ShowItem (unsigned nPos, bool bShow) override
 
virtual void SetItemText (unsigned nPos, SalMenuItem *pSalMenuItem, const OUString &rText) override
 
virtual void SetItemImage (unsigned nPos, SalMenuItem *pSalMenuItem, const Image &rImage) override
 
virtual void SetAccelerator (unsigned nPos, SalMenuItem *pSalMenuItem, const vcl::KeyCode &rKeyCode, const OUString &rKeyName) override
 
virtual void GetSystemMenuData (SystemMenuData *pData) override
 
virtual void ShowCloseButton (bool bShow) override
 
virtual bool AddMenuBarButton (const SalMenuButtonItem &) override
 
virtual void RemoveMenuBarButton (sal_uInt16 nId) override
 
virtual tools::Rectangle GetMenuBarButtonRectPixel (sal_uInt16 nId, SalFrame *) override
 
virtual int GetMenuBarHeight () const override
 
void SetMenu (Menu *pMenu)
 
MenuGetMenu ()
 
unsigned GetItemCount () const
 
QtMenuItemGetItemAtPos (unsigned nPos)
 
- Public Member Functions inherited from SalMenu
virtual ~SalMenu ()
 
virtual bool VisibleMenuBar ()=0
 
virtual void ShowMenuBar (bool)
 
virtual void InsertItem (SalMenuItem *pSalMenuItem, unsigned nPos)=0
 
virtual void RemoveItem (unsigned nPos)=0
 
virtual void SetSubMenu (SalMenuItem *pSalMenuItem, SalMenu *pSubMenu, unsigned nPos)=0
 
virtual void SetFrame (const SalFrame *pFrame)=0
 
virtual void SetItemBits (unsigned, MenuItemBits)
 
virtual void CheckItem (unsigned nPos, bool bCheck)=0
 
virtual void EnableItem (unsigned nPos, bool bEnable)=0
 
virtual void SetItemText (unsigned nPos, SalMenuItem *pSalMenuItem, const OUString &rText)=0
 
virtual void SetItemImage (unsigned nPos, SalMenuItem *pSalMenuItem, const Image &rImage)=0
 
virtual void SetAccelerator (unsigned nPos, SalMenuItem *pSalMenuItem, const vcl::KeyCode &rKeyCode, const OUString &rKeyName)=0
 
virtual void GetSystemMenuData (SystemMenuData *pData)=0
 
virtual bool ShowNativePopupMenu (FloatingWindow *pWin, const tools::Rectangle &rRect, FloatWinPopupFlags nFlags)
 
virtual void ShowCloseButton (bool bShow)
 
virtual bool AddMenuBarButton (const SalMenuButtonItem &)
 
virtual void RemoveMenuBarButton (sal_uInt16 nId)
 
virtual void Update ()
 
virtual bool CanGetFocus () const
 
virtual bool TakeFocus ()
 
virtual void ShowItem (unsigned nPos, bool bShow)
 
virtual tools::Rectangle GetMenuBarButtonRectPixel (sal_uInt16 i_nItemId, SalFrame *i_pReferenceFrame)
 
virtual int GetMenuBarHeight () const
 
virtual void ApplyPersona ()
 

Private Slots

static void slotMenuTriggered (QtMenuItem *pQItem)
 
static void slotMenuAboutToShow (QtMenuItem *pQItem)
 
static void slotMenuAboutToHide (QtMenuItem *pQItem)
 
void slotCloseDocument ()
 
void slotMenuBarButtonClicked (QAbstractButton *)
 

Private Member Functions

void DoFullMenuUpdate (Menu *pMenuBar)
 
void InsertMenuItem (QtMenuItem *pSalMenuItem, unsigned nPos)
 
void ReinitializeActionGroup (unsigned nPos)
 
void ResetAllActionGroups ()
 
void UpdateActionGroupItem (const QtMenuItem *pSalMenuItem)
 
bool validateQMenuBar () const
 
QPushButton * ImplAddMenuBarButton (const QIcon &rIcon, const QString &rToolTip, int nId)
 
void ImplRemoveMenuBarButton (int nId)
 
void adjustButtonSizes ()
 

Static Private Member Functions

static void NativeItemText (OUString &rItemText)
 

Private Attributes

std::vector< QtMenuItem * > maItems
 
VclPtr< MenumpVCLMenu
 
QtMenumpParentSalMenu
 
QtFramempFrame
 
bool mbMenuBar
 
QMenuBar * mpQMenuBar
 
std::unique_ptr< QMenu > mpOwnedQMenu
 
QMenu * mpQMenu
 
QButtonGroup * m_pButtonGroup
 

Detailed Description

Definition at line 40 of file qt5/QtMenu.hxx.

Constructor & Destructor Documentation

◆ QtMenu()

QtMenu::QtMenu ( bool  bMenuBar)

Member Function Documentation

◆ AddMenuBarButton()

virtual bool QtMenu::AddMenuBarButton ( const SalMenuButtonItem )
overridevirtual

Reimplemented from SalMenu.

◆ adjustButtonSizes()

void QtMenu::adjustButtonSizes ( )
private

◆ CheckItem()

virtual void QtMenu::CheckItem ( unsigned  nPos,
bool  bCheck 
)
overridevirtual

Implements SalMenu.

◆ DoFullMenuUpdate()

void QtMenu::DoFullMenuUpdate ( Menu pMenuBar)
private

◆ EnableItem()

virtual void QtMenu::EnableItem ( unsigned  nPos,
bool  bEnable 
)
overridevirtual

Implements SalMenu.

◆ GetFrame()

const QtFrame * QtMenu::GetFrame ( ) const

◆ GetItemAtPos()

QtMenuItem * QtMenu::GetItemAtPos ( unsigned  nPos)
inline

Definition at line 103 of file qt5/QtMenu.hxx.

References maItems, and nPos.

◆ GetItemCount()

unsigned QtMenu::GetItemCount ( ) const
inline

Definition at line 102 of file qt5/QtMenu.hxx.

References maItems.

◆ GetMenu()

Menu * QtMenu::GetMenu ( )
inline

Definition at line 101 of file qt5/QtMenu.hxx.

References mpVCLMenu.

◆ GetMenuBarButtonRectPixel()

virtual tools::Rectangle QtMenu::GetMenuBarButtonRectPixel ( sal_uInt16  nId,
SalFrame  
)
overridevirtual

Reimplemented from SalMenu.

◆ GetMenuBarHeight()

virtual int QtMenu::GetMenuBarHeight ( ) const
overridevirtual

Reimplemented from SalMenu.

◆ GetSystemMenuData()

virtual void QtMenu::GetSystemMenuData ( SystemMenuData pData)
overridevirtual

Implements SalMenu.

◆ GetTopLevel()

QtMenu * QtMenu::GetTopLevel ( )

◆ ImplAddMenuBarButton()

QPushButton * QtMenu::ImplAddMenuBarButton ( const QIcon &  rIcon,
const QString &  rToolTip,
int  nId 
)
private

◆ ImplRemoveMenuBarButton()

void QtMenu::ImplRemoveMenuBarButton ( int  nId)
private

◆ InsertItem()

virtual void QtMenu::InsertItem ( SalMenuItem pSalMenuItem,
unsigned  nPos 
)
overridevirtual

Implements SalMenu.

◆ InsertMenuItem()

void QtMenu::InsertMenuItem ( QtMenuItem pSalMenuItem,
unsigned  nPos 
)
private

◆ NativeItemText()

static void QtMenu::NativeItemText ( OUString &  rItemText)
staticprivate

◆ ReinitializeActionGroup()

void QtMenu::ReinitializeActionGroup ( unsigned  nPos)
private

◆ RemoveItem()

virtual void QtMenu::RemoveItem ( unsigned  nPos)
overridevirtual

Implements SalMenu.

◆ RemoveMenuBarButton()

virtual void QtMenu::RemoveMenuBarButton ( sal_uInt16  nId)
overridevirtual

Reimplemented from SalMenu.

◆ ResetAllActionGroups()

void QtMenu::ResetAllActionGroups ( )
private

◆ SetAccelerator()

virtual void QtMenu::SetAccelerator ( unsigned  nPos,
SalMenuItem pSalMenuItem,
const vcl::KeyCode rKeyCode,
const OUString &  rKeyName 
)
overridevirtual

Implements SalMenu.

◆ SetFrame()

virtual void QtMenu::SetFrame ( const SalFrame pFrame)
overridevirtual

Implements SalMenu.

◆ SetItemBits()

virtual void QtMenu::SetItemBits ( unsigned  nPos,
MenuItemBits  nBits 
)
overridevirtual

Reimplemented from SalMenu.

◆ SetItemImage()

virtual void QtMenu::SetItemImage ( unsigned  nPos,
SalMenuItem pSalMenuItem,
const Image rImage 
)
overridevirtual

Implements SalMenu.

◆ SetItemText()

virtual void QtMenu::SetItemText ( unsigned  nPos,
SalMenuItem pSalMenuItem,
const OUString &  rText 
)
overridevirtual

Implements SalMenu.

◆ SetMenu()

void QtMenu::SetMenu ( Menu pMenu)
inline

Definition at line 100 of file qt5/QtMenu.hxx.

References mpVCLMenu.

◆ SetSubMenu()

virtual void QtMenu::SetSubMenu ( SalMenuItem pSalMenuItem,
SalMenu pSubMenu,
unsigned  nPos 
)
overridevirtual

Implements SalMenu.

◆ ShowCloseButton()

virtual void QtMenu::ShowCloseButton ( bool  bShow)
overridevirtual

Reimplemented from SalMenu.

◆ ShowItem()

virtual void QtMenu::ShowItem ( unsigned  nPos,
bool  bShow 
)
overridevirtual

Reimplemented from SalMenu.

◆ ShowMenuBar()

virtual void QtMenu::ShowMenuBar ( bool  bVisible)
overridevirtual

Reimplemented from SalMenu.

◆ ShowNativePopupMenu()

virtual bool QtMenu::ShowNativePopupMenu ( FloatingWindow pWin,
const tools::Rectangle rRect,
FloatWinPopupFlags  nFlags 
)
overridevirtual

Reimplemented from SalMenu.

◆ slotCloseDocument

void QtMenu::slotCloseDocument ( )
privateslot

◆ slotMenuAboutToHide

static void QtMenu::slotMenuAboutToHide ( QtMenuItem pQItem)
staticprivateslot

◆ slotMenuAboutToShow

static void QtMenu::slotMenuAboutToShow ( QtMenuItem pQItem)
staticprivateslot

◆ slotMenuBarButtonClicked

void QtMenu::slotMenuBarButtonClicked ( QAbstractButton *  )
privateslot

◆ slotMenuTriggered

static void QtMenu::slotMenuTriggered ( QtMenuItem pQItem)
staticprivateslot

◆ UpdateActionGroupItem()

void QtMenu::UpdateActionGroupItem ( const QtMenuItem pSalMenuItem)
private

◆ validateQMenuBar()

bool QtMenu::validateQMenuBar ( ) const
private

◆ VisibleMenuBar()

virtual bool QtMenu::VisibleMenuBar ( )
overridevirtual

Implements SalMenu.

Member Data Documentation

◆ m_pButtonGroup

QButtonGroup* QtMenu::m_pButtonGroup
private

Definition at line 54 of file qt5/QtMenu.hxx.

◆ maItems

std::vector<QtMenuItem*> QtMenu::maItems
private

Definition at line 44 of file qt5/QtMenu.hxx.

Referenced by GetItemAtPos(), and GetItemCount().

◆ mbMenuBar

bool QtMenu::mbMenuBar
private

Definition at line 48 of file qt5/QtMenu.hxx.

◆ mpFrame

QtFrame* QtMenu::mpFrame
private

Definition at line 47 of file qt5/QtMenu.hxx.

◆ mpOwnedQMenu

std::unique_ptr<QMenu> QtMenu::mpOwnedQMenu
private

Definition at line 51 of file qt5/QtMenu.hxx.

◆ mpParentSalMenu

QtMenu* QtMenu::mpParentSalMenu
private

Definition at line 46 of file qt5/QtMenu.hxx.

◆ mpQMenu

QMenu* QtMenu::mpQMenu
private

Definition at line 53 of file qt5/QtMenu.hxx.

◆ mpQMenuBar

QMenuBar* QtMenu::mpQMenuBar
private

Definition at line 49 of file qt5/QtMenu.hxx.

◆ mpVCLMenu

VclPtr<Menu> QtMenu::mpVCLMenu
private

Definition at line 45 of file qt5/QtMenu.hxx.

Referenced by GetMenu(), and SetMenu().


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