korganizer

koalarmclient.h

00001 /*
00002     KOrganizer Alarm Daemon Client.
00003 
00004     This file is part of KOrganizer.
00005 
00006     Copyright (c) 2002,2003 Cornelius Schumacher
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021 
00022     As a special exception, permission is given to link this program
00023     with any edition of Qt, and distribute the resulting executable,
00024     without including the source code for Qt in the source distribution.
00025 */
00026 #ifndef KOALARMCLIENT_H
00027 #define KOALARMCLIENT_H
00028 
00029 #include "alarmclientiface.h"
00030 
00031 #include <kapplication.h>
00032 
00033 #include <qtimer.h>
00034 #include <qdatetime.h>
00035 
00036 class AlarmDialog;
00037 class AlarmDockWindow;
00038 
00039 namespace KCal {
00040 class CalendarResources;
00041 class Incidence;
00042 }
00043 
00044 class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KSessionManaged
00045 {
00046     Q_OBJECT
00047   public:
00048     KOAlarmClient( QObject *parent = 0, const char *name = 0 );
00049     ~KOAlarmClient();
00050 
00051     bool commitData( QSessionManager & );
00052 
00053     // DCOP interface
00054     void quit();
00055     void forceAlarmCheck();
00056     void dumpDebug();
00057     QStringList dumpAlarms();
00058 
00059     void debugShowDialog();
00060 
00061   public slots:
00062     void slotQuit();
00063 
00064   protected slots:
00065     void checkAlarms();
00066 
00067   signals:
00068     void reminderCount( int );
00069     void saveAllSignal();
00070 
00071   private:
00072     void createReminder( KCal::CalendarResources *calendar, KCal::Incidence *incidence,
00073                          const QDateTime &dt, const QString &displayText );
00074     void saveLastCheckTime();
00075 
00076     AlarmDockWindow *mDocker;  // the panel icon
00077     KCal::CalendarResources *mCalendar;
00078 
00079     QDateTime mLastChecked;
00080     QTimer mCheckTimer;
00081 
00082     AlarmDialog *mDialog;
00083 };
00084 
00085 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys