• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • actions
kactionmenu.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Reginald Stadlbauer <reggie@kde.org>
3  (C) 1999 Simon Hausmann <hausmann@kde.org>
4  (C) 2000 Nicolas Hadacek <haadcek@kde.org>
5  (C) 2000 Kurt Granroth <granroth@kde.org>
6  (C) 2000 Michael Koch <koch@kde.org>
7  (C) 2001 Holger Freyther <freyther@kde.org>
8  (C) 2002 Ellis Whitehead <ellis@kde.org>
9  (C) 2003 Andras Mantia <amantia@kde.org>
10  (C) 2005-2006 Hamish Rodda <rodda@kde.org>
11 
12  This library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU Library General Public
14  License version 2 as published by the Free Software Foundation.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Library General Public License for more details.
20 
21  You should have received a copy of the GNU Library General Public License
22  along with this library; see the file COPYING.LIB. If not, write to
23  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  Boston, MA 02110-1301, USA.
25 */
26 
27 #ifndef KACTIONMENU_H
28 #define KACTIONMENU_H
29 
30 #include <kaction.h>
31 
32 class KMenu;
33 
47 class KDEUI_EXPORT KActionMenu : public KAction
48 {
49  Q_OBJECT
50  Q_PROPERTY( bool delayed READ delayed WRITE setDelayed )
51  Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
52 
53 public:
54  explicit KActionMenu(QObject *parent);
55  KActionMenu(const QString& text, QObject *parent);
56  KActionMenu(const KIcon& icon, const QString& text, QObject *parent);
57  virtual ~KActionMenu();
58 
62 #ifndef KDE_NO_DEPRECATED
63  KDE_DEPRECATED void remove( KAction* );
64 #endif
65 
66  void addAction(QAction* action);
67  QAction* addSeparator();
68  void insertAction(QAction* before, QAction* action);
69  QAction* insertSeparator(QAction* before);
70  void removeAction(QAction* action);
71 
77 #ifndef KDE_NO_DEPRECATED
78  inline KDE_DEPRECATED KMenu* popupMenu() { return menu(); }
79 #endif
80 
85  KMenu* menu();
86 
87  /*
88  * Overload of QAction::setMenu to make sure a KMenu is passed
89  **/
90  void setMenu( KMenu *menu );
91 
96  bool delayed() const;
97 
111  void setDelayed(bool delayed);
112 
117  bool stickyMenu() const;
118 
127  void setStickyMenu(bool sticky);
128 
129  virtual QWidget* createWidget(QWidget* parent);
130 
131 private:
132  class KActionMenuPrivate* const d;
133 };
134 
135 #endif
QWidget
KMenu
A menu with keyboard searching.
Definition: kmenu.h:42
QAction::setMenu
void setMenu(QMenu *menu)
QObject
KIcon
A wrapper around QIcon that provides KDE icon features.
Definition: kicon.h:40
QString
kaction.h
KActionMenu
A KActionMenu is an action that has several properties specific to holding a sub-menu of other action...
Definition: kactionmenu.h:47
QWidgetAction::createWidget
virtual QWidget * createWidget(QWidget *parent)
QAction
KAction
Class to encapsulate user-driven action or event.
Definition: kaction.h:216
KActionMenu::popupMenu
KMenu * popupMenu()
Returns this action's menu as a KMenu, if it is one.
Definition: kactionmenu.h:78
QAction::menu
QMenu * menu() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal