Incidenceeditor

alarmdialog.h
1/*
2 SPDX-FileCopyrightText: 2010 Bertjan Broeksema <broeksema@kde.org>
3 SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include <KCalendarCore/Incidence>
11
12#include <QDialog>
13
14namespace Ui
15{
16class AlarmDialog;
17}
18
19namespace IncidenceEditorNG
20{
21class AlarmDialog : public QDialog
22{
24public:
25 enum Unit {
26 Minutes,
27 Hours,
28 Days
29 };
30
31 enum When {
32 BeforeStart = 0,
33 AfterStart,
34 BeforeEnd,
35 AfterEnd
36 };
37
38public:
39 /**
40 Constructs a new alarm dialog.
41 @p incidenceType will influence i18n strings, that will be different for to-dos.
42 */
43 explicit AlarmDialog(KCalendarCore::Incidence::IncidenceType incidenceType, QWidget *parent = nullptr);
44 ~AlarmDialog() override;
45 void load(const KCalendarCore::Alarm::Ptr &alarm);
46 void save(const KCalendarCore::Alarm::Ptr &alarm) const;
47 void setAllowBeginReminders(bool allow);
48 void setAllowEndReminders(bool allow);
49 void setOffset(int offset);
50 void setUnit(Unit unit);
51 void setWhen(When when);
52
53private:
54 void fillCombo();
55 Ui::AlarmDialog *const mUi;
56 const KCalendarCore::Incidence::IncidenceType mIncidenceType;
57 bool mAllowBeginReminders = true;
58 bool mAllowEndReminders = true;
59};
60}
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.