kalarm

reminder.h

00001 /*
00002  *  reminder.h  -  reminder setting widget
00003  *  Program:  kalarm
00004  *  Copyright (C) 2003, 2004 by David Jarvie <software@astrojar.org.uk>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef REMINDER_H
00022 #define REMINDER_H
00023 
00024 #include <tqframe.h>
00025 
00026 class TimeSelector;
00027 class CheckBox;
00028 
00029 
00030 class Reminder : public TQFrame
00031 {
00032         Q_OBJECT
00033   
00034     public:
00035         Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
00036                  bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name = 0);
00037         bool           isReminder() const;
00038         bool           isOnceOnly() const;
00039         int            minutes() const;
00040         void           setMinutes(int minutes, bool dateOnly);
00041         void           setReadOnly(bool);
00042         void           setDateOnly(bool dateOnly);
00043         void           setMaximum(int hourmin, int days);
00044         void           setFocusOnCount();
00045         void           setOnceOnly(bool);
00046         void           enableOnceOnly(bool enable);
00047 
00048         static TQString i18n_first_recurrence_only();    // plain text of 'Reminder for first recurrence only' checkbox
00049         static TQString i18n_u_first_recurrence_only();  // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
00050 
00051     protected slots:
00052         void           slotReminderToggled(bool);
00053 
00054     private:
00055         TimeSelector*  mTime;
00056         CheckBox*      mOnceOnly;
00057         bool           mReadOnly;           // the widget is read only
00058         bool           mOnceOnlyEnabled;    // 'mOnceOnly' checkbox is allowed to be enabled
00059 };
00060 
00061 #endif // REMINDER_H