[1e7d67]: libgui / MenuSub.h Maximize Restore History

Download this file

MenuSub.h    69 lines (50 with data), 2.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/***************************************************************************
MenuSub.h - description
-------------------
begin : Mon Jan 10 2000
copyright : (C) 2000 by Thomas Eschenbacher
email : Thomas.Eschenbacher@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _MENU_SUB_H_
#define _MENU_SUB_H_ 1
#include "MenuNode.h"
class QPopupMenu;
/**
* This is the class for submenu entries in a Menu. It is normally owned by a
* root menu node, a toplevel menu or an other submenu.
* @author Thomas Eschenbacher
*/
class MenuSub : public MenuNode
{
Q_OBJECT
public: // Public methods
MenuSub(MenuNode *parent, char *name, char *command=0,
int key=0, char *uid=0);
virtual int getChildIndex(int id);
virtual bool isBranch() {return true;};
virtual MenuNode *insertBranch(char *name, int key,
char *uid, int index=-1);
virtual MenuNode *insertLeaf(char *name, char *command,
int key, char *uid,
int index=-1);
virtual QPopupMenu *getPopupMenu();
virtual void removeChild(int id);
virtual bool specialCommand(const char *command);
virtual void setEnabled(bool enable);
virtual bool setItemEnabled(int id, bool enable);
public slots:
// void slotChecked(int);
void slotSelected(int);
// void slotHilighted(int);
private:
QPopupMenu *menu;
};
#endif // _MENU_SUB_H_