AgentActionManager Class Reference
from PyKDE4.akonadi import *
Inherits: QObject
Namespace: Akonadi
Detailed Description
Manages generic actions for agent and agent instance views.
- Since:
- 4.6
Enumerations | |
TextContext | { DialogTitle, DialogText, MessageBoxTitle, MessageBoxText, MessageBoxAlternativeText, ErrorMessageTitle, ErrorMessageText } |
Type | { CreateAgentInstance, DeleteAgentInstance, ConfigureAgentInstance, LastType } |
Signals | |
actionStateUpdated () | |
Methods | |
__init__ (self, KActionCollection actionCollection, QWidget parent=0) | |
KAction | action (self, Akonadi.AgentActionManager.Type type) |
KAction | createAction (self, Akonadi.AgentActionManager.Type type) |
createAllActions (self) | |
interceptAction (self, Akonadi.AgentActionManager.Type type, bool intercept=1) | |
[Akonadi.AgentInstance] | selectedAgentInstances (self) |
setCapabilityFilter (self, QStringList capabilities) | |
setContextText (self, Akonadi.AgentActionManager.Type type, Akonadi.AgentActionManager.TextContext context, QString text) | |
setContextText (self, Akonadi.AgentActionManager.Type type, Akonadi.AgentActionManager.TextContext context, KLocalizedString text) | |
setMimeTypeFilter (self, QStringList mimeTypes) | |
setSelectionModel (self, QItemSelectionModel model) |
Signal Documentation
actionStateUpdated | ( | ) |
This signal is emitted whenever the action state has been updated. In case you have special needs for changing the state of some actions, connect to this signal and adjust the action state.
- Signal syntax:
QObject.connect(source, SIGNAL("actionStateUpdated()"), target_slot)
Method Documentation
__init__ | ( | self, | ||
KActionCollection | actionCollection, | |||
QWidget | parent=0 | |||
) |
Creates a new agent action manager.
- Parameters:
-
actionCollection The action collection to operate on. parent The parent widget.
KAction action | ( | self, | ||
Akonadi.AgentActionManager.Type | type | |||
) |
Returns the action of the given type, 0 if it has not been created (yet).
KAction createAction | ( | self, | ||
Akonadi.AgentActionManager.Type | type | |||
) |
Creates the action of the given type and adds it to the action collection specified in the constructor if it does not exist yet. The action is connected to its default implementation provided by this class.
createAllActions | ( | self ) |
Convenience method to create all standard actions.
- See also:
- createAction()
interceptAction | ( | self, | ||
Akonadi.AgentActionManager.Type | type, | |||
bool | intercept=1 | |||
) |
Sets whether the default implementation for the given action type shall be executed when the action is triggered.
- Parameters:
-
intercept If false, the default implementation will be executed, if true no action is taken.
- Since:
- 4.6
[Akonadi.AgentInstance] selectedAgentInstances | ( | self ) |
Returns the list of agent instances that are currently selected. The list is empty if no agent instance is currently selected.
- Since:
- 4.6
setCapabilityFilter | ( | self, | ||
QStringList | capabilities | |||
) |
Sets the capability filter that will be used when creating new agent instances.
setContextText | ( | self, | ||
Akonadi.AgentActionManager.Type | type, | |||
Akonadi.AgentActionManager.TextContext | context, | |||
QString | text | |||
) |
Sets the text of the action type for the given context.
- Since:
- 4.8
setContextText | ( | self, | ||
Akonadi.AgentActionManager.Type | type, | |||
Akonadi.AgentActionManager.TextContext | context, | |||
KLocalizedString | text | |||
) |
Sets the text of the action type for the given context.
- Since:
- 4.8
setMimeTypeFilter | ( | self, | ||
QStringList | mimeTypes | |||
) |
Sets the mime type filter that will be used when creating new agent instances.
setSelectionModel | ( | self, | ||
QItemSelectionModel | model | |||
) |
Sets the agent selection model based on which the actions should operate. If none is set, all actions will be disabled.
Enumeration Documentation
TextContext |
Describes the text context that can be customized.
- Enumerator:
-
DialogTitle DialogText MessageBoxTitle MessageBoxText MessageBoxAlternativeText ErrorMessageTitle ErrorMessageText
Type |
Describes the supported actions.
- Enumerator:
-
CreateCollection CopyCollections DeleteCollections SynchronizeCollections CollectionProperties CopyItems Paste DeleteItems ManageLocalSubscriptions AddToFavoriteCollections RemoveFromFavoriteCollections RenameFavoriteCollection CopyCollectionToMenu CopyItemToMenu MoveItemToMenu MoveCollectionToMenu CutItems CutCollections CreateResource DeleteResources ResourceProperties SynchronizeResources ToggleWorkOffline CopyCollectionToDialog MoveCollectionToDialog CopyItemToDialog MoveItemToDialog SynchronizeCollectionsRecursive MoveCollectionsToTrash MoveItemsToTrash RestoreCollectionsFromTrash RestoreItemsFromTrash MoveToTrashRestoreCollection MoveToTrashRestoreCollectionAlternative MoveToTrashRestoreItem MoveToTrashRestoreItemAlternative SynchronizeFavoriteCollections LastType