Changeset View
Changeset View
Standalone View
Standalone View
src/kactionmenu.h
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 52 | { | |||
---|---|---|---|---|---|
55 | Q_PROPERTY(bool stickyMenu READ stickyMenu WRITE setStickyMenu) | 55 | Q_PROPERTY(bool stickyMenu READ stickyMenu WRITE setStickyMenu) | ||
56 | 56 | | |||
57 | public: | 57 | public: | ||
58 | explicit KActionMenu(QObject *parent); | 58 | explicit KActionMenu(QObject *parent); | ||
59 | KActionMenu(const QString &text, QObject *parent); | 59 | KActionMenu(const QString &text, QObject *parent); | ||
60 | KActionMenu(const QIcon &icon, const QString &text, QObject *parent); | 60 | KActionMenu(const QIcon &icon, const QString &text, QObject *parent); | ||
61 | ~KActionMenu() override; | 61 | ~KActionMenu() override; | ||
62 | 62 | | |||
63 | #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
63 | /** | 64 | /** | ||
64 | * @deprecated | 65 | * @deprecated Since 5.0. | ||
65 | */ | 66 | */ | ||
66 | #ifndef KWIDGETSADDONS_NO_DEPRECATED | 67 | KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KActionMenu::removeAction(QAction*)") | ||
67 | KWIDGETSADDONS_DEPRECATED void remove(QAction *); | 68 | void remove(QAction *); | ||
68 | #endif | 69 | #endif | ||
69 | 70 | | |||
70 | /** | 71 | /** | ||
71 | * Adds @p action to this KActionMenu. | 72 | * Adds @p action to this KActionMenu. | ||
72 | * The KActionMenu does not take ownership of @p action. | 73 | * The KActionMenu does not take ownership of @p action. | ||
73 | */ | 74 | */ | ||
74 | void addAction(QAction *action); | 75 | void addAction(QAction *action); | ||
75 | QAction *addSeparator(); | 76 | QAction *addSeparator(); | ||
76 | void insertAction(QAction *before, QAction *action); | 77 | void insertAction(QAction *before, QAction *action); | ||
77 | QAction *insertSeparator(QAction *before); | 78 | QAction *insertSeparator(QAction *before); | ||
78 | void removeAction(QAction *action); | 79 | void removeAction(QAction *action); | ||
79 | 80 | | |||
81 | #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
80 | /** | 82 | /** | ||
81 | * Returns this action's menu as a KMenu, if it is one. | 83 | * Returns this action's menu as a KMenu, if it is one. | ||
82 | * If none exists, one will be created. | 84 | * If none exists, one will be created. | ||
83 | * @deprecated use menu() instead. | 85 | * @deprecated Since 5.0, use menu() instead. | ||
84 | */ | 86 | */ | ||
85 | #ifndef KWIDGETSADDONS_NO_DEPRECATED | 87 | inline KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KActionMenu::menu()") | ||
86 | inline KWIDGETSADDONS_DEPRECATED QMenu *popupMenu() | 88 | QMenu *popupMenu() | ||
87 | { | 89 | { | ||
88 | return menu(); | 90 | return menu(); | ||
89 | } | 91 | } | ||
90 | #endif | 92 | #endif | ||
91 | 93 | | |||
92 | /** | 94 | /** | ||
93 | * Returns true if this action creates a delayed popup menu | 95 | * Returns true if this action creates a delayed popup menu | ||
94 | * when plugged in a KToolBar. | 96 | * when plugged in a KToolBar. | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |