-
Notifications
You must be signed in to change notification settings - Fork 0
/
widgetsmenu.h
executable file
·53 lines (47 loc) · 1.49 KB
/
widgetsmenu.h
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
#ifndef WIDGETSMENU_H
#define WIDGETSMENU_H
#include <QMenu>
class WidgetsMenu : public QMenu {
Q_OBJECT
public:
explicit WidgetsMenu(QWidget *parent = 0);
void addWidgetItem(QWidget * widget);
void removeWidgetItem(QWidget * widget);
protected:
void actionEvent(QActionEvent * e);
private:
inline QAction * addAction(const QString & /*text*/) {
return NULL;
}
inline QAction * addAction(const QIcon & /*icon*/, const QString & /*text*/) {
return NULL;
}
inline QAction * addAction(const QString & /*text*/, const QObject * /*receiver*/, const char * /*member*/, const QKeySequence & /*shortcut*/) {
return NULL;
}
inline QAction * addAction(const QIcon & /*icon*/, const QString & /*text*/, const QObject * /*receiver*/, const char * /*member*/, const QKeySequence & /*shortcut*/) {
return NULL;
}
inline void addAction(QAction * /*action*/) {}
inline QAction * addMenu(QMenu * /*menu*/){
return NULL;
}
inline QMenu * addMenu(const QString & /*title*/) {
return NULL;
}
inline QMenu * addMenu(const QIcon & /*icon*/, const QString & /*title*/) {
return NULL;
}
inline QAction * insertMenu(QAction * /*before*/, QMenu * /*menu*/) {
return NULL;
}
inline QAction * addSeparator() {
return NULL;
}
inline QAction * insertSeparator(QAction * /*before*/) {
return NULL;
}
private slots:
void aboutToShow();
};
#endif // WIDGETSMENU_H