2 * traywindow.h - the KDE system tray applet
4 * Copyright © 2002-2010 by David Jarvie <djarvie@kde.org>
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.
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.
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.
26 #include <ksystemtrayicon.h>
30 class QDragEnterEvent
;
37 class TemplateMenuAction
;
39 class TrayWindow
: public KSystemTrayIcon
43 explicit TrayWindow(MainWindow
* parent
);
45 void removeWindow(MainWindow
*);
46 MainWindow
* assocMainWindow() const { return mAssocMainWindow
; }
47 void setAssocMainWindow(MainWindow
* win
) { mAssocMainWindow
= win
; }
53 virtual void dragEnterEvent(QDragEnterEvent
*);
54 virtual void dropEvent(QDropEvent
*);
55 virtual bool event(QEvent
*);
58 void slotActivated(QSystemTrayIcon::ActivationReason reason
);
59 void slotNewAlarm(EditAlarmDlg::Type
);
60 void slotNewFromTemplate(const KAEvent
*);
61 void slotPreferences();
62 void setEnabledStatus(bool status
);
63 void slotHaveDisabledAlarms(bool disabled
);
64 void slotResourceStatusChanged();
68 QString
tooltipAlarmText() const;
70 MainWindow
* mAssocMainWindow
; // main window associated with this, or null
71 QIcon mIconEnabled
; // normal status icon
72 QIcon mIconDisabled
; // icon indicating all alarms disabled
73 QIcon mIconSomeDisabled
; // icon indicating individual alarms disabled
74 KToggleAction
* mActionEnabled
;
75 NewAlarmAction
* mActionNew
;
76 TemplateMenuAction
* mActionNewFromTemplate
;
77 bool mHaveDisabledAlarms
; // some individually disabled alarms exist
80 #endif // TRAYWINDOW_H