Akonadi Calendar
standardcalendaractionmanager.cpp
26 StandardCalendarActionManagerPrivate(KActionCollection *actionCollection, QWidget *parentWidget, StandardCalendarActionManager *parent)
32 mParent->connect(mGenericManager, &StandardActionManager::actionStateUpdated, mParent, &StandardCalendarActionManager::actionStateUpdated);
46 mGenericManager->action(Akonadi::StandardActionManager::CreateCollection)->setText(i18n("Add Folder…"));
49 mGenericManager->setContextText(StandardActionManager::CreateCollection, StandardActionManager::DialogTitle, i18nc("@title:window", "New Folder"));
60 QStringList() << QStringLiteral("inode/directory") << QStringLiteral("application/x-vnd.akonadi.calendar.todo")
66 mGenericManager->setActionText(Akonadi::StandardActionManager::CopyCollections, ki18np("Copy Folder", "Copy %1 Folders"));
71 mGenericManager->setActionText(Akonadi::StandardActionManager::DeleteCollections, ki18np("Delete Folder", "Delete %1 Folders"));
93 mGenericManager->setActionText(Akonadi::StandardActionManager::SynchronizeCollections, ki18np("Update Folder", "Update %1 Folders"));
99 mGenericManager->setActionText(Akonadi::StandardActionManager::CutCollections, ki18np("Cut Folder", "Cut %1 Folders"));
100 mGenericManager->action(Akonadi::StandardActionManager::CutCollections)->setWhatsThis(i18n("Cut the selected calendar folders from the calendar."));
103 mGenericManager->action(Akonadi::StandardActionManager::CollectionProperties)->setText(i18n("Folder Properties…"));
111 mGenericManager->setActionText(Akonadi::StandardActionManager::CopyItems, ki18np("Copy Event", "Copy %1 Events"));
112 mGenericManager->action(Akonadi::StandardActionManager::CopyItems)->setWhatsThis(i18n("Copy the selected events to the clipboard."));
116 mGenericManager->setActionText(Akonadi::StandardActionManager::DeleteItems, ki18np("Delete Event", "Delete %1 Events"));
117 mGenericManager->action(Akonadi::StandardActionManager::DeleteItems)->setWhatsThis(i18n("Delete the selected events from the calendar."));
120 ki18np("Do you really want to delete the selected event?", "Do you really want to delete %1 events?"));
126 mGenericManager->setContextText(StandardActionManager::DeleteItems, StandardActionManager::ErrorMessageText, ki18n("Could not delete event: %1"));
134 mGenericManager->setActionText(Akonadi::StandardActionManager::CutItems, ki18np("Cut Event", "Cut %1 Events"));
135 mGenericManager->action(Akonadi::StandardActionManager::CutItems)->setWhatsThis(i18n("Cut the selected events from the calendar."));
138 mGenericManager->action(Akonadi::StandardActionManager::CreateResource)->setText(i18n("Add &Calendar…"));
143 mGenericManager->setContextText(StandardActionManager::CreateResource, StandardActionManager::DialogTitle, i18nc("@title:window", "Add Calendar"));
156 mGenericManager->setActionText(Akonadi::StandardActionManager::DeleteResources, ki18np("&Delete Calendar", "&Delete %1 Calendars"));
163 ki18np("Do you really want to delete this calendar?", "Do you really want to delete %1 calendars?"));
171 mGenericManager->action(Akonadi::StandardActionManager::ResourceProperties)->setText(i18n("Calendar Properties…"));
177 mGenericManager->setActionText(Akonadi::StandardActionManager::SynchronizeResources, ki18np("Update Calendar", "Update %1 Calendars"));
182 mGenericManager->action(Akonadi::StandardActionManager::CopyItemToMenu)->setText(i18n("&Copy to Calendar"));
183 mGenericManager->action(Akonadi::StandardActionManager::CopyItemToMenu)->setWhatsThis(i18n("Copy the selected event to a different calendar."));
186 mGenericManager->action(Akonadi::StandardActionManager::MoveItemToMenu)->setText(i18n("&Move to Calendar"));
187 mGenericManager->action(Akonadi::StandardActionManager::MoveItemToMenu)->setWhatsThis(i18n("Move the selected event to a different calendar."));
190 mGenericManager->setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageText, ki18n("Could not paste event: %1"));
192 mGenericManager->setContextText(StandardActionManager::Paste, StandardActionManager::ErrorMessageTitle, i18nc("@title:window", "Paste Failed"));
195 mGenericManager->action(Akonadi::StandardActionManager::SynchronizeCollectionTree)->setText(i18n("Update Available Calendars"));
196 mGenericManager->action(Akonadi::StandardActionManager::SynchronizeCollectionTree)->setWhatsThis(i18n("Updates the tree of available calendars."));
248 const auto collection = index.data(Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
250 if (collection.contentMimeTypes().contains(mimeType) && (collection.rights() & Akonadi::Collection::CanCreateItem)) {
299 mGenericManager->setActionText(Akonadi::StandardActionManager::CopyItems, ki18np("Copy Event", "Copy %1 Events"));
310 mGenericManager->setActionText(Akonadi::StandardActionManager::DeleteItems, ki18np("Delete Event", "Delete %1 Events"));
313 mGenericManager->setActionText(Akonadi::StandardActionManager::CutItems, ki18np("Cut Event", "Cut %1 Events"));
329 mGenericManager->setActionText(Akonadi::StandardActionManager::CopyItems, ki18np("Copy To-do", "Copy %1 To-dos"));
340 mGenericManager->setActionText(Akonadi::StandardActionManager::DeleteItems, ki18np("Delete To-do", "Delete %1 To-dos"));
343 mGenericManager->setActionText(Akonadi::StandardActionManager::CutItems, ki18np("Cut To-do", "Cut %1 To-dos"));
359 mGenericManager->setActionText(Akonadi::StandardActionManager::CopyItems, ki18np("Copy Journal", "Copy %1 Journals"));
370 mGenericManager->setActionText(Akonadi::StandardActionManager::DeleteItems, ki18np("Delete Journal", "Delete %1 Journals"));
373 mGenericManager->setActionText(Akonadi::StandardActionManager::CutItems, ki18np("Cut Journal", "Cut %1 Journals"));
416 const auto parentCollection = index.data(EntityTreeModel::ParentCollectionRole).value<Collection>();
477Akonadi::StandardCalendarActionManager::StandardCalendarActionManager(KActionCollection *actionCollection, QWidget *parent)
485void StandardCalendarActionManager::setCollectionSelectionModel(QItemSelectionModel *selectionModel)
616void StandardCalendarActionManager::setActionText(StandardActionManager::Type type, const KLocalizedString &text)
621void StandardCalendarActionManager::interceptAction(StandardCalendarActionManager::Type type, bool intercept)
630void StandardCalendarActionManager::interceptAction(StandardActionManager::Type type, bool intercept)
645void StandardCalendarActionManager::setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &text)
650void StandardCalendarActionManager::setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const KLocalizedString &text)
CanCreateItem
CanChangeItem
ParentCollectionRole
CollectionRole
MimeTypeRole
bool hasPayload() const
bool isValid() const
void setActionText(Type type, const KLocalizedString &text)
void actionStateUpdated()
Akonadi::Item::List selectedItems() const
void setCapabilityFilter(const QStringList &capabilities)
void setMimeTypeFilter(const QStringList &mimeTypes)
CreateResource
CreateCollection
MoveToTrashRestoreItem
SynchronizeResources
RemoveFromFavoriteCollections
DeleteItems
CopyCollectionToDialog
SynchronizeCollections
MoveCollectionToDialog
CopyItemToMenu
RenameFavoriteCollection
SynchronizeFavoriteCollections
ResourceProperties
DeleteCollections
MoveToTrashRestoreCollection
ToggleWorkOffline
ManageLocalSubscriptions
CutCollections
CopyCollectionToMenu
MoveItemToMenu
AddToFavoriteCollections
SynchronizeCollectionsRecursive
SynchronizeCollectionTree
MoveItemsToTrash
CopyCollections
CollectionProperties
MoveToTrashRestoreCollectionAlternative
DeleteResources
RestoreItemsFromTrash
MoveToTrashRestoreItemAlternative
RestoreCollectionsFromTrash
MoveCollectionToMenu
MoveItemToDialog
CopyItemToDialog
MoveCollectionsToTrash
void setContextText(Type type, TextContext context, const KLocalizedString &text)
QAction * action(Type type) const
TextContext
MessageBoxText
ErrorMessageText
MessageBoxTitle
DialogTitle
ErrorMessageTitle
Manages calendar specific actions for collection and item views.
Definition standardcalendaractionmanager.h:40
void createAllActions()
Convenience method to create all standard actions.
Definition standardcalendaractionmanager.cpp:593
void actionStateUpdated()
This signal is emitted whenever the action state has been updated.
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 standardcalendaractionmanager.cpp:621
void setContextText(StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &text)
Sets the text of the action type for the given context.
Definition standardcalendaractionmanager.cpp:645
StandardCalendarActionManager(KActionCollection *actionCollection, QWidget *parent=nullptr)
Creates a new standard calendar action manager.
Definition standardcalendaractionmanager.cpp:477
Akonadi::Collection::List selectedCollections() const
Returns the list of collections that are currently selected.
Definition standardcalendaractionmanager.cpp:635
void setActionText(StandardActionManager::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 standardcalendaractionmanager.cpp:616
Akonadi::Item::List selectedItems() const
Returns the list of items that are currently selected.
Definition standardcalendaractionmanager.cpp:640
QAction * action(Type type) const
Returns the action of the given type, 0 if it has not been created (yet).
Definition standardcalendaractionmanager.cpp:606
~StandardCalendarActionManager() override
Destroys the standard calendar action manager.
QAction * createAction(Type type)
Creates the action of the given type and adds it to the action collection specified in the constructo...
Definition standardcalendaractionmanager.cpp:514
void setCollectionSelectionModel(QItemSelectionModel *selectionModel)
Sets the collection selection model based on which the collection related actions should operate.
Definition standardcalendaractionmanager.cpp:485
@ EditIncidence
Edit currently selected event/todo/journal.
Definition standardcalendaractionmanager.h:51
void setItemSelectionModel(QItemSelectionModel *selectionModel)
Sets the item selection model based on which the item related actions should operate.
Definition standardcalendaractionmanager.cpp:502
static QLatin1String eventMimeType()
static QLatin1String journalMimeType()
static QLatin1String todoMimeType()
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...)
FreeBusyManager::Singleton.
KCALUTILS_EXPORT QString mimeType()
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
void setEnabled(bool)
void setIcon(const QIcon &icon)
void setText(const QString &text)
void triggered(bool checked)
void setWhatsThis(const QString &what)
T value(const Key &key) const const
QIcon fromTheme(const QString &name)
QAbstractItemModel * model()
QModelIndexList selectedRows(int column) const const
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
const_reference at(qsizetype i) const const
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 setProperty(const char *name, QVariant &&value)
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:14:27 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:14:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.