summaryrefslogtreecommitdiffstats
path: root/src/daemon/NotifyWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/NotifyWidget.cpp')
-rw-r--r--src/daemon/NotifyWidget.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/daemon/NotifyWidget.cpp b/src/daemon/NotifyWidget.cpp
index a91768b..02b40dc 100644
--- a/src/daemon/NotifyWidget.cpp
+++ b/src/daemon/NotifyWidget.cpp
@@ -20,7 +20,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <kdebug.h>
#include <tqtimer.h>
+#include <tqpixmap.h>
#include "NotifyWidget.h"
#include "NotificationsService.h"
@@ -30,13 +32,11 @@ NotifyWidget::NotifyWidget(TQWidget *parent, const char *name, NotificationsServ
mName(TQString(name)), notificationService(ns), mId(id)
{
// TODO Auto-generated constructor stub
-
}
NotifyWidget::~NotifyWidget()
{
// TODO Auto-generated destructor stub
-
}
void NotifyWidget::mousePressEvent( TQMouseEvent *e )
@@ -62,9 +62,16 @@ void NotifyWidget::setAutoMask(bool b)
TQWidget::setAutoMask(b);
}
-void NotifyWidget::setIcon(const TQString& icon) {
+bool NotifyWidget::setIcon(const TQString& icon) {
mIcon = icon;
- // TODO handle icon
+ TQPixmap pixmap;
+ if ( pixmap.load(mIcon) ) {
+ this->setPixmap(pixmap);
+ } else {
+ tqDebug("Could not load notification icon");
+ return false;
+ }
+ return true;
}
void NotifyWidget::setActions(const TQStringList& actions) {