class StandardActionManager


Module akonadi
Namespace Akonadi
Class StandardActionManager
Inherits QObject
Manages generic Akonadi actions common for all types. This covers creating of the actions with appropriate labels, icons, shortcuts etc., updating the action state depending on the current selection as well as default implementations for the actual operations.

If the default implementation is not appropriate for your application you can still use the state tracking by disconnecting the triggered() signal and re-connecting it to your implementation. The actual KAction objects can be retrieved by calling createAction() or action() for that.

If the default look and feel (labels, icons, shortcuts) of the actions is not appropriate for your application, you can access them as noted above and customize them to your needs. Additionally, you can set a KLocalizedString which should be used as a action label with correct plural handling for actions operating on multiple objects with setActionText().

Finally, if you have special needs for the action states, connect to the actionStateUpdated() signal and adjust the state accordingly.

The following actions are provided (KAction name in parenthesis): - Creation of a new collection (@c akonadi_collection_create) - Copying of selected collections (@c akonadi_collection_copy) - Deletion of selected collections (@c akonadi_collection_delete) - Synchronization of selected collections (@c akonadi_collection_sync) - Showing the collection properties dialog for the current collection (@c akonadi_collection_properties) - Copying of selected items (@c akonadi_itemcopy) - Pasting collections, items or raw data (@c akonadi_paste) - Deleting of selected items (@c akonadi_item_delete) - Managing local subscriptions (@c akonadi_manage_local_subscriptions)

The following example shows how to use standard actions in your application: @verbatim Akonadi.StandardActionManager *actMgr = new Akonadi.StandardActionManager( actionCollection(), this ); actMgr->setCollectionSelectionModel( collectionView->collectionSelectionModel() ); actMgr->createAllActions(); @endverbatim Additionally you have to add the actions to the KXMLGUI file of your application, using the names listed above.

If you only need a subset of the actions provided, you can call createAction() instead of createAllActions() for the action types you want.

To do: collection deleting and sync do not support multi-selection yet



enums

enum details

methods