28 #include "mainwindowbase.h"
36 class AlarmTimeWidget;
38 class KArtsDispatcher;
39 namespace KDE {
class PlayObject; }
50 MessageWin(
const KAEvent&,
const KAAlarm&,
bool reschedule_event =
true,
bool allowDefer =
true);
51 MessageWin(
const KAEvent&,
const DateTime& alarmDateTime,
const TQStringList& errmsgs);
53 void repeat(
const KAAlarm&);
54 void setRecreating() { mRecreating =
true; }
55 const DateTime& dateTime() {
return mDateTime; }
56 KAAlarm::Type alarmType()
const {
return mAlarmType; }
57 bool hasDefer()
const {
return !!mDeferButton; }
58 bool isValid()
const {
return !mInvalid; }
60 virtual TQSize sizeHint()
const;
61 static int instanceCount() {
return mWindowList.count(); }
62 static MessageWin* findEvent(
const TQString& eventID);
65 virtual void showEvent(TQShowEvent*);
66 virtual void moveEvent(TQMoveEvent*);
67 virtual void resizeEvent(TQResizeEvent*);
68 virtual void closeEvent(TQCloseEvent*);
69 virtual void saveProperties(TDEConfig*);
70 virtual void readProperties(TDEConfig*);
75 void checkDeferralLimit();
76 void displayMainWindow();
77 void slotShowKMailMessage();
80 void checkAudioPlay();
84 void setRemainingTextDay();
85 void setRemainingTextMinute();
91 void initAudio(
bool firstTime);
93 void setKMixVolume(
int percent);
95 void displayComplete();
97 void setDeferralLimit(
const KAEvent&);
98 bool haveErrorMessage(
unsigned msg)
const;
99 void clearErrorMessage(
unsigned msg)
const;
101 static TQValueList<MessageWin*> mWindowList;
102 static TQMap<TQString, unsigned> mErrorMessages;
106 TQColor mBgColour, mFgColour;
108 TQDateTime mCloseTime;
114 int mDefaultDeferMinutes;
115 KAAlarm::Type mAlarmType;
116 KAEvent::Action mAction;
117 unsigned long mKMailSerialNumber;
118 TQStringList mErrorMsgs;
126 KArtsDispatcher* mArtsDispatcher;
127 KDE::PlayObject* mPlayObject;
133 TQString mLocalAudioFile;
134 TQTime mAudioFileStart;
135 int mAudioFileLoadSecs;
140 TQLabel* mRemainingText;
141 KPushButton* mOkButton;
142 TQPushButton* mEditButton;
143 TQPushButton* mDeferButton;
144 TQPushButton* mSilenceButton;
145 TQPushButton* mKAlarmButton;
146 TQPushButton* mKMailButton;
147 DeferAlarmDlg* mDeferDlg;
148 TQDateTime mDeferLimit;
149 mutable KWinModule* mWinModule;
158 bool mRescheduleEvent;
161 bool mNoCloseConfirm;
163 bool mDisableDeferral;
represents calendar alarms and events
KAEvent corresponds to a KCal::Event instance.
The MainWindowBase class is a base class for KAlarm's main window and message window.
MessageWin: A window to display an alarm message.