korganizer

alarmdockwindow.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
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
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef ALARMDOCKWINDOW_H
25 #define ALARMDOCKWINDOW_H
26 
27 #include <ksystemtray.h>
28 
29 #include <tqpixmap.h>
30 
31 class AlarmDockWindow : public KSystemTray
32 {
33  TQ_OBJECT
34 
35  public:
36  AlarmDockWindow( const char *name = 0 );
37  virtual ~AlarmDockWindow();
38 
39  void enableAutostart( bool enabled );
40 
41  public slots:
42  void toggleAlarmsEnabled();
43  void toggleAutostart();
44  void slotUpdate( int reminders );
45 
46  signals:
47  void quitSignal();
48  void suspendAllSignal();
49  void dismissAllSignal();
50 
51  protected:
52  void mousePressEvent( TQMouseEvent * );
53 // void closeEvent( TQCloseEvent * );
54  void resizeEvent ( TQResizeEvent * );
55  void showEvent ( TQShowEvent * );
56 
57  protected slots:
58  void slotQuit();
59  void slotSuspendAll();
60  void slotDismissAll();
61 
62  private:
63  void resizeTrayIcon();
64 
65  private:
66  TQPixmap mPixmapEnabled;
67  TQPixmap mPixmapDisabled;
68  TQString mName;
69 
70  int mAlarmsEnabledId;
71  int mAutostartId;
72  int mSuspendAll;
73  int mDismissAll;
74 };
75 
76 #endif