]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QLPopupMenu.h
namespace grfx -> lyx::graphics
[lyx.git] / src / frontends / qt2 / QLPopupMenu.h
1 // -*- C++ -*-
2 /**
3  * \file QLPopupMenu.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef QLPOPUPMENU_H
13 #define QLPOPUPMENU_H
14
15
16 #include "Menubar_pimpl.h"
17
18 #include <qpopupmenu.h>
19
20 #include "LString.h"
21
22 class MenuBackend;
23 class MenuItem;
24 class Menu;
25 class QMenuData;
26 class QLPopupMenu;
27
28 /// create a sub-menu
29 std::pair<int, QLPopupMenu *>
30 createMenu(QMenuData * parent, MenuItem const * item,
31            Menubar::Pimpl * owner, bool is_toplevel = false);
32
33 /// a submenu
34 class QLPopupMenu : public QPopupMenu {
35         Q_OBJECT
36 public:
37         QLPopupMenu(Menubar::Pimpl * owner,
38                     string const & name, bool toplevel);
39
40         /// populate the menu
41         void populate(Menu * menu);
42 public slots:
43         /// populate the toplevel menu and all children
44         void showing();
45 private:
46         /// our owning menubar
47         Menubar::Pimpl * owner_;
48
49         /// the name of this menu
50         string name_;
51 };
52
53 #endif // QLPOPUPMENU_H