SVN_SILENT made messages (.desktop file)
[kdepim.git] / kalarm / deferdlg.h
blob2525e686e337a1fc4a30bb6657893f475b1f382d
1 /*
2 * deferdlg.h - dialog to defer an alarm
3 * Program: kalarm
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.
21 #ifndef DEFERDLG_H
22 #define DEFERDLG_H
24 #include "eventid.h"
26 #include <kalarmcal/datetime.h>
27 #include <AkonadiCore/collection.h>
28 #include <kdialog.h>
30 class AlarmTimeWidget;
31 namespace KAlarmCal { class KAEvent; }
33 using namespace KAlarmCal;
36 class DeferAlarmDlg : public KDialog
38 Q_OBJECT
39 public:
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; }
47 protected Q_SLOTS:
48 virtual void slotOk();
49 virtual void slotCancelDeferral();
51 private Q_SLOTS:
52 void slotPastLimit();
54 private:
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
62 #endif // DEFERDLG_H
64 // vim: et sw=4: