Akonadi
agentactionmanager.cpp
35 } agentActionData[] = {{"akonadi_agentinstance_create", kli18n("&New Agent Instance..."), "folder-new", 0, SLOT(slotCreateAgentInstance())},
36 {"akonadi_agentinstance_delete", kli18n("&Delete Agent Instance"), "edit-delete", 0, SLOT(slotDeleteAgentInstance())},
37 {"akonadi_agentinstance_configure", kli18n("&Configure Agent Instance"), "configure", 0, SLOT(slotConfigureAgentInstance())}};
40 static_assert(numAgentActionData == AgentActionManager::LastType, "agentActionData table does not match AgentActionManager types");
53 setContextText(AgentActionManager::CreateAgentInstance, AgentActionManager::DialogTitle, i18nc("@title:window", "New Agent Instance"));
55 setContextText(AgentActionManager::CreateAgentInstance, AgentActionManager::ErrorMessageText, ki18n("Could not create agent instance: %1"));
57 setContextText(AgentActionManager::CreateAgentInstance, AgentActionManager::ErrorMessageTitle, i18nc("@title:window", "Agent Instance Creation Failed"));
59 setContextText(AgentActionManager::DeleteAgentInstance, AgentActionManager::MessageBoxTitle, i18nc("@title:window", "Delete Agent Instance?"));
123 dlg->setWindowTitle(contextText(AgentActionManager::CreateAgentInstance, AgentActionManager::DialogTitle));
181 contextText(AgentActionManager::CreateAgentInstance, AgentActionManager::ErrorMessageText).arg(job->errorString()),
186 void setContextText(AgentActionManager::Type type, AgentActionManager::TextContext context, const QString &data)
191 void setContextText(AgentActionManager::Type type, AgentActionManager::TextContext context, const KLocalizedString &data)
196 QString contextText(AgentActionManager::Type type, AgentActionManager::TextContext context) const
312 void AgentActionManager::setContextText(Type type, TextContext context, const KLocalizedString &text)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
QAction * action(Type type) const
Returns the action of the given type, 0 if it has not been created (yet).
Definition: agentactionmanager.cpp:279
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
const QList< QKeySequence > & shortcut(StandardShortcut id)
virtual Q_SCRIPTABLE void start()=0
Akonadi::AgentInstance::List selectedAgentInstances() const
Returns the list of agent instances that are currently selected.
Definition: agentactionmanager.cpp:302
void result(KJob *job)
~AgentActionManager() override
Destroys the agent action manager.
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
QIcon fromTheme(const QString &name)
AgentActionManager(KActionCollection *actionCollection, QWidget *parent=nullptr)
Creates a new agent action manager.
Definition: agentactionmanager.cpp:215
QVector< AgentInstance > List
Describes a list of agent instances.
Definition: core/agentinstance.h:55
void setShortcut(const QKeySequence &shortcut)
QString toString() const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KGuiItem cancel()
void removeInstance(const AgentInstance &instance)
Removes the given agent instance.
Definition: core/agentmanager.cpp:390
QStringList capabilities() const
Returns the list of supported capabilities of the agent type.
Definition: core/agenttype.cpp:63
void setIcon(const QIcon &icon)
Dangerous
QString i18n(const char *text, const TYPE &arg...)
void setCapabilityFilter(const QStringList &capabilities)
Sets the capability filter that will be used when creating new agent instances.
Definition: agentactionmanager.cpp:238
void setContextText(Type type, TextContext context, const QString &text)
Sets the text of the action type for the given context.
Definition: agentactionmanager.cpp:307
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: agentactionmanager.cpp:285
void setText(const QString &text)
Manages generic actions for agent and agent instance views.
Definition: agentactionmanager.h:33
KLocalizedString KI18N_EXPORT ki18n(const char *text)
QAction * createAction(Type type)
Creates the action of the given type and adds it to the action collection specified in the constructo...
Definition: agentactionmanager.cpp:243
Accepted
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
QString label(StandardShortcut id)
KGuiItem del()
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
QString fromLatin1(const char *str, int size)
QString name(StandardShortcut id)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void createAllActions()
Convenience method to create all standard actions.
Definition: agentactionmanager.cpp:271
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: core/agentmanager.cpp:355
void setSelectionModel(QItemSelectionModel *model)
Sets the agent selection model based on which the actions should operate.
Definition: agentactionmanager.cpp:225
void setMimeTypeFilter(const QStringList &mimeTypes)
Sets the mime type filter that will be used when creating new agent instances.
Definition: agentactionmanager.cpp:233
virtual QString errorString() const
int error() const
bool isValid() const
Returns whether the agent instance object is valid.
Definition: core/agentinstance.cpp:32
QObject * parent() const const
Job for creating new agent instances.
Definition: agentinstancecreatejob.h:58
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:52:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:52:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.