Plasma
service.cpp
Go to the documentation of this file.
100 void ServicePrivate::publish(AnnouncementMethods methods, const QString &name, const PackageMetadata &metadata)
369 return d->config && d->config->hasGroup(operation) && !d->disabledOperations.contains(operation);
414 const QString path = KStandardDirs::locate("data", "plasma/services/" + d->name + ".operations");
void setName(const QString &name)
Sets the name of the Service; useful for Services not loaded from plugins, which use the plugin name ...
Definition: service.cpp:318
void setEnabled(bool enabled)
static PluginLoader * pluginLoader()
Return the active plugin loader.
Definition: pluginloader.cpp:67
This class provides jobs for use with Plasma::Service.
Definition: servicejob.h:54
Q_INVOKABLE ServiceJob * startOperationCall(const KConfigGroup &description, QObject *parent=0)
Called to create a ServiceJob which is associated with a given operation and parameter set...
Definition: service.cpp:215
static Service * load(const QString &name, const QVariantList &args, QObject *parent=0)
Used to load a given service from a plugin.
Definition: service.cpp:75
void setOperationEnabled(const QString &operation, bool enable)
Enables a given service by name.
Definition: service.cpp:334
const Key & key() const
bool hasNext() const
void setOperationsScheme(QIODevice *xml)
Sets the XML used to define the operation schema for this Service.
Definition: service.cpp:372
Q_INVOKABLE void disassociateWidget(QWidget *widget)
Disassociates a widget if it has been associated with an operation on this service.
Definition: service.cpp:267
void operationsChanged()
Emitted when the Service's operations change.
Q_INVOKABLE QString destination() const
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
static AuthorizationManager * self()
Singleton pattern accessor.
Definition: authorizationmanager.cpp:64
Q_INVOKABLE KConfigGroup operationDescription(const QString &operationName)
Retrieves the parameters for a given operation.
Definition: service.cpp:181
This class provides a generic API for write access to settings or services.
Definition: service.h:91
void finished(Plasma::ServiceJob *job)
Emitted when a job associated with this Service completes its task.
void setEnabled(bool)
Q_INVOKABLE void setDestination(const QString &destination)
Sets the destination for this Service to operate on.
Definition: service.cpp:161
Q_INVOKABLE void associateWidget(QWidget *widget, const QString &operation)
Assoicates a widget with an operation, which allows the service to automatically manage, for example, the enabled state of a widget.
Definition: service.cpp:254
Q_INVOKABLE void associateItem(QGraphicsObject *item, const QString &operation)
Associates a graphics item with an operation, which allows the service to automatically manage...
Definition: service.cpp:288
bool isEmpty() const
Item next()
Q_INVOKABLE QMap< QString, QVariant > parametersFromDescription(const KConfigGroup &description)
Definition: service.cpp:196
virtual ServiceJob * createJob(const QString &operation, QMap< QString, QVariant > ¶meters)=0
Called when a job should be created by the Service.
Q_INVOKABLE bool isOperationEnabled(const QString &operation) const
Query to find if an operation is enabled or not.
Definition: service.cpp:367
Service * loadService(const QString &name, const QVariantList &args, QObject *parent=0)
Load a Service plugin.
Definition: pluginloader.cpp:206
iterator insert(const Key &key, const T &value)
void serviceReady(Plasma::Service *service)
Emitted when this service is ready for use.
static Service * access(const KUrl &url, QObject *parent=0)
Used to access a service from an url.
Definition: service.cpp:80
virtual void registerOperationsScheme()
By default this is based on the file in plasma/services/name.operations, but can be reimplented to us...
Definition: service.cpp:402
Q_INVOKABLE QStringList operationNames() const
const T & value() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Definition: configloader.h:75
void destroyed(QObject *obj)
Q_INVOKABLE void disassociateItem(QGraphicsObject *widget)
Disassociates a graphics item if it has been associated with an operation on this service...
Definition: service.cpp:302
singleShot
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 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:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.