diff --git a/applet.cpp b/applet.cpp index c116aa18c..044923c28 100644 --- a/applet.cpp +++ b/applet.cpp @@ -44,6 +44,8 @@ #include #include +#include + #include "plasma/configxml.h" #include "plasma/containment.h" #include "plasma/corona.h" @@ -570,6 +572,11 @@ QString Applet::pluginName() const return d->appletDescription.pluginName(); } +bool Applet::shouldConserveResources() const +{ + return Solid::PowerManagement::appShouldConserveResources(); +} + QString Applet::category() const { if (!d->appletDescription.isValid()) { diff --git a/applet.h b/applet.h index bc9c00cc3..745abf42f 100644 --- a/applet.h +++ b/applet.h @@ -398,6 +398,14 @@ class PLASMA_EXPORT Applet : public Widget */ QString pluginName() const; + /** + * Whether the applet should conserve resources. If true, try to avoid doing stuff which + * is computationally heavy. Try to conserve power and resources. + * + * @return true if it should conserve resources, false if it does not. + */ + Q_PROPERTY bool shouldConserveResources() const; + /** * Returns the icon related to this applet **/