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 { Minutes, Hours, Days };
26
27 enum When { BeforeStart = 0, AfterStart, BeforeEnd, AfterEnd };
28
29public:
30 /**
31 Constructs a new alarm dialog.
32 @p incidenceType will influence i18n strings, that will be different for to-dos.
33 */
34 explicit AlarmDialog(KCalendarCore::Incidence::IncidenceType incidenceType, QWidget *parent = nullptr);
35 ~AlarmDialog() override;
36 void load(const KCalendarCore::Alarm::Ptr &alarm);
37 void save(const KCalendarCore::Alarm::Ptr &alarm) const;
38 void setAllowBeginReminders(bool allow);
39 void setAllowEndReminders(bool allow);
40 void setOffset(int offset);
41 void setUnit(Unit unit);
42 void setWhen(When when);
43
44private:
45 void fillCombo();
46 Ui::AlarmDialog *const mUi;
47 const KCalendarCore::Incidence::IncidenceType mIncidenceType;
48 bool mAllowBeginReminders = true;
49 bool mAllowEndReminders = true;
50};
51}
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 Apr 27 2024 22:14:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.