messagewin.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
00025 #ifndef MESSAGEWIN_H
00026 #define MESSAGEWIN_H
00027
00028 #include "mainwindowbase.h"
00029
00030 #include "msgevent.h"
00031 using namespace KCal;
00032
00033 class QPushButton;
00034 class AlarmTimeWidget;
00035
00039 class MessageWin : public MainWindowBase
00040 {
00041 Q_OBJECT
00042 public:
00043 MessageWin();
00044 MessageWin(const KAlarmEvent&, const KAlarmAlarm&, bool reschedule_event = true, bool allowDefer = true);
00045 MessageWin(const QString& errmsg, const KAlarmEvent&, const KAlarmAlarm&, bool reschedule_event = true);
00046 ~MessageWin();
00047 void repeat();
00048 bool hasDefer() const { return !!deferButton; }
00049 bool errorMessage() const { return !errorMsg.isNull(); }
00050 static int instanceCount() { return windowList.count(); }
00051 static MessageWin* findEvent(const QString& eventID);
00052
00053 protected:
00054 virtual void showEvent(QShowEvent*);
00055 virtual void resizeEvent(QResizeEvent*);
00056 virtual void closeEvent(QCloseEvent*);
00057 virtual void saveProperties(KConfig*);
00058 virtual void readProperties(KConfig*);
00059
00060 protected slots:
00061 void slotDefer();
00062
00063 private:
00064 QSize initView();
00065 void playAudio();
00066
00067 static QPtrList<MessageWin> windowList;
00068
00069 KAlarmEvent event;
00070 QString message;
00071 QFont font;
00072 QColor colour;
00073 QDateTime dateTime;
00074 QString eventID;
00075 QString audioFile;
00076 int alarmID;
00077 int flags;
00078 bool beep;
00079 bool confirmAck;
00080 bool dateOnly;
00081 KAlarmAlarm::Type type;
00082 QString errorMsg;
00083 bool noDefer;
00084
00085 QPushButton* deferButton;
00086 int restoreHeight;
00087 bool rescheduleEvent;
00088 bool shown;
00089 bool deferClosing;
00090 };
00091
00092 #endif // MESSAGEWIN_H
This file is part of the documentation for kdelibs Version 3.1.4.