/* * NotifyWidget.h * * Copyright (C) 2021 Emanoil Kotsev * * * This file is part of kdbusnotification. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef SRC_DAEMON_NOTIFYWIDGET_H_ #define SRC_DAEMON_NOTIFYWIDGET_H_ #include #include #include class NotificationsService; class NotifyWidget: public TQLabel { TQ_OBJECT public: NotifyWidget(TQWidget *parent=0, const char *name=0, NotificationsService *ns=0, TQ_INT32 id=0 ); virtual ~NotifyWidget(); void setAutoMask(bool b); bool setIcon(const TQString& icon); void setActions(const TQStringList& actions); void setHints(const TQMap< TQString, TQT_DBusVariant >& hints); void setTimeout(TQ_INT32 t); protected: void mousePressEvent( TQMouseEvent *); private slots: void timeout(); void fadeAway(); private: NotificationsService *notificationService; TQPoint mPosition; TQString mName; TQ_INT32 mId; TQString mIcon; TQStringList mActions; TQMap< TQString, TQT_DBusVariant > mHints; }; #endif /* SRC_DAEMON_NOTIFYWIDGET_H_ */