KDEUI
#include <kactioncategory.h>
Public Member Functions | |
KActionCategory (const QString &text, KActionCollection *parent=NULL) | |
virtual | ~KActionCategory () |
const QList< QAction * > | actions () const |
KActionCollection * | collection () const |
void | setText (const QString &text) |
QString | text () const |
Adding Actions | |
Add a action to the category. This methods are provided for your convenience. They call the corresponding method of KActionCollection. | |
QAction * | addAction (const QString &name, QAction *action) |
KAction * | addAction (const QString &name, KAction *action) |
KAction * | addAction (KStandardAction::StandardAction actionType, const QObject *receiver=NULL, const char *member=NULL) |
KAction * | addAction (KStandardAction::StandardAction actionType, const QString &name, const QObject *receiver=NULL, const char *member=NULL) |
KAction * | addAction (const QString &name, const QObject *receiver=NULL, const char *member=NULL) |
template<class ActionType > | |
ActionType * | add (const QString &name, const QObject *receiver=NULL, const char *member=NULL) |
Properties | |
QString | text |
Detailed Description
Categorize actions for KShortcutsEditor.
KActionCategory provides a second level to organize the actions in KShortcutsEditor.
The first possibility is using more than one action collection. Each actions collection becomes a top level node.
- action collection 1
- first action
- second action
- third action
- action collection 2
- first action
- second action
- third action
Using KActionCategory it's possible to group the actions of one collection.
- action collection 1
- first action
- first category
- action 1 in category
- action 2 in category
- second action
Usage
The usage is analog to action collections. Just create a category and use it instead of the collection to create the actions.
The synchronization between KActionCollection and KActionCategory is done internally. There is for example no need to remove actions from a category. It is done implicitely if the action is removed from the associated collection.
Definition at line 95 of file kactioncategory.h.
Constructor & Destructor Documentation
|
explicit |
Default constructor.
Definition at line 43 of file kactioncategory.cpp.
|
virtual |
Destructor.
Definition at line 51 of file kactioncategory.cpp.
Member Function Documentation
Returns the actions belonging to this category.
Definition at line 57 of file kactioncategory.cpp.
|
inline |
Definition at line 143 of file kactioncategory.h.
Definition at line 63 of file kactioncategory.cpp.
Definition at line 71 of file kactioncategory.cpp.
KAction * KActionCategory::addAction | ( | KStandardAction::StandardAction | actionType, |
const QObject * | receiver = NULL , |
||
const char * | member = NULL |
||
) |
Definition at line 79 of file kactioncategory.cpp.
KAction * KActionCategory::addAction | ( | KStandardAction::StandardAction | actionType, |
const QString & | name, | ||
const QObject * | receiver = NULL , |
||
const char * | member = NULL |
||
) |
Definition at line 90 of file kactioncategory.cpp.
KAction * KActionCategory::addAction | ( | const QString & | name, |
const QObject * | receiver = NULL , |
||
const char * | member = NULL |
||
) |
Definition at line 102 of file kactioncategory.cpp.
KActionCollection * KActionCategory::collection | ( | ) | const |
The action collection this category is associated with.
Definition at line 123 of file kactioncategory.cpp.
void KActionCategory::setText | ( | const QString & | text | ) |
Set the action categorys descriptive text.
Definition at line 135 of file kactioncategory.cpp.
QString KActionCategory::text | ( | ) | const |
The action categorys descriptive text.
Property Documentation
|
readwrite |
Definition at line 99 of file kactioncategory.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.