Kgapi

reminder.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vrátil <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #ifndef LIBKGAPI2_REMINDER_H
10 #define LIBKGAPI2_REMINDER_H
11 
12 #include "object.h"
13 #include "types.h"
14 #include "kgapicalendar_export.h"
15 
16 #include <KCalendarCore/Alarm>
17 #include <KCalendarCore/Incidence>
18 
19 #include <QScopedPointer>
20 
21 namespace KGAPI2
22 {
23 
24 /**
25  * @brief Represents a default calendar reminder.
26  *
27  * @author Daniel Vrátil <[email protected]>
28  * @since 0.4
29  */
30 class KGAPICALENDAR_EXPORT Reminder
31 {
32  public:
33 
34  /**
35  * @brief Constructor
36  */
37  explicit Reminder();
38 
39  /**
40  * @brief Constructor
41  *
42  * @param type Type of the reminder (email, notification, etc.)
43  * @param startOffset How long before the event should the reminder be shown
44  */
45  explicit Reminder(const KCalendarCore::Alarm::Type &type,
46  const KCalendarCore::Duration &startOffset = KCalendarCore::Duration(0));
47 
48  /**
49  * @brief Copy constructor
50  */
51  Reminder(const Reminder &other);
52 
53  /**
54  * @brief Destructor
55  */
56  virtual ~Reminder();
57 
58  bool operator==(const Reminder &other) const;
59 
60  /**
61  * @brief Returns type of the reminder
62  */
63  KCalendarCore::Alarm::Type type() const;
64 
65  /**
66  * @brief Sets type of the reminder
67  *
68  * @param type
69  */
70  void setType(KCalendarCore::Alarm::Type type);
71 
72  /**
73  * @brief Returns how long before the event should reminder be shown
74  */
75  KCalendarCore::Duration startOffset() const;
76 
77  /**
78  * @brief Sets how long before the event should reminder be shown
79  */
80  void setStartOffset(const KCalendarCore::Duration &startOffset);
81 
82  /**
83  * @brief Converts the reminder to a KCalendarCore::Alarm
84  *
85  * @param incidence An incidence on which the reminder should be applied
86  * @return Returns a new KCalendarCore::Alarm
87  */
88  KCalendarCore::Alarm *toAlarm(KCalendarCore::Incidence *incidence) const;
89 
90  private:
91  class Private;
93 };
94 
95 } // namespace KGAPI2
96 
97 #endif // LIBKGAPI2_REMINDER_H
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:16
Represents a default calendar reminder.
Definition: reminder.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:10:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.