mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
4f8febc1b4
with Qt/Mac. Still does not work in non-default locale. * QLPopupMenu.C (specialMacXmenuHack): remove, not needed anymore. * GuiView.C (init): remove Mac hack, not needed anymore. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16349 a592a061-630c-0410-9148-cb99ea01b6c8
63 lines
1.2 KiB
C++
63 lines
1.2 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file QLPopupMenu.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef QLPOPUPMENU_H
|
|
#define QLPOPUPMENU_H
|
|
|
|
#include <QMenu>
|
|
|
|
#include "funcrequest.h"
|
|
#include "MenuBackend.h"
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class QLMenubar;
|
|
|
|
/// a submenu
|
|
class QLPopupMenu : public QMenu {
|
|
Q_OBJECT
|
|
public:
|
|
|
|
QLPopupMenu(QLMenubar * owner, MenuItem const & mi, bool topLevelMenu=false);
|
|
|
|
/// populates the menu or one of its submenu
|
|
/// This is used as a recursive function
|
|
void populate(QMenu* qMenu, Menu * menu);
|
|
|
|
public Q_SLOTS:
|
|
/// populate the toplevel menu and all children
|
|
void update();
|
|
|
|
private:
|
|
|
|
/// our owning menubar
|
|
QLMenubar * owner_;
|
|
|
|
/// the name of this menu
|
|
lyx::docstring name_;
|
|
|
|
private:
|
|
/// Get a Menu item label from the menu backend
|
|
lyx::docstring const getLabel(MenuItem const & mi);
|
|
|
|
/// add binding keys a the menu item label.
|
|
void addBinding(lyx::docstring & label, MenuItem const & mi);
|
|
|
|
/// Top Level Menu
|
|
Menu topLevelMenu_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // QLPOPUPMENU_H
|