mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
5d3718cad2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6165 a592a061-630c-0410-9148-cb99ea01b6c8
54 lines
1.0 KiB
C++
54 lines
1.0 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 "Menubar_pimpl.h"
|
|
|
|
#include <qpopupmenu.h>
|
|
|
|
#include "LString.h"
|
|
|
|
class MenuBackend;
|
|
class MenuItem;
|
|
class Menu;
|
|
class QMenuData;
|
|
class QLPopupMenu;
|
|
|
|
/// create a sub-menu
|
|
std::pair<int, QLPopupMenu *>
|
|
createMenu(QMenuData * parent, MenuItem const * item,
|
|
Menubar::Pimpl * owner, bool is_toplevel = false);
|
|
|
|
/// a submenu
|
|
class QLPopupMenu : public QPopupMenu {
|
|
Q_OBJECT
|
|
public:
|
|
QLPopupMenu(Menubar::Pimpl * owner,
|
|
string const & name, bool toplevel);
|
|
|
|
/// populate the menu
|
|
void populate(Menu * menu);
|
|
public slots:
|
|
/// populate the toplevel menu and all children
|
|
void showing();
|
|
private:
|
|
/// our owning menubar
|
|
Menubar::Pimpl * owner_;
|
|
|
|
/// the name of this menu
|
|
string name_;
|
|
};
|
|
|
|
#endif // QLPOPUPMENU_H
|