daemongui.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef DAEMONGUIHANDLER_H
00021 #define DAEMONGUIHANDLER_H
00022
00023 #include <qtimer.h>
00024 #include <kaction.h>
00025
00026 #include <kalarmd/alarmguiiface.h>
00027 class ActionAlarmsEnabled;
00028
00029
00030
00031
00032
00033
00034
00035
00036 class DaemonGuiHandler : public QObject, virtual public AlarmGuiIface
00037 {
00038 Q_OBJECT
00039 public:
00040 explicit DaemonGuiHandler(const char *name = 0L);
00041
00042 bool monitoringAlarms();
00043 void checkStatus() { checkIfDaemonRunning(); }
00044 void setAlarmsEnabled(bool enable);
00045
00046 private slots:
00047 void timerCheckDaemonRunning();
00048 void slotSettingsChanged();
00049
00050 private:
00051 static QString expandURL(const QString& urlString);
00052 void registerGuiWithDaemon();
00053 void daemonEnableCalendar(bool enable);
00054 bool checkIfDaemonRunning();
00055 void setFastDaemonCheck();
00056
00057 void alarmDaemonUpdate(int alarmGuiChangeType,
00058 const QString& calendarURL, const QCString& appName);
00059 void handleEvent(const QString& calendarURL, const QString& eventID);
00060 void handleEvent(const QString& iCalendarString) ;
00061
00062 QTimer mDaemonStatusTimer;
00063 int mDaemonStatusTimerCount;
00064 int mDaemonStatusTimerInterval;
00065 bool mDaemonRunning;
00066 bool mCalendarDisabled;
00067 bool mEnableCalPending;
00068 };
00069
00070
00071
00072
00073
00074 class ActionAlarmsEnabled : public KAction
00075 {
00076 Q_OBJECT
00077 public:
00078 ActionAlarmsEnabled(int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0);
00079 bool alarmsEnabled() const { return mAlarmsEnabled; }
00080 void setAlarmsEnabled(bool enable);
00081 signals:
00082 void alarmsEnabledChange(bool enabled);
00083 private:
00084 bool mAlarmsEnabled;
00085 };
00086
00087 #endif // DAEMONGUIHANDLER_H
This file is part of the documentation for kdelibs Version 3.1.4.