akonadi
standardactionmanager.cpp
87 { "akonadi_collection_create", I18N_NOOP( "&New Folder..." ), I18N_NOOP( "New" ), "folder-new", 0, SLOT(slotCreateCollection()), NormalAction },
89 { "akonadi_collection_delete", I18N_NOOP( "&Delete Folder" ), I18N_NOOP( "Delete" ), "edit-delete", 0, SLOT(slotDeleteCollection()), NormalAction },
90 { "akonadi_collection_sync", I18N_NOOP( "&Synchronize Folder" ), I18N_NOOP( "Synchronize" ), "view-refresh", Qt::Key_F5, SLOT(slotSynchronizeCollection()), NormalAction },
91 { "akonadi_collection_properties", I18N_NOOP( "Folder &Properties" ), I18N_NOOP( "Properties" ), "configure", 0, SLOT(slotCollectionProperties()), NormalAction },
93 { "akonadi_paste", I18N_NOOP( "&Paste" ), I18N_NOOP( "Paste" ), "edit-paste", Qt::CTRL + Qt::Key_V, SLOT(slotPaste()), NormalAction },
94 { "akonadi_item_delete", 0, 0, "edit-delete", Qt::Key_Delete, SLOT(slotDeleteItems()), NormalAction },
95 { "akonadi_manage_local_subscriptions", I18N_NOOP( "Manage Local &Subscriptions..." ), I18N_NOOP( "Manage Local Subscriptions" ), "folder-bookmarks", 0, SLOT(slotLocalSubscription()), NormalAction },
96 { "akonadi_collection_add_to_favorites", I18N_NOOP( "Add to Favorite Folders" ), I18N_NOOP( "Add to Favorite" ), "bookmark-new", 0, SLOT(slotAddToFavorites()), NormalAction },
97 { "akonadi_collection_remove_from_favorites", I18N_NOOP( "Remove from Favorite Folders" ), I18N_NOOP( "Remove from Favorite" ), "edit-delete", 0, SLOT(slotRemoveFromFavorites()), NormalAction },
98 { "akonadi_collection_rename_favorite", I18N_NOOP( "Rename Favorite..." ), I18N_NOOP( "Rename" ), "edit-rename", 0, SLOT(slotRenameFavorite()), NormalAction },
99 { "akonadi_collection_copy_to_menu", I18N_NOOP( "Copy Folder To..." ), I18N_NOOP( "Copy To" ), "edit-copy", 0, SLOT(slotCopyCollectionTo(QAction*)), MenuAction },
100 { "akonadi_item_copy_to_menu", I18N_NOOP( "Copy Item To..." ), I18N_NOOP( "Copy To" ), "edit-copy", 0, SLOT(slotCopyItemTo(QAction*)), MenuAction },
101 { "akonadi_item_move_to_menu", I18N_NOOP( "Move Item To..." ), I18N_NOOP( "Move To" ), "go-jump", 0, SLOT(slotMoveItemTo(QAction*)), MenuAction },
102 { "akonadi_collection_move_to_menu", I18N_NOOP( "Move Folder To..." ), I18N_NOOP( "Move To" ), "go-jump", 0, SLOT(slotMoveCollectionTo(QAction*)), MenuAction },
103 { "akonadi_item_cut", I18N_NOOP( "&Cut Item" ), I18N_NOOP( "Cut" ), "edit-cut", Qt::CTRL + Qt::Key_X, SLOT(slotCutItems()), NormalAction },
104 { "akonadi_collection_cut", I18N_NOOP( "&Cut Folder" ), I18N_NOOP( "Cut" ), "edit-cut", Qt::CTRL + Qt::Key_X, SLOT(slotCutCollections()), NormalAction },
105 { "akonadi_resource_create", I18N_NOOP( "Create Resource" ), 0, "folder-new", 0, SLOT(slotCreateResource()), NormalAction },
106 { "akonadi_resource_delete", I18N_NOOP( "Delete Resource" ), 0, "edit-delete", 0, SLOT(slotDeleteResource()), NormalAction },
107 { "akonadi_resource_properties", I18N_NOOP( "&Resource Properties" ), I18N_NOOP( "Properties" ), "configure", 0, SLOT(slotResourceProperties()), NormalAction },
108 { "akonadi_resource_synchronize", I18N_NOOP( "Synchronize Resource" ), I18N_NOOP( "Synchronize" ), "view-refresh", 0, SLOT(slotSynchronizeResource()), NormalAction },
109 { "akonadi_work_offline", I18N_NOOP( "Work Offline" ), 0, "user-offline", 0, SLOT(slotToggleWorkOffline(bool)), ToggleAction },
110 { "akonadi_collection_copy_to_dialog", I18N_NOOP( "Copy Folder To..." ), I18N_NOOP( "Copy To" ), "edit-copy", 0, SLOT(slotCopyCollectionTo()), NormalAction },
111 { "akonadi_collection_move_to_dialog", I18N_NOOP( "Move Folder To..." ), I18N_NOOP( "Move To" ), "go-jump", 0, SLOT(slotMoveCollectionTo()), NormalAction },
112 { "akonadi_item_copy_to_dialog", I18N_NOOP( "Copy Item To..." ), I18N_NOOP( "Copy To" ), "edit-copy", 0, SLOT(slotCopyItemTo()), NormalAction },
113 { "akonadi_item_move_to_dialog", I18N_NOOP( "Move Item To..." ), I18N_NOOP( "Move To" ), "go-jump", 0, SLOT(slotMoveItemTo()), NormalAction },
114 { "akonadi_collection_sync_recursive", I18N_NOOP( "&Synchronize Folder Recursively" ), I18N_NOOP( "Synchronize Recursively" ), "view-refresh", Qt::CTRL + Qt::Key_F5, SLOT(slotSynchronizeCollectionRecursive()), NormalAction },
115 { "akonadi_move_collection_to_trash", I18N_NOOP( "&Move Folder To Trash" ), I18N_NOOP( "Move Folder To Trash" ), "user-trash", 0, SLOT(slotMoveCollectionToTrash()), NormalAction },
116 { "akonadi_move_item_to_trash", I18N_NOOP( "&Move Item To Trash" ), I18N_NOOP( "Move Item To Trash" ), "user-trash", 0, SLOT(slotMoveItemToTrash()), NormalAction },
117 { "akonadi_restore_collection_from_trash", I18N_NOOP( "&Restore Folder From Trash" ), I18N_NOOP( "Restore Folder From Trash" ), "view-refresh", 0, SLOT(slotRestoreCollectionFromTrash()), NormalAction },
118 { "akonadi_restore_item_from_trash", I18N_NOOP( "&Restore Item From Trash" ), I18N_NOOP( "Restore Item From Trash" ), "view-refresh", 0, SLOT(slotRestoreItemFromTrash()), NormalAction },
119 { "akonadi_collection_trash_restore", I18N_NOOP( "&Restore Folder From Trash" ), I18N_NOOP( "Restore Folder From Trash" ), "user-trash", 0, SLOT(slotTrashRestoreCollection()), ActionWithAlternative },
120 { 0, I18N_NOOP( "&Restore Collection From Trash" ), I18N_NOOP( "Restore Collection From Trash" ), "view-refresh", 0, 0, ActionAlternative },
121 { "akonadi_item_trash_restore", I18N_NOOP( "&Restore Item From Trash" ), I18N_NOOP( "Restore Item From Trash" ), "user-trash", 0, SLOT(slotTrashRestoreItem()), ActionWithAlternative },
122 { 0, I18N_NOOP( "&Restore Item From Trash" ), I18N_NOOP( "Restore Item From Trash" ), "view-refresh", 0, 0, ActionAlternative },
123 { "akonadi_collection_sync_favorite_folders", I18N_NOOP( "&Synchronize Favorite Folders" ), I18N_NOOP( "Synchronize Favorite Folders" ), "view-refresh", Qt::CTRL+Qt::SHIFT+Qt::Key_L , SLOT(slotSynchronizeFavoriteCollections()), NormalAction }
126 static const int numStandardActionData = sizeof standardActionData / sizeof *standardActionData;
168 // try harder for selected rows that don't span the full row for some reason (e.g. due to buggy column adding proxy models etc)
246 setContextText( StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText,
248 setContextText( StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle,
251 setContextText( StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxText,
254 setContextText( StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxTitle,
256 setContextText( StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText,
258 setContextText( StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle,
261 setContextText( StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle,
274 setContextText( StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogTitle,
276 setContextText( StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogText,
283 setContextText( StandardActionManager::CreateResource, StandardActionManager::ErrorMessageTitle,
313 //get rid of the submenus, they are re-created in enableAction. clear() is not enough, doesn't remove the submenu object instances.
339 const StandardActionManager::Type type = static_cast<StandardActionManager::Type>( menu->property( "actionType" ).toInt() );
341 QWeakPointer<RecentCollectionAction> recentCollection = new RecentCollectionAction( collectionSelectionModel->model(), menu );
360 QWeakPointer<RecentCollectionAction> recentCollection = new RecentCollectionAction( collectionSelectionModel->model(), menu );
386 * The same action is stored at the ActionWithAlternative indexes as well as the corresponding ActionAlternative indexes in the actions array.
389 if ( ( standardActionData[type].actionType == ActionWithAlternative ) || ( standardActionData[type].actionType == ActionAlternative ) ) {
427 if ( actions[type] && pluralLabels.contains( type ) && !pluralLabels.value( type ).isEmpty() ) {
469 const Collection parentCollection = index.data( EntityTreeModel::ParentCollectionRole ).value<Collection>();
485 const Collection parentCollection = index.data( EntityTreeModel::ParentCollectionRole ).value<Collection>();
494 enableAction( StandardActionManager::SynchronizeFavoriteCollections, (favoritesModel->rowCount() > 0));
506 QItemSelection mapToEntityTreeModel( const QAbstractItemModel *model, const QItemSelection &selection ) const
516 QItemSelection mapFromEntityTreeModel( const QAbstractItemModel *model, const QItemSelection &selection ) const
527 // RAII class for setting insideSelectionSlot to true on entering, and false on exiting, the two slots below.
570 collectionSelectionModel->select( selection, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows );
572 // Also set the current index. This will trigger KMMainWidget::slotFolderChanged in kmail, which we want.
573 collectionSelectionModel->setCurrentIndex( selection.indexes().first(), QItemSelectionModel::NoUpdate );
586 const Collection parentCollection = index.data( CollectionModel::CollectionRole ).value<Collection>();
592 QString name = KInputDialog::getText( contextText( StandardActionManager::CreateCollection, StandardActionManager::DialogTitle ),
617 const QStringList mts = actions[StandardActionManager::CreateCollection]->property( "ContentMimeTypes" ).toStringList();
643 const Collection collection = index.data( CollectionModel::CollectionRole ).value<Collection>();
659 const QString text = contextText( StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxText,
663 contextText( StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxTitle, collections.count(), collectionName ),
797 Akonadi::AgentInstance instance = Akonadi::AgentManager::self()->instance( collection.resource() );
799 if ( KMessageBox::questionYesNo( parentWidget, i18n( "Before syncing folder \"%1\" it is necessary to have the resource online. Do you want to make it online?" , collection.name() ), i18n( "Account \"%1\" is offline", instance.name() ) ) != KMessageBox::Yes )
833 const Collection collection = index.data( CollectionModel::CollectionRole ).value<Collection>();
836 const QString displayName = collection.hasAttribute<EntityDisplayAttribute>() ? collection.attribute<EntityDisplayAttribute>()->displayName()
839 CollectionPropertiesDialog* dlg = new CollectionPropertiesDialog( collection, mCollectionPropertiesPageNames, parentWidget );
840 dlg->setCaption( contextText( StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle,displayName ) );
867 QAbstractItemModel *model = const_cast<QAbstractItemModel *>( collectionSelectionModel->model() );
869 model->dropMimeData( mimeData, isCutAction( mimeData ) ? Qt::MoveAction : Qt::CopyAction, -1, -1, index );
900 contextText( StandardActionManager::DeleteItems, StandardActionManager::MessageBoxText, items.count(), QString() ),
901 contextText( StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle, items.count(), QString() ),
927 const Collection collection = index.data( CollectionModel::CollectionRole ).value<Collection>();
946 const Collection collection = index.data( CollectionModel::CollectionRole ).value<Collection>();
964 const Collection collection = index.data( CollectionModel::CollectionRole ).value<Collection>();
967 const QString displayName = collection.hasAttribute<EntityDisplayAttribute>() ? collection.attribute<EntityDisplayAttribute>()->displayName() : collection.name();
969 RenameFavoriteDialog dlg(contextText( StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogTitle ),contextText( StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogText ) , favoritesModel->favoriteLabel( collection ), displayName, parentWidget );
990 pasteTo( collectionSelectionModel, collectionSelectionModel->model(), CopyCollectionToMenu, Qt::CopyAction );
995 pasteTo( itemSelectionModel, collectionSelectionModel->model(), CopyItemToMenu, Qt::CopyAction );
1000 pasteTo( collectionSelectionModel, collectionSelectionModel->model(), MoveCollectionToMenu, Qt::MoveAction );
1005 pasteTo( itemSelectionModel, collectionSelectionModel->model(), MoveItemToMenu, Qt::MoveAction );
1038 const Collection collection = index.data( CollectionModel::CollectionRole ).value<Collection>();
1063 dlg.setCaption( contextText( StandardActionManager::CreateResource, StandardActionManager::DialogTitle ) );
1090 contextText( StandardActionManager::DeleteResources, StandardActionManager::MessageBoxText, instances.count(), instances.first().name() ),
1091 contextText( StandardActionManager::DeleteResources, StandardActionManager::MessageBoxTitle, instances.count(), instances.first().name() ),
1130 void pasteTo( QItemSelectionModel *selectionModel, const QAbstractItemModel *model, StandardActionManager::Type type, Qt::DropAction dropAction )
1143 const QModelIndex index = EntityTreeModel::modelIndexForCollection( collectionSelectionModel->model(), dlg.selectedCollection() );
1147 const QMimeData *mimeData = selectionModel->model()->mimeData( safeSelectedRows( selectionModel ) );
1154 void pasteTo( QItemSelectionModel *selectionModel, QAction *action, Qt::DropAction dropAction )
1162 const QMimeData *mimeData = selectionModel->model()->mimeData( selectionModel->selectedRows() );
1168 const Collection collection = index.data( EntityTreeModel::CollectionRole ).value<Collection>();
1175 QMapIterator<StandardActionManager::Type, QWeakPointer<RecentCollectionAction> > item(mRecentCollectionsMenu);
1188 contextText( StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText, job->errorString() ),
1189 contextText( StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle ) );
1197 contextText( StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText, job->errorString() ),
1198 contextText( StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle ) );
1206 contextText( StandardActionManager::MoveCollectionsToTrash, StandardActionManager::ErrorMessageText, job->errorString() ),
1207 contextText( StandardActionManager::MoveCollectionsToTrash, StandardActionManager::ErrorMessageTitle ) );
1215 contextText( StandardActionManager::MoveItemsToTrash, StandardActionManager::ErrorMessageText, job->errorString() ),
1216 contextText( StandardActionManager::MoveItemsToTrash, StandardActionManager::ErrorMessageTitle ) );
1224 contextText( StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText, job->errorString() ),
1233 contextText( StandardActionManager::CreateResource, StandardActionManager::ErrorMessageText, job->errorString() ),
1234 contextText( StandardActionManager::CreateResource, StandardActionManager::ErrorMessageTitle ) );
1242 contextText( StandardActionManager::Paste, StandardActionManager::ErrorMessageText, job->errorString() ),
1256 const bool isCollectionAction = ( type == CopyCollectionToMenu || type == MoveCollectionToMenu );
1267 const Collection collection = index.data( EntityTreeModel::CollectionRole ).value<Collection>();
1270 mimeTypes = AgentManager::self()->instance( collection.resource() ).type().mimeTypes().toSet();
1280 bool isWritableTargetCollectionForMimeTypes( const Collection &collection, const QSet<QString> &mimeTypes, StandardActionManager::Type type ) const
1286 const bool isCollectionAction = ( type == CopyCollectionToMenu || type == MoveCollectionToMenu );
1288 const bool canContainRequiredMimeTypes = !collection.contentMimeTypes().toSet().intersect( mimeTypes ).isEmpty();
1292 const bool canContainCollections = collection.contentMimeTypes().contains( Collection::mimeType() );
1293 const bool resourceAllowsRequiredMimeTypes = AgentManager::self()->instance( collection.resource() ).type().mimeTypes().toSet().contains( mimeTypes );
1295 const bool isReadOnlyForItems = (isItemAction && (!canCreateNewItems || !canContainRequiredMimeTypes));
1296 const bool isReadOnlyForCollections = (isCollectionAction && (!canCreateNewCollections || !canContainCollections || !resourceAllowsRequiredMimeTypes));
1298 return !(CollectionUtils::isStructural( collection ) || isReadOnlyForItems || isReadOnlyForCollections);
1301 void fillFoldersMenu( const Akonadi::Collection::List& selectedCollectionsList, const QSet<QString>& mimeTypes, StandardActionManager::Type type, QMenu *menu,
1308 const Collection collection = model->data( index, CollectionModel::CollectionRole ).value<Collection>();
1334 QAction *action = popup->addAction( moveAction ? i18n( "Move to This Folder" ) : i18n( "Copy to This Folder" ) );
1358 while ( const QAbstractProxyModel *proxy = qobject_cast<const QAbstractProxyModel*>( favModel ) ) {
1366 while ( const QAbstractProxyModel *proxy = qobject_cast<const QAbstractProxyModel*>( model ) ) {
1375 while ( const QAbstractProxyModel *proxy = qobject_cast<const QAbstractProxyModel*>( model ) ) {
1387 mimeData->setData( QLatin1String( "application/x-kde.akonadi-cutselection" ), cutSelectionData);
1392 const QByteArray data = mimeData->data( QLatin1String( "application/x-kde.akonadi-cutselection" ) );
1399 void setContextText( StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &data )
1407 void setContextText( StandardActionManager::Type type, StandardActionManager::TextContext context, const KLocalizedString &data )
1415 QString contextText( StandardActionManager::Type type, StandardActionManager::TextContext context ) const
1420 QString contextText( StandardActionManager::Type type, StandardActionManager::TextContext context, const QString& value ) const
1430 QString contextText( StandardActionManager::Type type, StandardActionManager::TextContext context, int count, const QString &value ) const
1472 QMap<StandardActionManager::Type, QWeakPointer<RecentCollectionAction> > mRecentCollectionsMenu;
1486 connect( QApplication::clipboard(), SIGNAL(changed(QClipboard::Mode)), SLOT(clipboardChanged(QClipboard::Mode)) );
1495 void StandardActionManager::setCollectionSelectionModel( QItemSelectionModel * selectionModel )
1511 void StandardActionManager::setFavoriteCollectionsModel( FavoriteCollectionsModel *favoritesModel )
1540 createAction(static_cast<Type>(type+1)); //ensure that alternative actions are initialized when not created by createAllActions
1600 if ( ( standardActionData[type].actionType == ActionWithAlternative ) && (standardActionData[type+1].actionType == ActionAlternative)) {
1601 createAction(static_cast<Type>(type+1)); //ensure that alternative actions are initialized when not created by createAllActions
1649 const Collection collection = index.data( EntityTreeModel::CollectionRole ).value<Collection>();
1673 void StandardActionManager::setContextText( Type type, TextContext context, const QString &text )
1678 void StandardActionManager::setContextText( Type type, TextContext context, const KLocalizedString &text )
Moves the selected items to trash and marks them as deleted, needs EntityDeletedAttribute.
Definition: standardactionmanager.h:163
TextContext
Describes the text context that can be customized.
Definition: standardactionmanager.h:177
void configure(QWidget *parent=0)
Triggers the agent instance to show its configuration dialog.
Definition: agentinstance.cpp:106
void synchronizeCollection(const Collection &collection)
Trigger a synchronization of the given collection by its owning resource agent.
Definition: agentmanager.cpp:412
void setCapabilityFilter(const QStringList &capabilities)
Sets the capability filter that will be used when creating new resources.
Menu allowing to move item into a collection.
Definition: standardactionmanager.h:148
AgentInstance::List instances() const
Returns the list of all available agent instances.
Definition: agentmanager.cpp:397
Creates an collection.
Definition: standardactionmanager.h:134
Moves the selected collection to trash and marks it as deleted, needs EntityDeletedAttribute.
Definition: standardactionmanager.h:162
The window title of an error message.
Definition: standardactionmanager.h:183
Copies the selected items.
Definition: standardactionmanager.h:139
void setCollectionSelectionModel(QItemSelectionModel *selectionModel)
Sets the collection selection model based on which the collection related actions should operate...
void createActionFolderMenu(QMenu *menu, Type type)
Create a popup menu.
void setMimeTypeFilter(const QStringList &mimeTypes)
Sets the mime type filter that will be used when creating new resources.
Manages generic actions for collection and item views.
Definition: standardactionmanager.h:126
void synchronize()
Triggers the agent instance to start synchronization.
Definition: agentinstance.cpp:111
QString displayName() const
Returns the name that should be used for display.
Definition: entitydisplayattribute.cpp:49
void configure(QWidget *parent=0)
Setup the job to show agent configuration dialog once the agent instance has been successfully starte...
Definition: agentinstancecreatejob.cpp:165
void setFavoriteCollectionsModel(FavoriteCollectionsModel *favoritesModel)
Sets the favorite collections model based on which the collection relatedactions should operate...
Cuts the selected items.
Definition: standardactionmanager.h:150
void setItemSelectionModel(QItemSelectionModel *selectionModel)
Sets the item selection model based on which the item related actions should operate.
Akonadi::Item::List selectedItems() const
Returns the list of items that are currently selected.
Can create new subcollections in this collection.
Definition: collection.h:92
void removeInstance(const AgentInstance &instance)
Removes the given agent instance.
Definition: agentmanager.cpp:407
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: entity.cpp:196
KAction * action(Type type) const
Returns the action of the given type, 0 if it has not been created (yet).
void setName(const QString &name)
Sets the i18n'ed name of the collection.
Definition: collection.cpp:85
Toggles the work offline state of all resources.
Definition: standardactionmanager.h:156
Job that deletes items from the Akonadi storage.
Definition: itemdeletejob.h:62
Paste collections or items.
Definition: standardactionmanager.h:140
void interceptAction(Type type, bool intercept=true)
Sets whether the default implementation for the given action type shall be executed when the action i...
KAction * createAction(Type type)
Creates the action of the given type and adds it to the action collection specified in the constructo...
Provides collection properties.
Definition: standardactionmanager.h:138
AgentInstance instance(const QString &identifier) const
Returns the agent instance with the given identifier or an invalid agent instance if the identifier d...
Definition: agentmanager.cpp:402
void showHiddenCollection(bool showHidden)
Definition: subscriptiondialog.cpp:160
void setIsOnline(bool online)
Sets online status of the agent instance.
Definition: agentinstance.cpp:101
void setActionText(Type type, const KLocalizedString &text)
Sets the label of the action type to text, which is used during updating the action state and substit...
bool isValid() const
Returns whether the agent instance object is valid.
Definition: agentinstance.cpp:45
The window title of a message box.
Definition: standardactionmanager.h:180
bool isOnline() const
Returns whether the agent instance is online currently.
Definition: agentinstance.cpp:96
Akonadi::Collection::List selectedCollections() const
Returns the list of collections that are currently selected.
Can create new items in this collection.
Definition: collection.h:89
void createAllActions()
Convenience method to create all standard actions.
Menu allowing to quickly copy a collection into another collection.
Definition: standardactionmanager.h:146
Job that deletes a collection in the Akonadi storage.
Definition: collectiondeletejob.h:63
The parent collection of the entity.
Definition: entitytreemodel.h:340
~StandardActionManager()
Destroys the standard action manager.
Rights rights() const
Returns the rights the user has on the collection.
Definition: collection.cpp:91
static QModelIndex modelIndexForCollection(const QAbstractItemModel *model, const Collection &collection)
Returns a QModelIndex in model which points to collection.
Definition: entitytreemodel.cpp:1194
Cuts the selected collections.
Definition: standardactionmanager.h:151
void setContextText(Type type, TextContext context, const QString &text)
Sets the text of the action type for the given context.
Job for creating new agent instances.
Definition: agentinstancecreatejob.h:71
The window title of a dialog.
Definition: standardactionmanager.h:178
An Attribute that marks that an entity was marked as deleted.
Definition: entitydeletedattribute.h:51
Menu allowing to quickly copy an item into a collection.
Definition: standardactionmanager.h:147
A helper class to manage action states.
Definition: actionstatemanager_p.h:35
The actual collection object.
Definition: collectionmodel.h:66
Synchronizes the selected resources.
Definition: standardactionmanager.h:155
void setFavoriteSelectionModel(QItemSelectionModel *selectionModel)
Sets the favorite collection selection model based on which the favorite collection related actions s...
Deletes the selected resources.
Definition: standardactionmanager.h:153
Copies the selected collections.
Definition: standardactionmanager.h:135
QString name() const
Returns the user visible name of the agent instance.
Definition: agentinstance.cpp:66
bool hasAttribute(const QByteArray &name) const
Returns true if the entity has an attribute of the given type name, false otherwise.
Definition: entity.cpp:147
A dialog to select an available agent type.
Definition: agenttypedialog.h:53
QStringList contentMimeTypes() const
Returns a list of possible content mimetypes, e.g.
Definition: collection.cpp:107
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: agentmanager.cpp:378
The text of a message box.
Definition: standardactionmanager.h:181
The text of a dialog.
Definition: standardactionmanager.h:179
Job that creates a new collection in the Akonadi storage.
Definition: collectioncreatejob.h:52
Creates a new resource.
Definition: standardactionmanager.h:152
QString resource() const
Returns the identifier of the resource owning the collection.
Definition: collection.cpp:194
void setCollectionPropertiesPageNames(const QStringList &names)
Sets the page names of the config pages that will be used by the built-in collection properties dialo...
A generic and extensible dialog for collection properties.
Definition: collectionpropertiesdialog.h:54
Synchronizes collections.
Definition: standardactionmanager.h:137
StandardActionManager(KActionCollection *actionCollection, QWidget *parent=0)
Creates a new standard action manager.
The text of an error message.
Definition: standardactionmanager.h:184
Attribute that stores the properties that are used to display an entity.
Definition: entitydisplayattribute.h:39
void setContentMimeTypes(const QStringList &types)
Sets the list of possible content mime types.
Definition: collection.cpp:112
Deletes the selected items.
Definition: standardactionmanager.h:141
Deletes the selected collections.
Definition: standardactionmanager.h:136
bool isVirtual() const
Returns whether the collection is virtual, for example a search collection.
Definition: collection.cpp:248
Menu allowing to move a collection into another collection.
Definition: standardactionmanager.h:149
A model that lists a set of favorite collections.
Definition: favoritecollectionsmodel.h:65
Rename the collection of the favorite collections model.
Definition: standardactionmanager.h:145
Synchronize favorite collections.
Definition: standardactionmanager.h:170
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri May 2 2014 05:18:20 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri May 2 2014 05:18:20 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.