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 <qframe.h>
00025 
00026 class TimeSelector;
00027 class CheckBox;
00028 
00029 
00030 class Reminder : public QFrame
00031 {
00032         Q_OBJECT
00033     public:
00034         Reminder(const QString& caption, const QString& reminderWhatsThis, const QString& valueWhatsThis,
00035                  bool allowHourMinute, bool showOnceOnly, QWidget* parent, const char* name = 0);
00036         bool           isReminder() const;
00037         bool           isOnceOnly() const;
00038         int            minutes() const;
00039         void           setMinutes(int minutes, bool dateOnly);
00040         void           setReadOnly(bool);
00041         void           setDateOnly(bool dateOnly);
00042         void           setMaximum(int hourmin, int days);
00043         void           setFocusOnCount();
00044         void           setOnceOnly(bool);
00045         void           enableOnceOnly(bool enable);
00046 
00047         static QString i18n_first_recurrence_only();    // plain text of 'Reminder for first recurrence only' checkbox
00048         static QString i18n_u_first_recurrence_only();  // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
00049 
00050     protected slots:
00051         void           slotReminderToggled(bool);
00052 
00053     private:
00054         TimeSelector*  mTime;
00055         CheckBox*      mOnceOnly;
00056         bool           mReadOnly;           // the widget is read only
00057         bool           mOnceOnlyEnabled;    // 'mOnceOnly' checkbox is allowed to be enabled
00058 };
00059 
00060 #endif // REMINDER_H
KDE Home | KDE Accessibility Home | Description of Access Keys