Expose the applet metadata in AppletInterface
Needed for displaying about pages of applets.
This commit is contained in:
parent
e510d9d3ce
commit
6329eb7af4
@ -884,4 +884,9 @@ bool AppletInterface::isLoading() const
|
|||||||
return m_loading;
|
return m_loading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KPluginMetaData AppletInterface::metaData() const
|
||||||
|
{
|
||||||
|
return applet()->pluginMetaData();
|
||||||
|
}
|
||||||
|
|
||||||
#include "moc_appletinterface.cpp"
|
#include "moc_appletinterface.cpp"
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include <QQuickItem>
|
#include <QQuickItem>
|
||||||
#include <QQuickView>
|
#include <QQuickView>
|
||||||
|
|
||||||
|
#include <KPluginMetaData>
|
||||||
|
|
||||||
#include <Plasma/Applet>
|
#include <Plasma/Applet>
|
||||||
#include <Plasma/Theme>
|
#include <Plasma/Theme>
|
||||||
|
|
||||||
@ -250,6 +252,12 @@ class AppletInterface : public PlasmaQuick::AppletQuickItem
|
|||||||
|
|
||||||
Q_PROPERTY(bool loading MEMBER m_loading NOTIFY isLoadingChanged)
|
Q_PROPERTY(bool loading MEMBER m_loading NOTIFY isLoadingChanged)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The metadata of the applet.
|
||||||
|
* @since 5.73
|
||||||
|
*/
|
||||||
|
Q_PROPERTY(KPluginMetaData metaData READ metaData CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AppletInterface(DeclarativeAppletScript *script, const QVariantList &args = QVariantList(), QQuickItem *parent = nullptr);
|
AppletInterface(DeclarativeAppletScript *script, const QVariantList &args = QVariantList(), QQuickItem *parent = nullptr);
|
||||||
~AppletInterface() override;
|
~AppletInterface() override;
|
||||||
@ -416,6 +424,8 @@ public:
|
|||||||
QString configurationRequiredReason() const;
|
QString configurationRequiredReason() const;
|
||||||
void setConfigurationRequiredReason(const QString &reason);
|
void setConfigurationRequiredReason(const QString &reason);
|
||||||
|
|
||||||
|
KPluginMetaData metaData() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
* somebody else, usually the containment sent some data to the applet
|
* somebody else, usually the containment sent some data to the applet
|
||||||
|
Loading…
Reference in New Issue
Block a user