diff options
Diffstat (limited to 'src/daemon/NotifyWidget.cpp')
-rw-r--r-- | src/daemon/NotifyWidget.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/daemon/NotifyWidget.cpp b/src/daemon/NotifyWidget.cpp index 02b40dc..a153a3e 100644 --- a/src/daemon/NotifyWidget.cpp +++ b/src/daemon/NotifyWidget.cpp @@ -21,6 +21,7 @@ */ #include <kdebug.h> +#include <tdeapplication.h> #include <tqtimer.h> #include <tqpixmap.h> @@ -28,10 +29,13 @@ #include "NotificationsService.h" NotifyWidget::NotifyWidget(TQWidget *parent, const char *name, NotificationsService *ns, TQ_INT32 id ) -: TQLabel( parent, name, WStyle_Customize | WStyle_Splash), +: TQLabel( parent, name, WStyle_Customize | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder), mName(TQString(name)), notificationService(ns), mId(id) { // TODO Auto-generated constructor stub + TQDesktopWidget *d = TQApplication::desktop(); + mPosition=TQPoint(d->width()-50, d->height()-20); + TQTimer::singleShot(100, this, TQT_SLOT(fadeAway())); } NotifyWidget::~NotifyWidget() @@ -53,6 +57,13 @@ void NotifyWidget::timeout() notificationService->closeNotifyWidget(mId, 1); // The notification expired. } +void NotifyWidget::fadeAway() +{ + mPosition.setY(mPosition.y()-10); + move(mPosition); + TQTimer::singleShot(10, this, TQT_SLOT(fadeAway())); +} + void NotifyWidget::setAutoMask(bool b) { if (b) @@ -85,6 +96,14 @@ void NotifyWidget::setHints(const TQMap< TQString, TQT_DBusVariant >& hints) { } void NotifyWidget::setTimeout(TQ_INT32 t) { + TDEApplication::kApplication()->setTopWidget(this); +// update(0,0,width(),height()); +// +// int extraWidth = width() - minimumWidth(); +// int extraHeight = height() - minimumHeight(); +// setGeometry(70, 10, 50 + extraWidth, 20 + extraHeight); +// adjustSize(); + TQTimer::singleShot(t, this, TQT_SLOT(timeout())); } |