dockwindow.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _DOCKWINDOW_H
00025 #define _DOCKWINDOW_H
00026
00027
00028 #include <ksystemtray.h>
00029 #include <kpopupmenu.h>
00030
00031 #include "alarmgui.h"
00032
00033 class AlarmDockWindow : public KSystemTray
00034 {
00035 Q_OBJECT
00036 public:
00037 AlarmDockWindow(AlarmGui *, QWidget *parent = 0L, const char *name = 0L);
00038 virtual ~AlarmDockWindow();
00039
00040 bool alarmsOn() { return contextMenu()->isItemChecked(mAlarmsEnabledId); }
00041 bool autostartGuiOn() { return contextMenu()->isItemChecked(mAutostartGuiId); }
00042
00043 void setGuiAutostart(bool on);
00044 void setDaemonAutostart(bool on) { contextMenu()->setItemChecked(mAutostartDaemonId, on); }
00045 void updateMenuClients();
00046 void updateMenuCalendars(bool recreate);
00047 void setDaemonStatus(bool running);
00048 void addToolTip(const QString&);
00049
00050 protected:
00051 virtual void contextMenuAboutToShow(KPopupMenu*);
00052 void mousePressEvent(QMouseEvent*);
00053 void closeEvent(QCloseEvent*);
00054
00055 public slots:
00056 void toggleAlarmsEnabled();
00057 void toggleGuiAutostart() { setGuiAutostart(!autostartGuiOn()); }
00058 void toggleDaemonAutostart();
00059 void selectClient(int menuIndex);
00060 void selectCal(int menuIndex);
00061
00062 protected:
00063 QPixmap mPixmapEnabled, mPixmapDisabled;
00064 int mAlarmsEnabledId;
00065 int mAutostartGuiId;
00066 int mAutostartDaemonId;
00067
00068 private:
00069
00070 void handleEvent(const QString& calendarURL, const QString& eventID);
00071
00072 AlarmGui *mAlarmGui;
00073 QString mDefaultClient;
00074 int mClientIndex;
00075 int mNumClientIds;
00076 int mNumCalendarIds;
00077 bool mSettingDaemonStatus;
00078 };
00079
00080 #endif
This file is part of the documentation for kdelibs Version 3.1.5.