1 /*
2  *  reminder.h  -  reminder setting widget
3  *  Program:  kalarm
4  *  SPDX-FileCopyrightText: 2003-2019 David Jarvie <djarvie@kde.org>
5  *
6  *  SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #pragma once
10 
11 #include <QFrame>
12 
13 namespace KAlarmCal { class KADateTime; }
14 class TimeSelector;
15 class CheckBox;
16 class ComboBox;
17 
18 
19 class Reminder : public QFrame
20 {
21         Q_OBJECT
22     public:
23         Reminder(const QString& reminderWhatsThis, const QString& valueWhatsThis,
24                  const QString& beforeAfterWhatsThis, bool allowHourMinute,
25                  bool showOnceOnly, QWidget* parent);
26         void           setAfterOnly(bool after);
27         bool           isReminder() const;
28         bool           isOnceOnly() const;
29         int            minutes() const;
30         void           setMinutes(int minutes, bool dateOnly);
31         void           setReadOnly(bool);
32         void           setDateOnly(bool dateOnly);
33         void           setMaximum(int hourmin, int days);
34         void           setFocusOnCount();
35         void           setOnceOnly(bool);
36         void           enableOnceOnly(bool enable);
37 
38         static QString i18n_chk_FirstRecurrenceOnly();    // text of 'Reminder for first recurrence only' checkbox
39 
40     public Q_SLOTS:
41         void           setDefaultUnits(const KAlarmCal::KADateTime&);
42 
43     Q_SIGNALS:
44         void           changed();
45 
46     private Q_SLOTS:
47         void           slotReminderToggled(bool);
48 
49     private:
50         TimeSelector*  mTime;
51         CheckBox*      mOnceOnly;
52         ComboBox*      mTimeSignCombo;
53         bool           mReadOnly {false};   // the widget is read only
54         bool           mOnceOnlyEnabled;    // 'mOnceOnly' checkbox is allowed to be enabled
55 };
56 
57 
58 // vim: et sw=4:
59