kalarm

deferdlg.h
1 /*
2  * deferdlg.h - dialogue to defer an alarm
3  * Program: kalarm
4  * Copyright © 2002-2004,2006 by David Jarvie <software@astrojar.org.uk>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef DEFERDLG_H
22 #define DEFERDLG_H
23 
24 #include <kdialogbase.h>
25 #include "datetime.h"
26 
27 class AlarmTimeWidget;
28 
29 
30 class DeferAlarmDlg : public KDialogBase
31 {
32  TQ_OBJECT
33 
34  public:
35  DeferAlarmDlg(const TQString& caption, const DateTime& initialDT,
36  bool cancelButton, TQWidget* parent = 0, const char* name = 0);
37  void setLimit(const DateTime&);
38  DateTime setLimit(const TQString& eventID);
39  const DateTime& getDateTime() const { return mAlarmDateTime; }
40  void setDeferMinutes(int mins);
41  int deferMinutes() const { return mDeferMinutes; }
42 
43  protected slots:
44  virtual void slotOk();
45  virtual void slotCancel();
46  virtual void slotUser1();
47 
48  private slots:
49  void slotPastLimit();
50 
51  private:
52  AlarmTimeWidget* mTimeWidget;
53  DateTime mAlarmDateTime;
54  DateTime mLimitDateTime; // latest date/time allowed for deferral
55  TQString mLimitEventID; // event from whose recurrences to derive the limit date/time for deferral
56  int mDeferMinutes; // number of minutes deferral selected, or 0 if date/time entered
57 };
58 
59 #endif // DEFERDLG_H