/* * NotifyWidget.cpp * * Created on: May 14, 2021 * Author: emanoil * * kdbusnotification Copyright (C) 2009 kdbusnotification development team * * 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 */ #include #include "NotifyWidget.h" NotifyWidget::NotifyWidget( TQWidget *parent, const char *name, TQ_INT32 id ) : TQLabel( parent, name, WStyle_Customize | WStyle_Splash), mName(TQString(name)), mId(id) { // TODO Auto-generated constructor stub } NotifyWidget::~NotifyWidget() { // TODO Auto-generated destructor stub } void NotifyWidget::mousePressEvent( TQMouseEvent *e ) { this->close(); } void NotifyWidget::timeout() { this->close(); } void NotifyWidget::setAutoMask(bool b) { if (b) setBackgroundMode( PaletteForeground ); else setBackgroundMode( PaletteBackground ); TQWidget::setAutoMask(b); } void NotifyWidget::setIcon(const TQString& icon) { mIcon = icon; // TODO handle icon } void NotifyWidget::setActions(const TQStringList& actions) { mActions = actions; // TODO handle actions } void NotifyWidget::setHints(const TQMap< TQString, TQT_DBusVariant >& hints) { mHints = hints; // TODO handle hints } void NotifyWidget::setTimeout(TQ_INT32 t) { TQTimer::singleShot(t, this, TQT_SLOT(timeout())); } #include "NotifyWidget.moc"