summaryrefslogtreecommitdiffstats
path: root/kalarm/reminder.h
blob: 1403621d272c6f422c0a486e375f2aa97f9849ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 *  reminder.h  -  reminder setting widget
 *  Program:  kalarm
 *  Copyright (C) 2003, 2004 by David Jarvie <software@astrojar.org.uk>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef REMINDER_H
#define REMINDER_H

#include <qframe.h>

class TimeSelector;
class CheckBox;


class Reminder : public QFrame
{
		Q_OBJECT
	public:
		Reminder(const QString& caption, const QString& reminderWhatsThis, const QString& valueWhatsThis,
		         bool allowHourMinute, bool showOnceOnly, QWidget* parent, const char* name = 0);
		bool           isReminder() const;
		bool           isOnceOnly() const;
		int            minutes() const;
		void           setMinutes(int minutes, bool dateOnly);
		void           setReadOnly(bool);
		void           setDateOnly(bool dateOnly);
		void           setMaximum(int hourmin, int days);
		void           setFocusOnCount();
		void           setOnceOnly(bool);
		void           enableOnceOnly(bool enable);

		static QString i18n_first_recurrence_only();    // plain text of 'Reminder for first recurrence only' checkbox
		static QString i18n_u_first_recurrence_only();  // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut

	protected slots:
		void           slotReminderToggled(bool);

	private:
		TimeSelector*  mTime;
		CheckBox*      mOnceOnly;
		bool           mReadOnly;           // the widget is read only
		bool           mOnceOnlyEnabled;    // 'mOnceOnly' checkbox is allowed to be enabled
};

#endif // REMINDER_H