kalarm

traywindow.h
1/*
2 * traywindow.h - the KDE system tray applet
3 * Program: kalarm
4 * Copyright © 2002-2004,2007 by David Jarvie <software@astrojar.org.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef TRAYWINDOW_H
22#define TRAYWINDOW_H
23
24#include <tqpixmap.h>
25#include <ksystemtray.h>
26class TDEPopupMenu;
27
28class KAEvent;
29class MainWindow;
30class TrayTooltip;
31
32class TrayWindow : public KSystemTray
33{
34 TQ_OBJECT
35
36 public:
37 TrayWindow(MainWindow* parent, const char* name = 0);
38 ~TrayWindow();
39 void removeWindow(MainWindow*);
40 MainWindow* assocMainWindow() const { return mAssocMainWindow; }
41 void setAssocMainWindow(MainWindow* win) { mAssocMainWindow = win; }
42 bool inSystemTray() const;
43 void tooltipAlarmText(TQString& text) const;
44
45 public slots:
46 void slotQuit();
47
48 signals:
49 void deleted();
50
51 protected:
52 virtual void contextMenuAboutToShow(TDEPopupMenu*);
53 virtual void mousePressEvent(TQMouseEvent*);
54 virtual void mouseReleaseEvent(TQMouseEvent*);
55 virtual void dragEnterEvent(TQDragEnterEvent*);
56 virtual void dropEvent(TQDropEvent*);
57
58 private slots:
59 void slotNewAlarm();
60 void slotNewFromTemplate(const KAEvent&);
61 void slotPreferences();
62 void setEnabledStatus(bool status);
63
64 private:
65 friend class TrayTooltip;
66
67 MainWindow* mAssocMainWindow; // main window associated with this, or null
68 TQPixmap mPixmapEnabled, mPixmapDisabled;
69 TrayTooltip* mTooltip;
70};
71
72#endif // TRAYWINDOW_H
KAEvent corresponds to a KCal::Event instance.
Definition: alarmevent.h:232