korganizer

koalarmclient.h
1/*
2 KOrganizer Alarm Daemon Client.
3
4 This file is part of KOrganizer.
5
6 Copyright (c) 2002,2003 Cornelius Schumacher
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22 As a special exception, permission is given to link this program
23 with any edition of TQt, and distribute the resulting executable,
24 without including the source code for TQt in the source distribution.
25*/
26#ifndef KOALARMCLIENT_H
27#define KOALARMCLIENT_H
28
29#include "alarmclientiface.h"
30
31#include <tdeapplication.h>
32
33#include <tqtimer.h>
34#include <tqdatetime.h>
35
36class AlarmDialog;
37class AlarmDockWindow;
38
39namespace KCal {
40class CalendarResources;
41class Incidence;
42}
43
44class KOAlarmClient : public TQObject, virtual public AlarmClientIface, public KSessionManaged
45{
46 TQ_OBJECT
47
48 public:
49 KOAlarmClient( TQObject *parent = 0, const char *name = 0 );
50 ~KOAlarmClient();
51
52 bool commitData( TQSessionManager & );
53
54 // DCOP interface
55 void quit();
56 void forceAlarmCheck();
57 void dumpDebug();
58 TQStringList dumpAlarms();
59
60 void debugShowDialog();
61
62 public slots:
63 void slotQuit();
64
65 protected slots:
66 void checkAlarms();
67
68 signals:
69 void reminderCount( int );
70 void saveAllSignal();
71
72 private:
73 void createReminder( KCal::CalendarResources *calendar, KCal::Incidence *incidence,
74 const TQDateTime &dt, const TQString &displayText );
75 void saveLastCheckTime();
76
77 AlarmDockWindow *mDocker; // the panel icon
78 KCal::CalendarResources *mCalendar;
79
80 TQDateTime mLastChecked;
81 TQTimer mCheckTimer;
82
83 AlarmDialog *mDialog;
84};
85
86#endif