akonadi
standardactionmanager.cpp
89 { "akonadi_collection_create", I18N_NOOP("&New Folder..."), I18N_NOOP("New"), "folder-new", 0, SLOT(slotCreateCollection()), NormalAction },
91 { "akonadi_collection_delete", I18N_NOOP("&Delete Folder"), I18N_NOOP("Delete"), "edit-delete", 0, SLOT(slotDeleteCollection()), NormalAction },
92 { "akonadi_collection_sync", I18N_NOOP("&Synchronize Folder"), I18N_NOOP("Synchronize"), "view-refresh", Qt::Key_F5, SLOT(slotSynchronizeCollection()), NormalAction },
93 { "akonadi_collection_properties", I18N_NOOP("Folder &Properties"), I18N_NOOP("Properties"), "configure", 0, SLOT(slotCollectionProperties()), NormalAction },
95 { "akonadi_paste", I18N_NOOP("&Paste"), I18N_NOOP("Paste"), "edit-paste", Qt::CTRL + Qt::Key_V, SLOT(slotPaste()), NormalAction },
96 { "akonadi_item_delete", 0, 0, "edit-delete", Qt::Key_Delete, SLOT(slotDeleteItems()), NormalAction },
97 { "akonadi_manage_local_subscriptions", I18N_NOOP("Manage Local &Subscriptions..."), I18N_NOOP("Manage Local Subscriptions"), "folder-bookmarks", 0, SLOT(slotLocalSubscription()), NormalAction },
98 { "akonadi_collection_add_to_favorites", I18N_NOOP("Add to Favorite Folders"), I18N_NOOP("Add to Favorite"), "bookmark-new", 0, SLOT(slotAddToFavorites()), NormalAction },
99 { "akonadi_collection_remove_from_favorites", I18N_NOOP("Remove from Favorite Folders"), I18N_NOOP("Remove from Favorite"), "edit-delete", 0, SLOT(slotRemoveFromFavorites()), NormalAction },
100 { "akonadi_collection_rename_favorite", I18N_NOOP("Rename Favorite..."), I18N_NOOP("Rename"), "edit-rename", 0, SLOT(slotRenameFavorite()), NormalAction },
101 { "akonadi_collection_copy_to_menu", I18N_NOOP("Copy Folder To..."), I18N_NOOP("Copy To"), "edit-copy", 0, SLOT(slotCopyCollectionTo(QAction*)), MenuAction },
102 { "akonadi_item_copy_to_menu", I18N_NOOP("Copy Item To..."), I18N_NOOP("Copy To"), "edit-copy", 0, SLOT(slotCopyItemTo(QAction*)), MenuAction },
103 { "akonadi_item_move_to_menu", I18N_NOOP("Move Item To..."), I18N_NOOP("Move To"), "go-jump", 0, SLOT(slotMoveItemTo(QAction*)), MenuAction },
104 { "akonadi_collection_move_to_menu", I18N_NOOP("Move Folder To..."), I18N_NOOP("Move To"), "go-jump", 0, SLOT(slotMoveCollectionTo(QAction*)), MenuAction },
105 { "akonadi_item_cut", I18N_NOOP("&Cut Item"), I18N_NOOP("Cut"), "edit-cut", Qt::CTRL + Qt::Key_X, SLOT(slotCutItems()), NormalAction },
106 { "akonadi_collection_cut", I18N_NOOP("&Cut Folder"), I18N_NOOP("Cut"), "edit-cut", Qt::CTRL + Qt::Key_X, SLOT(slotCutCollections()), NormalAction },
107 { "akonadi_resource_create", I18N_NOOP("Create Resource"), 0, "folder-new", 0, SLOT(slotCreateResource()), NormalAction },
108 { "akonadi_resource_delete", I18N_NOOP("Delete Resource"), 0, "edit-delete", 0, SLOT(slotDeleteResource()), NormalAction },
109 { "akonadi_resource_properties", I18N_NOOP("&Resource Properties"), I18N_NOOP("Properties"), "configure", 0, SLOT(slotResourceProperties()), NormalAction },
110 { "akonadi_resource_synchronize", I18N_NOOP("Synchronize Resource"), I18N_NOOP("Synchronize"), "view-refresh", 0, SLOT(slotSynchronizeResource()), NormalAction },
111 { "akonadi_work_offline", I18N_NOOP("Work Offline"), 0, "user-offline", 0, SLOT(slotToggleWorkOffline(bool)), ToggleAction },
112 { "akonadi_collection_copy_to_dialog", I18N_NOOP("Copy Folder To..."), I18N_NOOP("Copy To"), "edit-copy", 0, SLOT(slotCopyCollectionTo()), NormalAction },
113 { "akonadi_collection_move_to_dialog", I18N_NOOP("Move Folder To..."), I18N_NOOP("Move To"), "go-jump", 0, SLOT(slotMoveCollectionTo()), NormalAction },
114 { "akonadi_item_copy_to_dialog", I18N_NOOP("Copy Item To..."), I18N_NOOP("Copy To"), "edit-copy", 0, SLOT(slotCopyItemTo()), NormalAction },
115 { "akonadi_item_move_to_dialog", I18N_NOOP("Move Item To..."), I18N_NOOP("Move To"), "go-jump", 0, SLOT(slotMoveItemTo()), NormalAction },
116 { "akonadi_collection_sync_recursive", I18N_NOOP("&Synchronize Folder Recursively"), I18N_NOOP("Synchronize Recursively"), "view-refresh", Qt::CTRL + Qt::Key_F5, SLOT(slotSynchronizeCollectionRecursive()), NormalAction },
117 { "akonadi_move_collection_to_trash", I18N_NOOP("&Move Folder To Trash"), I18N_NOOP("Move Folder To Trash"), "user-trash", 0, SLOT(slotMoveCollectionToTrash()), NormalAction },
118 { "akonadi_move_item_to_trash", I18N_NOOP("&Move Item To Trash"), I18N_NOOP("Move Item To Trash"), "user-trash", 0, SLOT(slotMoveItemToTrash()), NormalAction },
119 { "akonadi_restore_collection_from_trash", I18N_NOOP("&Restore Folder From Trash"), I18N_NOOP("Restore Folder From Trash"), "view-refresh", 0, SLOT(slotRestoreCollectionFromTrash()), NormalAction },
120 { "akonadi_restore_item_from_trash", I18N_NOOP("&Restore Item From Trash"), I18N_NOOP("Restore Item From Trash"), "view-refresh", 0, SLOT(slotRestoreItemFromTrash()), NormalAction },
121 { "akonadi_collection_trash_restore", I18N_NOOP("&Restore Folder From Trash"), I18N_NOOP("Restore Folder From Trash"), "user-trash", 0, SLOT(slotTrashRestoreCollection()), ActionWithAlternative },
122 { 0, I18N_NOOP("&Restore Collection From Trash"), I18N_NOOP("Restore Collection From Trash"), "view-refresh", 0, 0, ActionAlternative },
123 { "akonadi_item_trash_restore", I18N_NOOP("&Restore Item From Trash"), I18N_NOOP("Restore Item From Trash"), "user-trash", 0, SLOT(slotTrashRestoreItem()), ActionWithAlternative },
124 { 0, I18N_NOOP("&Restore Item From Trash"), I18N_NOOP("Restore Item From Trash"), "view-refresh", 0, 0, ActionAlternative },
125 { "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 }
128 static const int numStandardActionData = sizeof standardActionData / sizeof * standardActionData;
176 // 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)
254 setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText,
256 setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle,
262 setContextText(StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxTitle,
264 setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText,
266 setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle,
282 setContextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogTitle,
284 setContextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogText,
322 //get rid of the submenus, they are re-created in enableAction. clear() is not enough, doesn't remove the submenu object instances.
351 const StandardActionManager::Type type = static_cast<StandardActionManager::Type>(menu->property("actionType").toInt());
353 QWeakPointer<RecentCollectionAction> recentCollection = new RecentCollectionAction(type, selectedCollectionsList, collectionSelectionModel->model(), menu);
371 new RecentCollectionAction(type, Akonadi::Collection::List(), collectionSelectionModel->model(), menu);
396 * The same action is stored at the ActionWithAlternative indexes as well as the corresponding ActionAlternative indexes in the actions array.
399 if ((standardActionData[type].actionType == ActionWithAlternative) || (standardActionData[type].actionType == ActionAlternative)) {
485 const Collection parentCollection = index.data(EntityTreeModel::ParentCollectionRole).value<Collection>();
502 const Collection parentCollection = index.data(EntityTreeModel::ParentCollectionRole).value<Collection>();
511 enableAction(StandardActionManager::SynchronizeFavoriteCollections, (favoritesModel->rowCount() > 0));
525 QItemSelection mapToEntityTreeModel(const QAbstractItemModel *model, const QItemSelection &selection) const
535 QItemSelection mapFromEntityTreeModel(const QAbstractItemModel *model, const QItemSelection &selection) const
546 // RAII class for setting insideSelectionSlot to true on entering, and false on exiting, the two slots below.
596 collectionSelectionModel->select(selection, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
598 // Also set the current index. This will trigger KMMainWidget::slotFolderChanged in kmail, which we want.
599 collectionSelectionModel->setCurrentIndex(selection.indexes().first(), QItemSelectionModel::NoUpdate);
613 const Collection parentCollection = index.data(CollectionModel::CollectionRole).value<Collection>();
620 QString name = KInputDialog::getText(contextText(StandardActionManager::CreateCollection, StandardActionManager::DialogTitle),
646 const QStringList mts = actions[StandardActionManager::CreateCollection]->property("ContentMimeTypes").toStringList();
696 const QString text = contextText(StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxText,
700 contextText(StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxTitle, collections.count(), collectionName),
854 Akonadi::AgentInstance instance = Akonadi::AgentManager::self()->instance(collection.resource());
857 i18n("Before syncing folder \"%1\" it is necessary to have the resource online. Do you want to make it online?", collection.displayName()),
859 KGuiItem(i18nc("@action:button", "Go Online")), KStandardGuiItem::cancel()) != KMessageBox::Yes) {
901 CollectionPropertiesDialog *dlg = new CollectionPropertiesDialog(collection, mCollectionPropertiesPageNames, parentWidget);
902 dlg->setCaption(contextText(StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle, collection.displayName()));
930 QAbstractItemModel *model = const_cast<QAbstractItemModel *>(collectionSelectionModel->model());
932 model->dropMimeData(mimeData, isCutAction(mimeData) ? Qt::MoveAction : Qt::CopyAction, -1, -1, index);
964 contextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxText, items.count(), QString()),
965 contextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle, items.count(), QString()),
1035 QPointer<RenameFavoriteDialog> dlg(new RenameFavoriteDialog(contextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogTitle), contextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogText) , favoritesModel->favoriteLabel(collection), collection.displayName(), parentWidget));
1056 pasteTo(collectionSelectionModel, collectionSelectionModel->model(), CopyCollectionToMenu, Qt::CopyAction);
1061 pasteTo(itemSelectionModel, collectionSelectionModel->model(), CopyItemToMenu, Qt::CopyAction);
1066 pasteTo(collectionSelectionModel, collectionSelectionModel->model(), MoveCollectionToMenu, Qt::MoveAction);
1071 pasteTo(itemSelectionModel, collectionSelectionModel->model(), MoveItemToMenu, Qt::MoveAction);
1131 dlg->setCaption(contextText(StandardActionManager::CreateResource, StandardActionManager::DialogTitle));
1162 contextText(StandardActionManager::DeleteResources, StandardActionManager::MessageBoxText, instances.count(), instances.first().name()),
1163 contextText(StandardActionManager::DeleteResources, StandardActionManager::MessageBoxTitle, instances.count(), instances.first().name()),
1206 void pasteTo(QItemSelectionModel *selectionModel, const QAbstractItemModel *model, StandardActionManager::Type type, Qt::DropAction dropAction)
1220 const QModelIndex index = EntityTreeModel::modelIndexForCollection(collectionSelectionModel->model(), dlg->selectedCollection());
1225 const QMimeData *mimeData = selectionModel->model()->mimeData(safeSelectedRows(selectionModel));
1255 QMapIterator<StandardActionManager::Type, QWeakPointer<RecentCollectionAction> > item(mRecentCollectionsMenu);
1268 contextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText, job->errorString()),
1269 contextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle));
1277 contextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText, job->errorString()),
1278 contextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle));
1286 contextText(StandardActionManager::MoveCollectionsToTrash, StandardActionManager::ErrorMessageText, job->errorString()),
1287 contextText(StandardActionManager::MoveCollectionsToTrash, StandardActionManager::ErrorMessageTitle));
1295 contextText(StandardActionManager::MoveItemsToTrash, StandardActionManager::ErrorMessageText, job->errorString()),
1296 contextText(StandardActionManager::MoveItemsToTrash, StandardActionManager::ErrorMessageTitle));
1304 contextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText, job->errorString()),
1313 contextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageText, job->errorString()),
1322 contextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageText, job->errorString()),
1336 const bool isCollectionAction = (type == CopyCollectionToMenu || type == MoveCollectionToMenu);
1361 bool isWritableTargetCollectionForMimeTypes(const Collection &collection, const QSet<QString> &mimeTypes, StandardActionManager::Type type) const
1368 const bool isCollectionAction = (type == CopyCollectionToMenu || type == MoveCollectionToMenu);
1370 const bool canContainRequiredMimeTypes = !collection.contentMimeTypes().toSet().intersect(mimeTypes).isEmpty();
1374 const bool canContainCollections = collection.contentMimeTypes().contains(Collection::mimeType()) || collection.contentMimeTypes().contains(Collection::virtualMimeType());
1375 const bool resourceAllowsRequiredMimeTypes = AgentManager::self()->instance(collection.resource()).type().mimeTypes().toSet().contains(mimeTypes);
1377 const bool isReadOnlyForItems = (isItemAction && (!canCreateNewItems || !canContainRequiredMimeTypes));
1378 const bool isReadOnlyForCollections = (isCollectionAction && (!canCreateNewCollections || !canContainCollections || !resourceAllowsRequiredMimeTypes));
1380 return !(CollectionUtils::isStructural(collection) || isReadOnlyForItems || isReadOnlyForCollections);
1383 void fillFoldersMenu(const Akonadi::Collection::List &selectedCollectionsList, const QSet<QString> &mimeTypes, StandardActionManager::Type type, QMenu *menu,
1390 const Collection collection = model->data(index, CollectionModel::CollectionRole).value<Collection>();
1421 QAction *action = popup->addAction( moveAction ? i18n( "Move to This Folder" ) : i18n( "Copy to This Folder" ) );
1446 while (const QAbstractProxyModel *proxy = qobject_cast<const QAbstractProxyModel *>(favModel)) {
1481 const QByteArray data = mimeData->data(QLatin1String("application/x-kde.akonadi-cutselection"));
1489 void setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &data)
1497 void setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const KLocalizedString &data)
1505 QString contextText(StandardActionManager::Type type, StandardActionManager::TextContext context) const
1510 QString contextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &value) const
1520 QString contextText(StandardActionManager::Type type, StandardActionManager::TextContext context, int count, const QString &value) const
1563 QMap<StandardActionManager::Type, QWeakPointer<RecentCollectionAction> > mRecentCollectionsMenu;
1568 StandardActionManager::StandardActionManager(KActionCollection *actionCollection, QWidget *parent)
1576 connect(QApplication::clipboard(), SIGNAL(changed(QClipboard::Mode)), SLOT(clipboardChanged(QClipboard::Mode)));
1601 void StandardActionManager::setFavoriteCollectionsModel(FavoriteCollectionsModel *favoritesModel)
1631 createAction(static_cast<Type>(type + 1)); //ensure that alternative actions are initialized when not created by createAllActions
1692 if ((standardActionData[type].actionType == ActionWithAlternative) && (standardActionData[type + 1].actionType == ActionAlternative)) {
1693 createAction(static_cast<Type>(type + 1)); //ensure that alternative actions are initialized when not created by createAllActions
1772 void StandardActionManager::setContextText(Type type, TextContext context, const QString &text)
1777 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
QModelIndexList indexes() const
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:105
qlonglong toLongLong(bool *ok) const
void synchronizeCollection(const Collection &collection)
Trigger a synchronization of the given collection by its owning resource agent.
Definition: agentmanager.cpp:411
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
virtual int rowCount(const QModelIndex &parent) const =0
QByteArray data(const QString &mimeType) const
AgentInstance::List instances() const
Returns the list of all available agent instances.
Definition: agentmanager.cpp:396
Creates an collection.
Definition: standardactionmanager.h:134
int bottom() const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
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
QString displayName() const
Returns the display name (EntityDisplayAttribute::displayName()) if set, and Collection::name() other...
Definition: collection.cpp:86
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...
const QMimeData * mimeData(Mode mode) const
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
char at(int i) const
void synchronize()
Triggers the agent instance to start synchronization.
Definition: agentinstance.cpp:110
QVariant data() const
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...
bool contains(const QString &str, Qt::CaseSensitivity cs) const
bool isEmpty() const
static QString virtualMimeType()
Returns the mimetype used for virtual collections.
Definition: collection.cpp:202
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.
T value() const
virtual QItemSelection mapSelectionFromSource(const QItemSelection &sourceSelection) const
Can create new subcollections in this collection.
Definition: collection.h:92
QSet< T > toSet() const
void removeInstance(const AgentInstance &instance)
Removes the given agent instance.
Definition: agentmanager.cpp:406
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: entity.cpp:194
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:93
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 setVirtual(bool isVirtual)
Sets whether the collection is virtual or not.
Definition: collection.cpp:266
const char * name() const
bool isValid() const
int top() const
int count(const T &value) const
QString fromUtf8(const char *str, int size)
void interceptAction(Type type, bool intercept=true)
Sets whether the default implementation for the given action type shall be executed when the action i...
QString & insert(int position, QChar ch)
QVariant property(const char *name) const
int toInt(bool *ok) const
KAction * createAction(Type type)
Creates the action of the given type and adds it to the action collection specified in the constructo...
QClipboard * clipboard()
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:401
void showHiddenCollection(bool showHidden)
Definition: subscriptiondialog.cpp:186
void setIsOnline(bool online)
Sets online status of the agent instance.
Definition: agentinstance.cpp:100
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...
virtual QItemSelection mapSelectionToSource(const QItemSelection &proxySelection) const
const QItemSelection selection() const
bool isEmpty() const
void setObjectName(const QString &name)
bool isEmpty() const
bool isValid() const
Returns whether the agent instance object is valid.
Definition: agentinstance.cpp:45
bool isEmpty() const
QString trimmed() const
QModelIndexList selectedRows(int column) const
The window title of a message box.
Definition: standardactionmanager.h:180
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
bool isOnline() const
Returns whether the agent instance is online currently.
Definition: agentinstance.cpp:95
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.
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
QModelIndex parent() const
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
virtual QVariant data(const QModelIndex &index, int role) const =0
T & first()
The parent collection of the entity.
Definition: entitytreemodel.h:341
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
void setMimeData(QMimeData *src, Mode mode)
~StandardActionManager()
Destroys the standard action manager.
Rights rights() const
Returns the rights the user has on the collection.
Definition: collection.cpp:99
static QModelIndex modelIndexForCollection(const QAbstractItemModel *model, const Collection &collection)
Returns a QModelIndex in model which points to collection.
Definition: entitytreemodel.cpp:1238
void setData(const QVariant &userData)
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.
bool contains(QChar ch, Qt::CaseSensitivity cs) const
bool contains(const T &value) const
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
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:49
QString & replace(int position, int n, QChar after)
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
QAbstractItemModel * sourceModel() const
void setFavoriteSelectionModel(QItemSelectionModel *selectionModel)
Sets the favorite collection selection model based on which the favorite collection related actions s...
const QAbstractItemModel * model() const
Deletes the selected resources.
Definition: standardactionmanager.h:153
Definition: kcolumnfilterproxymodel_p.h:27
QVariant data(int role) const
int left() const
Copies the selected collections.
Definition: standardactionmanager.h:135
QString name() const
Returns the user visible name of the agent instance.
Definition: agentinstance.cpp:65
int count() const
bool hasAttribute(const QByteArray &name) const
Returns true if the entity has an attribute of the given type name, false otherwise.
Definition: entity.cpp:148
void clear(Mode mode)
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:115
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: agentmanager.cpp:377
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
QList< T > toList() const
QString fromLatin1(const char *str, int size)
const QAbstractItemModel * model() const
The text of a message box.
Definition: standardactionmanager.h:181
The text of a dialog.
Definition: standardactionmanager.h:179
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Job that creates a new collection in the Akonadi storage.
Definition: collectioncreatejob.h:52
Creates a new resource.
Definition: standardactionmanager.h:152
void setData(const QString &mimeType, const QByteArray &data)
QString resource() const
Returns the identifier of the resource owning the collection.
Definition: collection.cpp:207
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
bool isValid() const
StandardActionManager(KActionCollection *actionCollection, QWidget *parent=0)
Creates a new standard action manager.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString toString() const
const QAbstractItemModel * model() const
The text of an error message.
Definition: standardactionmanager.h:184
void setContentMimeTypes(const QStringList &types)
Sets the list of possible content mime types.
Definition: collection.cpp:120
Deletes the selected items.
Definition: standardactionmanager.h:141
Deletes the selected collections.
Definition: standardactionmanager.h:136
void setEnabled(bool)
bool isVirtual() const
Returns whether the collection is virtual, for example a search collection.
Definition: collection.cpp:261
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:66
Rename the collection of the favorite collections model.
Definition: standardactionmanager.h:145
Synchronize favorite collections.
Definition: standardactionmanager.h:170
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.