Kgapi

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

KDE's Doxygen guidelines are available online.