Akonadi Calendar

blockalarmsattribute.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
3  SPDX-FileContributor: Tobias Koenig <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include "akonadi-calendar_export.h"
11 #include <KCalendarCore/Alarm>
12 
13 #include <attribute.h>
14 
15 namespace Akonadi
16 {
17 /**
18  * @short An Attribute that marks that alarms from a calendar collection are blocked.
19  *
20  * A calendar collection which has this attribute set won't be evaluated by korgac and
21  * therefore it's alarms won't be used, unless explicitly unblocked in blockAlarmType().
22  *
23  * @author Tobias Koenig <[email protected]>
24  * @see Akonadi::Attribute
25  * @since 4.11
26  */
27 class AKONADI_CALENDAR_EXPORT BlockAlarmsAttribute : public Akonadi::Attribute
28 {
29 public:
30  /**
31  * Creates a new block alarms attribute.
32  */
34 
35  /**
36  * Destroys the block alarms attribute.
37  */
38  ~BlockAlarmsAttribute() override;
39 
40  /**
41  * Blocks or unblocks given alarm type.
42  *
43  * By default, all alarm types are blocked.
44  *
45  * @since 4.11
46  */
47  void blockAlarmType(KCalendarCore::Alarm::Type type, bool block = true);
48 
49  /**
50  * Blocks or unblocks every alarm type.
51  *
52  * By default, all alarm types are blocked.
53  *
54  * @since 5.0
55  */
56  void blockEverything(bool block = true);
57 
58  /**
59  * Returns whether given alarm type is blocked or not.
60  *
61  * @since 4.11
62  */
63  bool isAlarmTypeBlocked(KCalendarCore::Alarm::Type type) const;
64 
65  /**
66  * Returns whether all alarms are blocked or not.
67  *
68  * @since 5.0
69  */
70 
71  bool isEverythingBlocked() const;
72 
73  QByteArray type() const override;
74  BlockAlarmsAttribute *clone() const override;
75  QByteArray serialized() const override;
76  void deserialize(const QByteArray &data) override;
77 
78 private:
79  Q_DISABLE_COPY(BlockAlarmsAttribute)
80  class Private;
81  Private *const d;
82 };
83 }
84 
FreeBusyManager::Singleton.
An Attribute that marks that alarms from a calendar collection are blocked.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jun 19 2021 23:12:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.