]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QLPopupMenu.h
Populate menus on popup - good news JMarc, it seems to work (almost) perfectly
[lyx.git] / src / frontends / qt2 / QLPopupMenu.h
1 /**
2  * \file QLPopupMenu.h
3  * Copyright 2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon <levon@movementarian.org>
7  */
8
9 #ifndef QLPOPUPMENU_H
10 #define QLPOPUPMENU_H
11  
12 #include "Menubar_pimpl.h"
13  
14 #include <qpopupmenu.h> 
15
16 #include "LString.h"
17  
18 class MenuBackend;
19 class QtView;
20 class MenuItem;
21 class QMenuData;
22
23 /// create a sub-menu
24 int createMenu(QMenuData * parent, MenuItem const * item, Menubar::Pimpl * owner);
25  
26 /// a submenu
27 class QLPopupMenu : public QPopupMenu {
28         Q_OBJECT
29 public:
30         QLPopupMenu(Menubar::Pimpl * owner, string const & name);
31
32 public slots:
33         /// populate the menu
34         void showing();
35
36 private:
37         /// return true if the given submenu is disabled
38         bool disabled(string const & name);
39  
40         /// our owning menubar
41         Menubar::Pimpl * owner_;
42
43         /// the name of this menu
44         string name_;
45 };
46
47 #endif // QLPOPUPMENU_H