2 * traywindow.h - the KDE system tray applet
4 * Copyright © 2002-2012 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 <kalarmcal/kaevent.h>
28 #include <kstatusnotifieritem.h>
37 using namespace KAlarmCal
;
39 class TrayWindow
: public KStatusNotifierItem
43 explicit TrayWindow(MainWindow
* parent
);
45 void removeWindow(MainWindow
*);
46 MainWindow
* assocMainWindow() const { return mAssocMainWindow
; }
47 void setAssocMainWindow(MainWindow
* win
) { mAssocMainWindow
= win
; }
53 void slotActivateRequested();
54 void slotSecondaryActivateRequested();
55 void slotNewAlarm(EditAlarmDlg::Type
);
56 void slotNewFromTemplate(const KAEvent
*);
57 void slotPreferences();
58 void setEnabledStatus(bool status
);
59 void slotHaveDisabledAlarms(bool disabled
);
66 QString
tooltipAlarmText() const;
69 MainWindow
* mAssocMainWindow
; // main window associated with this, or null
71 KToggleAction
* mActionEnabled
;
72 NewAlarmAction
* mActionNew
;
73 mutable AlarmListModel
* mAlarmsModel
; // active alarms sorted in time order
74 QTimer
* mStatusUpdateTimer
;
75 QTimer
* mToolTipUpdateTimer
;
76 bool mHaveDisabledAlarms
; // some individually disabled alarms exist
79 #endif // TRAYWINDOW_H