Plasma/libplasma2/API Review/Service
Appearance
as
Status | Action | Method | |
---|---|---|---|
TO DO | Remove | {{{2}}} | <{{{3}}}> |
TO DO | Remove | Q_INVOKABLE void setDestination(const QString &destination); | <{{{3}}}> |
TO DO | Remove | Q_INVOKABLE QString destination() const; | <{{{3}}}> |
TO DO | Keep | Q_INVOKABLE QStringList operationNames() const; | <{{{3}}}> |
TO DO | Rename | Q_INVOKABLE KConfigGroup operationDescription(const QString &operationName); -> QVariantMap operationDescription(const QString &operationName); | <{{{3}}}>
Q_INVOKABLE ServiceJob *startOperationCall(const KConfigGroup->QVariantMap &description, QObject *parent = 0); Q_INVOKABLE bool isOperationEnabled(const QString &operation) const; Q_INVOKABLE QString name() const; Q_INVOKABLE void associateItem(QQuickItem->QObject *item, const QString &operation); Q_INVOKABLE void disassociateItem(QQuickItem *widget); Q_INVOKABLE QHash<QString, QVariant> parametersFromDescription(const KConfigGroup &description); Q_SIGNALS: void operationsChanged(); void serviceReady(Plasma::Service *service); void operationEnabled(const QString &operation, bool enabled); New class in QML bindings: ServiceOperationStatus { property bool enabled property Service service property string operation } protected: explicit Service(QObject *parent = 0); Service(QObject *parent, const QVariantList &args); virtual ServiceJob *createJob(const QString &operation, QHash<QString, QVariant> ->QVariantMap ¶meters) = 0; virtual void registerOperationsScheme(); void setOperationsScheme(QIODevice *xml); void setName(const QString &name); void setOperationEnabled(const QString &operation, bool enable); use a QRunnable here private: Q_PRIVATE_SLOT(d, void associatedWidgetDestroyed(QObject *)) Q_PRIVATE_SLOT(d, void associatedItemDestroyed(QObject *)) |