SVN_SILENT made messages (.desktop file)
[kdepim.git] / incidenceeditor-ng / alarmdialog.h
blob5627c3ebbf04f5ce55297a7492e54b6d8380e337
1 /*
2 Copyright (c) 2010 Bertjan Broeksema <broeksema@kde.org>
3 Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
5 This library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or (at your
8 option) any later version.
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 02110-1301, USA.
21 #ifndef INCIDENCEEDITOR_ALARMDIALOG_H
22 #define INCIDENCEEDITOR_ALARMDIALOG_H
24 #include "incidenceeditors_ng_export.h"
26 #include <KCalCore/Incidence>
28 #include <QDialog>
30 namespace Ui
32 class AlarmDialog;
35 namespace IncidenceEditorNG
38 class INCIDENCEEDITORS_NG_EXPORT AlarmDialog : public QDialog
40 public:
41 enum Unit {
42 Minutes,
43 Hours,
44 Days
47 enum When {
48 BeforeStart = 0,
49 AfterStart,
50 BeforeEnd,
51 AfterEnd
54 public:
55 /**
56 Constructs a new alarm dialog.
57 @p incidenceType will influence i18n strings, that will be different for to-dos.
59 explicit AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType, QWidget *parent = Q_NULLPTR);
60 ~AlarmDialog();
61 void load(const KCalCore::Alarm::Ptr &alarm);
62 void save(const KCalCore::Alarm::Ptr &alarm) const;
63 void setAllowBeginReminders(bool allow);
64 void setAllowEndReminders(bool allow);
65 void setOffset(int offset);
66 void setUnit(Unit unit);
67 void setWhen(When when);
69 private:
70 void fillCombo();
72 private:
73 Ui::AlarmDialog *mUi;
74 KCalCore::Incidence::IncidenceType mIncidenceType;
75 bool mAllowBeginReminders;
76 bool mAllowEndReminders;
81 #endif // INCIDENCEEDITOR_ALARMDIALOG_H