summaryrefslogtreecommitdiffstats
path: root/src/daemon/NotifyWidget.h
blob: 563f3f2a91c45e9f9641beb1e82273f20873c067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * NotifyWidget.h
 *
 *  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
 */
#ifndef SRC_DAEMON_NOTIFYWIDGET_H_
#define SRC_DAEMON_NOTIFYWIDGET_H_

#include <tqlabel.h>
#include <tqdbusvariant.h>

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);

    void 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();

private:
    NotificationsService *notificationService;
    TQString mName;
    TQ_INT32 mId;
    TQString mIcon;
    TQStringList mActions;
    TQMap< TQString, TQT_DBusVariant > mHints;

};

#endif /* SRC_DAEMON_NOTIFYWIDGET_H_ */