Akonadi
standardactionmanager.cpp
78 {"akonadi_collection_create", kli18n("&New Folder..."), kli18n("New"), "folder-new", nullptr, QKeySequence(), SLOT(slotCreateCollection()), NormalAction},
111 {"akonadi_item_copy", KLazyLocalizedString(), KLazyLocalizedString(), "edit-copy", nullptr, 0, SLOT(slotCopyItems()), NormalAction},
112 {"akonadi_paste", kli18n("&Paste"), kli18n("Paste"), "edit-paste", nullptr, Qt::CTRL | Qt::Key_V, SLOT(slotPaste()), NormalAction},
113 {"akonadi_item_delete", KLazyLocalizedString(), KLazyLocalizedString(), "edit-delete", nullptr, 0, SLOT(slotDeleteItems()), NormalAction},
178 {"akonadi_item_cut", kli18n("&Cut Item"), kli18n("Cut"), "edit-cut", nullptr, Qt::CTRL | Qt::Key_X, SLOT(slotCutItems()), NormalAction},
179 {"akonadi_collection_cut", kli18n("&Cut Folder"), kli18n("Cut"), "edit-cut", nullptr, Qt::CTRL | Qt::Key_X, SLOT(slotCutCollections()), NormalAction},
236 {"akonadi_item_copy_to_dialog", kli18n("Copy Item To..."), kli18n("Copy To"), "edit-copy", nullptr, QKeySequence(), SLOT(slotCopyItemTo()), NormalAction},
237 {"akonadi_item_move_to_dialog", kli18n("Move Item To..."), kli18n("Move To"), "edit-move", "go-jump", QKeySequence(), SLOT(slotMoveItemTo()), NormalAction},
302 {nullptr, kli18n("&Restore Item From Trash"), kli18n("Restore Item From Trash"), "view-refresh", nullptr, QKeySequence(), nullptr, ActionAlternative},
326 return QIcon::fromTheme(QString::fromLatin1(data.icon), QIcon::fromTheme(QString::fromLatin1(data.altIcon)));
331static_assert(numStandardActionData == StandardActionManager::LastType, "StandardActionData table does not match StandardActionManager types");
361 // 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)
398 pluralLabels.insert(StandardActionManager::CopyCollections, ki18np("&Copy Folder", "&Copy %1 Folders"));
400 pluralLabels.insert(StandardActionManager::CutItems, ki18ncp("@action", "&Cut Item", "&Cut %1 Items"));
401 pluralLabels.insert(StandardActionManager::CutCollections, ki18ncp("@action", "&Cut Folder", "&Cut %1 Folders"));
402 pluralLabels.insert(StandardActionManager::DeleteItems, ki18np("&Delete Item", "&Delete %1 Items"));
403 pluralLabels.insert(StandardActionManager::DeleteCollections, ki18ncp("@action", "&Delete Folder", "&Delete %1 Folders"));
404 pluralLabels.insert(StandardActionManager::SynchronizeCollections, ki18ncp("@action", "&Synchronize Folder", "&Synchronize %1 Folders"));
405 pluralLabels.insert(StandardActionManager::DeleteResources, ki18np("&Delete Resource", "&Delete %1 Resources"));
406 pluralLabels.insert(StandardActionManager::SynchronizeResources, ki18np("&Synchronize Resource", "&Synchronize %1 Resources"));
408 pluralIconLabels.insert(StandardActionManager::CopyCollections, ki18np("Copy Folder", "Copy %1 Folders"));
409 pluralIconLabels.insert(StandardActionManager::CopyItems, ki18np("Copy Item", "Copy %1 Items"));
411 pluralIconLabels.insert(StandardActionManager::CutCollections, ki18np("Cut Folder", "Cut %1 Folders"));
412 pluralIconLabels.insert(StandardActionManager::DeleteItems, ki18np("Delete Item", "Delete %1 Items"));
413 pluralIconLabels.insert(StandardActionManager::DeleteCollections, ki18np("Delete Folder", "Delete %1 Folders"));
414 pluralIconLabels.insert(StandardActionManager::SynchronizeCollections, ki18np("Synchronize Folder", "Synchronize %1 Folders"));
415 pluralIconLabels.insert(StandardActionManager::DeleteResources, ki18ncp("@action", "Delete Resource", "Delete %1 Resources"));
416 pluralIconLabels.insert(StandardActionManager::SynchronizeResources, ki18ncp("@action", "Synchronize Resource", "Synchronize %1 Resources"));
418 setContextText(StandardActionManager::CreateCollection, StandardActionManager::DialogTitle, i18nc("@title:window", "New Folder"));
419 setContextText(StandardActionManager::CreateCollection, StandardActionManager::DialogText, i18nc("@label:textbox name of Akonadi folder", "Name"));
420 setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText, ki18n("Could not create folder: %1"));
421 setContextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Folder Creation Failed"));
426 ki18np("Do you really want to delete this folder and all its sub-folders?", "Do you really want to delete %1 folders and all their sub-folders?"));
430 setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText, ki18n("Could not delete folder: %1"));
431 setContextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Folder Deletion Failed"));
433 setContextText(StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle, ki18nc("@title:window", "Properties of Folder %1"));
437 ki18np("Do you really want to delete the selected item?", "Do you really want to delete %1 items?"));
438 setContextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle, ki18ncp("@title:window", "Delete Item?", "Delete Items?"));
439 setContextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText, ki18n("Could not delete item: %1"));
440 setContextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Item Deletion Failed"));
442 setContextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogTitle, i18nc("@title:window", "Rename Favorite"));
443 setContextText(StandardActionManager::RenameFavoriteCollection, StandardActionManager::DialogText, i18nc("@label:textbox name of the folder", "Name:"));
445 setContextText(StandardActionManager::CreateResource, StandardActionManager::DialogTitle, i18nc("@title:window", "New Resource"));
446 setContextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageText, ki18n("Could not create resource: %1"));
447 setContextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Resource Creation Failed"));
451 ki18np("Do you really want to delete this resource?", "Do you really want to delete %1 resources?"));
456 setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageText, ki18n("Could not paste data: %1"));
457 setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Paste Failed"));
482 // get rid of the submenus, they are re-created in enableAction. clear() is not enough, doesn't remove the submenu object instances.
496 q->connect(menu, SIGNAL(triggered(QAction *)), standardActionData[type].slot); // clazy:exclude=old-style-connect
513 const StandardActionManager::Type type = static_cast<StandardActionManager::Type>(menu->property("actionType").toInt());
515 QPointer<RecentCollectionAction> recentCollection = new RecentCollectionAction(type, selectedCollectionsList, collectionSelectionModel->model(), menu);
518 fillFoldersMenu(selectedCollectionsList, mimeTypes, type, menu, collectionSelectionModel->model(), QModelIndex());
523 if (type == StandardActionManager::CopyCollectionToMenu || type == StandardActionManager::CopyItemToMenu
524 || type == StandardActionManager::MoveItemToMenu || type == StandardActionManager::MoveCollectionToMenu) {
525 new RecentCollectionAction(type, Akonadi::Collection::List(), collectionSelectionModel->model(), menu);
528 fillFoldersMenu(selectedCollectionsList, mimeTypes, type, menu, collectionSelectionModel->model(), QModelIndex());
545 * The same action is stored at the ActionWithAlternative indexes as well as the corresponding ActionAlternative indexes in the actions array.
548 if ((standardActionData[type].actionType == ActionWithAlternative) || (standardActionData[type].actionType == ActionAlternative)) {
584 void updatePluralLabel(StandardActionManager::Type type, int count) // private slot, called by ActionStateManager
592 bool isFavoriteCollection(const Akonadi::Collection &collection) const // private slot, called by ActionStateManager
632 const auto parentCollection = index.data(EntityTreeModel::ParentCollectionRole).value<Collection>();
672 const auto parentCollection = index.data(EntityTreeModel::ParentCollectionRole).value<Collection>();
679 mActionStateManager.updateState(selectedCollectionsList, selectedFavoriteCollectionsList, selectedItems);
681 enableAction(StandardActionManager::SynchronizeFavoriteCollections, (favoritesModel->rowCount() > 0));
683 Q_EMIT q->selectionsChanged(selectedCollectionsList, selectedFavoriteCollectionsList, selectedItems);
696 QItemSelection mapToEntityTreeModel(const QAbstractItemModel *model, const QItemSelection &selection) const
706 QItemSelection mapFromEntityTreeModel(const QAbstractItemModel *model, const QItemSelection &selection) const
717 // RAII class for setting insideSelectionSlot to true on entering, and false on exiting, the two slots below.
770 collectionSelectionModel->select(selection, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
772 // Also set the current index. This will trigger KMMainWidget::slotFolderChanged in kmail, which we want.
774 collectionSelectionModel->setCurrentIndex(selection.indexes().first(), QItemSelectionModel::NoUpdate);
809 KMessageBox::error(parentWidget, i18n("We can not add \"/\" in folder name."), i18nc("@title:window", "Create New Folder Error"));
813 KMessageBox::error(parentWidget, i18n("We can not add \".\" at begin or end of folder name."), i18nc("@title:window", "Create New Folder Error"));
821 const QStringList mts = actions[StandardActionManager::CreateCollection]->property("ContentMimeTypes").toStringList();
874 const QString text = contextText(StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxText, collections.count(), collectionName);
879 contextText(StandardActionManager::DeleteCollections, StandardActionManager::MessageBoxTitle, collections.count(), collectionName),
1048 Akonadi::AgentInstance instance = Akonadi::AgentManager::self()->instance(collection.resource());
1052 i18n("Before syncing folder \"%1\" it is necessary to have the resource online. Do you want to make it online?", collection.displayName()),
1054 KGuiItem(i18nc("@action:button", "Go Online"), QIcon::fromTheme(QStringLiteral("user-online"))),
1098 auto dlg = new CollectionPropertiesDialog(collection, mCollectionPropertiesPageNames, parentWidget);
1099 dlg->setWindowTitle(contextText(StandardActionManager::CollectionProperties, StandardActionManager::DialogTitle, collection.displayName()));
1129 model->dropMimeData(mimeData, isCutAction(mimeData) ? Qt::MoveAction : Qt::CopyAction, -1, -1, index);
1166 contextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxText, items.count(), QString()),
1167 contextText(StandardActionManager::DeleteItems, StandardActionManager::MessageBoxTitle, items.count(), QString()),
1243 new RenameFavoriteDialog(favoritesModel->favoriteLabel(collection), favoritesModel->defaultFavoriteLabel(collection), parentWidget));
1265 pasteTo(collectionSelectionModel, collectionSelectionModel->model(), StandardActionManager::CopyCollectionToMenu, Qt::CopyAction);
1270 pasteTo(itemSelectionModel, collectionSelectionModel->model(), StandardActionManager::CopyItemToMenu, Qt::CopyAction);
1275 pasteTo(collectionSelectionModel, collectionSelectionModel->model(), StandardActionManager::MoveCollectionToMenu, Qt::MoveAction);
1280 pasteTo(itemSelectionModel, collectionSelectionModel->model(), StandardActionManager::MoveItemToMenu, Qt::MoveAction);
1340 dlg->setWindowTitle(contextText(StandardActionManager::CreateResource, StandardActionManager::DialogTitle));
1374 contextText(StandardActionManager::DeleteResources, StandardActionManager::MessageBoxText, instances.count(), instances.first().name()),
1375 contextText(StandardActionManager::DeleteResources, StandardActionManager::MessageBoxTitle, instances.count(), instances.first().name()),
1425 void pasteTo(QItemSelectionModel *selectionModel, const QAbstractItemModel *model, StandardActionManager::Type type, Qt::DropAction dropAction)
1432 if (type == StandardActionManager::CopyItemToMenu || type == StandardActionManager::MoveItemToMenu) {
1434 } else if (type == StandardActionManager::CopyCollectionToMenu || type == StandardActionManager::MoveCollectionToMenu) {
1439 const QModelIndex index = EntityTreeModel::modelIndexForCollection(collectionSelectionModel->model(), dlg->selectedCollection());
1445 const QMimeData *mimeData = selectionModel->model()->mimeData(safeSelectedRows(selectionModel));
1477 QMapIterator<StandardActionManager::Type, QPointer<RecentCollectionAction>> item(mRecentCollectionsMenu);
1490 contextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageText, job->errorString()),
1491 contextText(StandardActionManager::CreateCollection, StandardActionManager::ErrorMessageTitle));
1499 contextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageText, job->errorString()),
1500 contextText(StandardActionManager::DeleteCollections, StandardActionManager::ErrorMessageTitle));
1508 contextText(StandardActionManager::MoveCollectionsToTrash, StandardActionManager::ErrorMessageText, job->errorString()),
1509 contextText(StandardActionManager::MoveCollectionsToTrash, StandardActionManager::ErrorMessageTitle));
1517 contextText(StandardActionManager::MoveItemsToTrash, StandardActionManager::ErrorMessageText, job->errorString()),
1518 contextText(StandardActionManager::MoveItemsToTrash, StandardActionManager::ErrorMessageTitle));
1526 contextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText, job->errorString()),
1535 contextText(StandardActionManager::CreateResource, StandardActionManager::ErrorMessageText, job->errorString()),
1544 contextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageText, job->errorString()),
1557 const bool isItemAction = (type == StandardActionManager::CopyItemToMenu || type == StandardActionManager::MoveItemToMenu);
1558 const bool isCollectionAction = (type == StandardActionManager::CopyCollectionToMenu || type == StandardActionManager::MoveCollectionToMenu);
1574 const auto mimeTypesResult = AgentManager::self()->instance(collection.resource()).type().mimeTypes();
1585 bool isWritableTargetCollectionForMimeTypes(const Collection &collection, const QSet<QString> &mimeTypes, StandardActionManager::Type type) const
1591 const bool isItemAction = (type == StandardActionManager::CopyItemToMenu || type == StandardActionManager::MoveItemToMenu);
1592 const bool isCollectionAction = (type == StandardActionManager::CopyCollectionToMenu || type == StandardActionManager::MoveCollectionToMenu);
1595 const QSet<QString> contentMimeTypesSet = QSet<QString>(contentMimeTypesList.cbegin(), contentMimeTypesList.cend());
1602 collection.contentMimeTypes().contains(Collection::mimeType()) || collection.contentMimeTypes().contains(Collection::virtualMimeType());
1604 const auto mimeTypesList{AgentManager::self()->instance(collection.resource()).type().mimeTypes()};
1605 const QSet<QString> mimeTypesListSet = QSet<QString>(mimeTypesList.cbegin(), mimeTypesList.cend());
1608 const bool isReadOnlyForItems = (isItemAction && (!canCreateNewItems || !canContainRequiredMimeTypes));
1609 const bool isReadOnlyForCollections = (isCollectionAction && (!canCreateNewCollections || !canContainCollections || !resourceAllowsRequiredMimeTypes));
1611 return !(CollectionUtils::isStructural(collection) || isReadOnlyForItems || isReadOnlyForCollections);
1625 const auto collection = model->data(index, EntityTreeModel::CollectionRole).value<Collection>();
1645 const bool moveAction = (type == StandardActionManager::MoveCollectionToMenu || type == StandardActionManager::MoveItemToMenu);
1655 QAction *action = popup->addAction(moveAction ? i18n("Move to This Folder") : i18n("Copy to This Folder"));
1717 const QByteArray data = mimeData->data(QStringLiteral("application/x-kde.akonadi-cutselection"));
1725 void setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &data)
1733 void setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const KLocalizedString &data)
1741 QString contextText(StandardActionManager::Type type, StandardActionManager::TextContext context) const
1746 QString contextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &value) const
1756 QString contextText(StandardActionManager::Type type, StandardActionManager::TextContext context, int count, const QString &value) const
1804StandardActionManager::StandardActionManager(KActionCollection *actionCollection, QWidget *parent)
1838void StandardActionManager::setFavoriteCollectionsModel(FavoriteCollectionsModel *favoritesModel)
1869 createAction(static_cast<Type>(type + 1)); // ensure that alternative actions are initialized when not created by createAllActions
1895 d->actionCollection->setDefaultShortcut(action, QKeySequence(standardActionData[type].shortcut));
1904 connect(action, SIGNAL(triggered()), standardActionData[type].slot); // clazy:exclude=old-style-connect
1908 connect(actionMenu->menu(), SIGNAL(triggered(QAction *)), standardActionData[type].slot); // clazy:exclude=old-style-connect
1912 connect(action, SIGNAL(triggered(bool)), standardActionData[type].slot); // clazy:exclude=old-style-connect
1922 disconnect(action, SIGNAL(triggered(bool)), this, standardActionData[type].slot); // clazy:exclude=old-style-connect
1924 connect(action, SIGNAL(triggered(bool)), this, standardActionData[type].slot); // clazy:exclude=old-style-connect
1933 if ((standardActionData[type].actionType == ActionWithAlternative) && (standardActionData[type + 1].actionType == ActionAlternative)) {
1934 createAction(static_cast<Type>(type + 1)); // ensure that alternative actions are initialized when not created by createAllActions
1971 disconnect(action, SIGNAL(triggered()), this, standardActionData[type].slot); // clazy:exclude=old-style-connect
2019void StandardActionManager::setContextText(Type type, TextContext context, const KLocalizedString &text)
Represents one agent instance and takes care of communication with it.
Definition akonadicontrol/agentinstance.h:35
Job for creating new agent instances.
Definition agentinstancecreatejob.h:62
void synchronize()
Triggers the agent instance to start synchronization.
Definition core/agentinstance.cpp:97
void setIsOnline(bool online)
Sets online status of the agent instance.
Definition core/agentinstance.cpp:87
void synchronizeCollectionTree()
Triggers a synchronization of the collection tree by the given agent instance.
Definition core/agentinstance.cpp:102
bool isOnline() const
Returns whether the agent instance is online currently.
QString name() const
Returns the user visible name of the agent instance.
Definition core/agentinstance.cpp:52
static AgentManager * self()
Returns the global instance of the agent manager.
Definition core/agentmanager.cpp:362
AgentInstance instance(const QString &identifier) const
Returns the agent instance with the given identifier or an invalid agent instance if the identifier d...
Definition core/agentmanager.cpp:392
Job that creates a new collection in the Akonadi storage.
Definition collectioncreatejob.h:41
Job that deletes a collection in the Akonadi storage.
Definition collectiondeletejob.h:47
A generic and extensible dialog for collection properties.
Definition collectionpropertiesdialog.h:43
void setVirtual(bool isVirtual)
Sets whether the collection is virtual or not.
Definition collection.cpp:352
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition collection.cpp:204
bool hasAttribute(const QByteArray &name) const
Returns true if the collection has an attribute of the given type name, false otherwise.
Definition collection.cpp:161
static QString virtualMimeType()
Returns the mimetype used for virtual collections.
Definition collection.cpp:297
void setName(const QString &name)
Sets the i18n'ed name of the collection.
Definition collection.cpp:221
void setContentMimeTypes(const QStringList &types)
Sets the list of possible content mime types.
Definition collection.cpp:245
An Attribute that marks that an entity was marked as deleted.
Definition entitydeletedattribute.h:35
static QModelIndex modelIndexForCollection(const QAbstractItemModel *model, const Collection &collection)
Returns a QModelIndex in model which points to collection.
Definition entitytreemodel.cpp:1069
A model that lists a set of favorite collections.
Definition favoritecollectionsmodel.h:53
Manages generic actions for collection and item views.
Definition standardactionmanager.h:117
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...
Definition standardactionmanager.cpp:1953
Akonadi::Item::List selectedItems() const
Returns the list of items that are currently selected.
Definition standardactionmanager.cpp:1996
void setCapabilityFilter(const QStringList &capabilities)
Sets the capability filter that will be used when creating new resources.
Definition standardactionmanager.cpp:2029
void setFavoriteCollectionsModel(FavoriteCollectionsModel *favoritesModel)
Sets the favorite collections model based on which the collection relatedactions should operate.
Definition standardactionmanager.cpp:1838
void setMimeTypeFilter(const QStringList &mimeTypes)
Sets the mime type filter that will be used when creating new resources.
Definition standardactionmanager.cpp:2024
@ CopyItemToMenu
Menu allowing to quickly copy an item into a collection.
Definition standardactionmanager.h:137
@ RenameFavoriteCollection
Rename the collection of the favorite collections model.
Definition standardactionmanager.h:135
@ SynchronizeFavoriteCollections
Synchronize favorite collections.
Definition standardactionmanager.h:162
@ ToggleWorkOffline
Toggles the work offline state of all resources.
Definition standardactionmanager.h:146
@ CopyCollectionToMenu
Menu allowing to quickly copy a collection into another collection.
Definition standardactionmanager.h:136
@ MoveItemsToTrash
Moves the selected items to trash and marks them as deleted, needs EntityDeletedAttribute.
Definition standardactionmanager.h:153
@ MoveCollectionToMenu
Menu allowing to move a collection into another collection.
Definition standardactionmanager.h:139
@ MoveCollectionsToTrash
Moves the selected collection to trash and marks it as deleted, needs EntityDeletedAttribute.
Definition standardactionmanager.h:152
void addRecentCollection(Akonadi::Collection::Id id) const
Add a collection to the global recent collection list.
Definition standardactionmanager.cpp:2044
~StandardActionManager() override
Destroys the standard action manager.
void setContextText(Type type, TextContext context, const QString &text)
Sets the text of the action type for the given context.
Definition standardactionmanager.cpp:2014
void interceptAction(Type type, bool intercept=true)
Sets whether the default implementation for the given action type shall be executed when the action i...
Definition standardactionmanager.cpp:1960
void setFavoriteSelectionModel(QItemSelectionModel *selectionModel)
Sets the favorite collection selection model based on which the favorite collection related actions s...
Definition standardactionmanager.cpp:1844
void setCollectionSelectionModel(QItemSelectionModel *selectionModel)
Sets the collection selection model based on which the collection related actions should operate.
Definition standardactionmanager.cpp:1820
Akonadi::Collection::List selectedCollections() const
Returns the list of collections that are currently selected.
Definition standardactionmanager.cpp:1977
QAction * action(Type type) const
Returns the action of the given type, 0 if it has not been created (yet).
Definition standardactionmanager.cpp:1947
void setItemSelectionModel(QItemSelectionModel *selectionModel)
Sets the item selection model based on which the item related actions should operate.
Definition standardactionmanager.cpp:1830
QAction * createAction(Type type)
Creates the action of the given type and adds it to the action collection specified in the constructo...
Definition standardactionmanager.cpp:1853
StandardActionManager(KActionCollection *actionCollection, QWidget *parent=nullptr)
Creates a new standard action manager.
Definition standardactionmanager.cpp:1804
void setCollectionPropertiesPageNames(const QStringList &names)
Sets the page names of the config pages that will be used by the built-in collection properties dialo...
Definition standardactionmanager.cpp:2034
void createActionFolderMenu(QMenu *menu, Type type)
Create a popup menu.
Definition standardactionmanager.cpp:2039
void createAllActions()
Convenience method to create all standard actions.
Definition standardactionmanager.cpp:1940
virtual QString errorString() const
int error() const
void result(KJob *job)
virtual Q_SCRIPTABLE void start()=0
QString toString() const
bool isEmpty() const
KLocalizedString subs(const KLocalizedString &a, int fieldWidth=0, QChar fillChar=QLatin1Char(' ')) const
KLocalizedString KI18N_EXPORT ki18np(const char *singular, const char *plural)
KLocalizedString KI18N_EXPORT ki18n(const char *text)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KLocalizedString KI18N_EXPORT ki18ncp(const char *context, const char *singular, const char *plural)
KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text)
QString i18n(const char *text, const TYPE &arg...)
Helper integration between Akonadi and Qt.
char * toString(const EngineQuery &query)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
Dangerous
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QString name(StandardAction id)
KGuiItem cancel()
KGuiItem ok()
KGuiItem del()
QString label(StandardShortcut id)
const QList< QKeySequence > & shortcut(StandardShortcut id)
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual QMimeData * mimeData(const QModelIndexList &indexes) const const
virtual int rowCount(const QModelIndex &parent) const const=0
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
void setChecked(bool)
QVariant data() const const
void setEnabled(bool)
void setIcon(const QIcon &icon)
void setIconText(const QString &text)
void setData(const QVariant &data)
void setShortcut(const QKeySequence &shortcut)
void setText(const QString &text)
char at(qsizetype i) const const
bool isEmpty() const const
Mode
void changed(QClipboard::Mode mode)
void clear(Mode mode)
const QMimeData * mimeData(Mode mode) const const
void setMimeData(QMimeData *src, Mode mode)
Accepted
QClipboard * clipboard()
QIcon fromTheme(const QString &name)
QString getText(QWidget *parent, const QString &title, const QString &label, QLineEdit::EchoMode mode, const QString &text, bool *ok, Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
QModelIndexList indexes() const const
ClearAndSelect
QAbstractItemModel * model()
QModelIndexList selectedRows(int column) const const
const QItemSelection selection() const const
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
bool contains(const AT &value) const const
qsizetype count() const const
T & first()
bool isEmpty() const const
void reserve(qsizetype size)
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
QByteArray data(const QString &mimeType) const const
void setData(const QString &mimeType, const QByteArray &data)
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
QVariant property(const char *name) const const
T qobject_cast(QObject *object)
bool setProperty(const char *name, QVariant &&value)
bool contains(const QSet< T > &other) const const
bool intersects(const QSet< T > &other) const const
void reserve(qsizetype size)
QList< T > values() const const
qsizetype count() const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
QString fromLatin1(QByteArrayView str)
QString & insert(qsizetype position, QChar ch)
bool isEmpty() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QString trimmed() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
QueuedConnection
MoveAction
DecorationRole
typedef ItemFlags
Key_F5
CTRL
void timeout()
QVariant fromValue(T &&value)
bool isValid() const const
qlonglong toLongLong(bool *ok) const const
QModelIndex toModelIndex() const const
QString toString() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.