Akonadi
agentinstancemodel.cpp
78 connect(AgentManager::self(), &AgentManager::instanceAdded, this, [this](const Akonadi::AgentInstance &inst) {
81 connect(AgentManager::self(), &AgentManager::instanceRemoved, this, [this](const Akonadi::AgentInstance &inst) {
84 connect(AgentManager::self(), &AgentManager::instanceStatusChanged, this, [this](const Akonadi::AgentInstance &inst) {
87 connect(AgentManager::self(), &AgentManager::instanceProgressChanged, this, [this](const Akonadi::AgentInstance &inst) {
90 connect(AgentManager::self(), &AgentManager::instanceNameChanged, this, [this](const Akonadi::AgentInstance &inst) {
93 connect(AgentManager::self(), &AgentManager::instanceOnline, this, [this](const Akonadi::AgentInstance &inst) {
145 return QStringLiteral("<qt><h4>%1</h4>%2</qt>").arg(instance.name(), instance.type().description());
171 QVariant AgentInstanceModel::headerData(int section, Qt::Orientation orientation, int role) const
189 QModelIndex AgentInstanceModel::index(int row, int column, const QModelIndex & /*parent*/) const
void instanceRemoved(const Akonadi::AgentInstance &instance)
This signal is emitted whenever an agent instance was removed.
@ ProgressRole
The current progress (numerical in percent) of an operation.
Definition: agentinstancemodel.h:58
QString identifier() const
Returns the unique identifier of the agent instance.
Definition: core/agentinstance.cpp:42
DisplayRole
void setIsOnline(bool online)
Sets online status of the agent instance.
Definition: core/agentinstance.cpp:87
QString description() const
Returns the description of the agent type.
Definition: core/agenttype.cpp:43
Q_EMITQ_EMIT
void instanceNameChanged(const Akonadi::AgentInstance &instance)
This signal is emitted whenever the name of the agent instance has changed.
QVector< AgentInstance > List
Describes a list of agent instances.
Definition: core/agentinstance.h:55
void instanceProgressChanged(const Akonadi::AgentInstance &instance)
This signal is emitted whenever the progress of an agent instance has changed.
void setValue(const T &value)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QHash::iterator insert(const Key &key, const T &value)
QStringList capabilities() const
Returns the list of supported capabilities of the agent type.
Definition: core/agenttype.cpp:63
virtual QHash< int, QByteArray > roleNames() const const
QModelIndex createIndex(int row, int column, void *ptr) const const
typedef ItemFlags
void instanceAdded(const Akonadi::AgentInstance &instance)
This signal is emitted whenever a new agent instance was created.
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles)
Orientation
~AgentInstanceModel() override
Destroys the agent instance model.
virtual Qt::ItemFlags flags(const QModelIndex &index) const const
void instanceOnline(const Akonadi::AgentInstance &instance, bool online)
This signal is emitted whenever the online state of an agent changed.
bool isValid() const const
Provides a data model for agent instances.
Definition: agentinstancemodel.h:40
bool toBool() const const
QString name() const
Returns the user visible name of the agent instance.
Definition: core/agentinstance.cpp:52
int row() const const
QString identifier() const
Returns the unique identifier of the agent type.
Definition: core/agenttype.cpp:33
bool isOnline() const
Returns whether the agent instance is online currently.
Definition: core/agentinstance.cpp:82
QString i18nc(const char *context, const char *text, const TYPE &arg...)
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: core/agentmanager.cpp:355
AgentInstance::List instances() const
Returns the list of all available agent instances.
Definition: core/agentmanager.cpp:380
int progress() const
Returns the progress of the agent instance in percent, or -1 if no progress information are available...
Definition: core/agentinstance.cpp:77
AgentInstanceModel(QObject *parent=nullptr)
Creates a new agent instance model.
Definition: agentinstancemodel.cpp:72
QString statusMessage() const
Returns a textual presentation of the status of the agent instance.
Definition: core/agentinstance.cpp:72
void instanceStatusChanged(const Akonadi::AgentInstance &instance)
This signal is emitted whenever the status of an agent instance has changed.
QStringList mimeTypes() const
Returns the list of supported mime types of the agent type.
Definition: core/agenttype.cpp:58
QObject * parent() const const
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Jun 7 2023 03:53:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Jun 7 2023 03:53:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.