|
Krita Source Code Documentation
|
#include <kactioncategory.h>
Inheritance diagram for KisKActionCategory:Public Member Functions | |
| KisKActionCategory (const QString &text, KisKActionCollection *parent=0) | |
| ~KisKActionCategory () override | |
Properties | |
| QString | text |
Adding Actions | |
Add a action to the category. This methods are provided for your convenience. They call the corresponding method of KisKActionCollection. | |
| class | KisKActionCollectionPrivate |
| KisKActionCollection needs access to some of our helper methods. | |
| KisKActionCategoryPrivate *const | d |
| Implementation details. | |
| QAction * | addAction (const QString &name, QAction *action) |
| QAction * | addAction (KStandardAction::StandardAction actionType, const QObject *receiver=0, const char *member=0) |
| QAction * | addAction (KStandardAction::StandardAction actionType, const QString &name, const QObject *receiver=0, const char *member=0) |
| QAction * | addAction (const QString &name, const QObject *receiver=0, const char *member=0) |
| template<class ActionType > | |
| ActionType * | add (const QString &name, const QObject *receiver=0, const char *member=0) |
| const QList< QAction * > | actions () const |
| KisKActionCollection * | collection () const |
| QString | text () const |
| void | setText (const QString &text) |
| void | unlistAction (QAction *action) |
| void | addAction (QAction *action) |
Categorize actions for KShortcutsEditor.
KisKActionCategory 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.
Using KisKActionCategory it's possible to group the actions of one collection.
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 KisKActionCollection and KisKActionCategory is done internally. There is for example no need to remove actions from a category. It is done implicitly if the action is removed from the associated collection.
Definition at line 80 of file kactioncategory.h.
|
explicit |
Default constructor
Definition at line 26 of file kactioncategory.cpp.
References d, KisKActionCategoryPrivate::text, and text.
|
override |
| const QList< QAction * > KisKActionCategory::actions | ( | ) | const |
Returns the actions belonging to this category
Definition at line 38 of file kactioncategory.cpp.
References KisKActionCategoryPrivate::actions, and d.
|
inline |
Definition at line 125 of file kactioncategory.h.
| QAction * KisKActionCategory::addAction | ( | const QString & | name, |
| const QObject * | receiver = 0, | ||
| const char * | member = 0 ) |
Definition at line 71 of file kactioncategory.cpp.
References addAction(), KisKActionCollection::addAction(), and collection().
| QAction * KisKActionCategory::addAction | ( | const QString & | name, |
| QAction * | action ) |
Definition at line 43 of file kactioncategory.cpp.
References addAction(), KisKActionCollection::addAction(), and collection().
| QAction * KisKActionCategory::addAction | ( | KStandardAction::StandardAction | actionType, |
| const QObject * | receiver = 0, | ||
| const char * | member = 0 ) |
Definition at line 50 of file kactioncategory.cpp.
References addAction(), KisKActionCollection::addAction(), and collection().
| QAction * KisKActionCategory::addAction | ( | KStandardAction::StandardAction | actionType, |
| const QString & | name, | ||
| const QObject * | receiver = 0, | ||
| const char * | member = 0 ) |
Definition at line 60 of file kactioncategory.cpp.
References addAction(), KisKActionCollection::addAction(), and collection().
|
private |
Add action to category
Definition at line 81 of file kactioncategory.cpp.
References KisKActionCategoryPrivate::actions, and d.
| KisKActionCollection * KisKActionCategory::collection | ( | ) | const |
The action collection this category is associated with.
Definition at line 89 of file kactioncategory.cpp.
| void KisKActionCategory::setText | ( | const QString & | text | ) |
Set the action categories descriptive text.
Definition at line 99 of file kactioncategory.cpp.
References d, KisKActionCategoryPrivate::text, and text.
| QString KisKActionCategory::text | ( | ) | const |
The action categories descriptive text
Definition at line 94 of file kactioncategory.cpp.
References d, and KisKActionCategoryPrivate::text.
|
private |
Remove \action from this category if found.
Definition at line 104 of file kactioncategory.cpp.
References KisKActionCategoryPrivate::actions, and d.
|
friend |
KisKActionCollection needs access to some of our helper methods.
Definition at line 169 of file kactioncategory.h.
|
private |
Implementation details.
Definition at line 172 of file kactioncategory.h.
|
readwrite |
Definition at line 84 of file kactioncategory.h.