From b8a9f720080bf3b640384b16274b59509d719231 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 23 Jul 2007 06:12:38 +0000 Subject: [PATCH] add an icon() accessor svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691201 --- applet.cpp | 9 +++++++++ applet.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/applet.cpp b/applet.cpp index 25d97dbab..76ee52664 100644 --- a/applet.cpp +++ b/applet.cpp @@ -220,6 +220,15 @@ QString Applet::name() const return d->appletDescription.name(); } +QString Applet::icon() const +{ + if (!d->appletDescription.isValid()) { + return QString(); + } + + return d->appletDescription.icon(); +} + QString Applet::category() const { if (!d->appletDescription.isValid()) { diff --git a/applet.h b/applet.h index 03267ac47..88794c28b 100644 --- a/applet.h +++ b/applet.h @@ -265,6 +265,11 @@ class PLASMA_EXPORT Applet : public QObject, public Widget **/ QString name() const; + /** + * Returns the icon related to this applet + **/ + QString icon() const; + /** * Returns the category the applet is in, as specified in the * .desktop file.