Remove KActionCollection::setComponentData: this does not work on a KActionCollection...
[kdepim.git] / kalarm / deferdlg.h
blobb8884089e217b5ad7046b32e848243574f77af06
1 /*
2 * deferdlg.h - dialog to defer an alarm
3 * Program: kalarm
4 * Copyright © 2002-2004,2006,2007,2009 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 "datetime.h"
25 #include <kdialog.h>
27 class AlarmTimeWidget;
30 class DeferAlarmDlg : public KDialog
32 Q_OBJECT
33 public:
34 DeferAlarmDlg(const DateTime& initialDT, bool anyTimeOption, bool cancelButton, QWidget* parent = 0);
35 void setLimit(const DateTime&);
36 DateTime setLimit(const QString& eventID);
37 const DateTime& getDateTime() const { return mAlarmDateTime; }
38 void setDeferMinutes(int mins);
39 int deferMinutes() const { return mDeferMinutes; }
41 protected slots:
42 virtual void slotOk();
43 virtual void slotCancelDeferral();
45 private slots:
46 void slotPastLimit();
48 private:
49 AlarmTimeWidget* mTimeWidget;
50 DateTime mAlarmDateTime;
51 DateTime mLimitDateTime; // latest date/time allowed for deferral
52 QString mLimitEventID; // event from whose recurrences to derive the limit date/time for deferral
53 int mDeferMinutes; // number of minutes deferral selected, or 0 if date/time entered
56 #endif // DEFERDLG_H
58 // vim: et sw=4: