2 * deferdlg.h - dialog to defer an alarm
4 * Copyright © 2002-2004,2006,2007-2012 by David Jarvie <djarvie@kde.org>
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.
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.
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.
26 #include <kalarmcal/datetime.h>
27 #include <AkonadiCore/collection.h>
30 class AlarmTimeWidget
;
31 namespace KAlarmCal
{ class KAEvent
; }
33 using namespace KAlarmCal
;
36 class DeferAlarmDlg
: public KDialog
40 DeferAlarmDlg(const DateTime
& initialDT
, bool anyTimeOption
, bool cancelButton
, QWidget
* parent
= Q_NULLPTR
);
41 void setLimit(const DateTime
&);
42 DateTime
setLimit(const KAEvent
& event
);
43 const DateTime
& getDateTime() const { return mAlarmDateTime
; }
44 void setDeferMinutes(int mins
);
45 int deferMinutes() const { return mDeferMinutes
; }
48 virtual void slotOk();
49 virtual void slotCancelDeferral();
55 AlarmTimeWidget
* mTimeWidget
;
56 DateTime mAlarmDateTime
;
57 DateTime mLimitDateTime
; // latest date/time allowed for deferral
58 EventId mLimitEventId
; // event IDs from whose recurrences to derive the limit date/time for deferral
59 int mDeferMinutes
; // number of minutes deferral selected, or 0 if date/time entered