kalarm

reminder.h
1 /*
2  * reminder.h - reminder setting widget
3  * Program: kalarm
4  * Copyright (C) 2003, 2004 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 REMINDER_H
22 #define REMINDER_H
23 
24 #include <tqframe.h>
25 
26 class TimeSelector;
27 class CheckBox;
28 
29 
30 class Reminder : public TQFrame
31 {
32  TQ_OBJECT
33 
34  public:
35  Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
36  bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name = 0);
37  bool isReminder() const;
38  bool isOnceOnly() const;
39  int minutes() const;
40  void setMinutes(int minutes, bool dateOnly);
41  void setReadOnly(bool);
42  void setDateOnly(bool dateOnly);
43  void setMaximum(int hourmin, int days);
44  void setFocusOnCount();
45  void setOnceOnly(bool);
46  void enableOnceOnly(bool enable);
47 
48  static TQString i18n_first_recurrence_only(); // plain text of 'Reminder for first recurrence only' checkbox
49  static TQString i18n_u_first_recurrence_only(); // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
50 
51  protected slots:
52  void slotReminderToggled(bool);
53 
54  private:
55  TimeSelector* mTime;
56  CheckBox* mOnceOnly;
57  bool mReadOnly; // the widget is read only
58  bool mOnceOnlyEnabled; // 'mOnceOnly' checkbox is allowed to be enabled
59 };
60 
61 #endif // REMINDER_H