KCalendarCore

journal.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <[email protected]>
5  SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
17 #ifndef KCALCORE_JOURNAL_H
18 #define KCALCORE_JOURNAL_H
19 
20 #include "kcalendarcore_export.h"
21 #include "incidence.h"
22 
23 namespace KCalendarCore
24 {
25 
30 class KCALENDARCORE_EXPORT Journal : public Incidence
31 {
32 public:
37 
41  typedef QVector<Ptr> List;
42 
44  // needed for Akonadi polymorphic payload support
45  typedef Incidence SuperClass;
47 
51  Journal();
52 
54  Journal(const Journal&);
55 
59  ~Journal() override;
60 
65  Q_REQUIRED_RESULT IncidenceType type() const override;
66 
71  Q_REQUIRED_RESULT QByteArray typeStr() const override;
72 
77  Journal *clone() const override;
78 
83  Q_REQUIRED_RESULT QDateTime dateTime(DateTimeRole role) const override;
84 
89  void setDateTime(const QDateTime &dateTime, DateTimeRole role) override;
90 
95  Q_REQUIRED_RESULT QLatin1String mimeType() const override;
96 
101  Q_REQUIRED_RESULT QLatin1String iconName(const QDateTime &recurrenceId = {}) const override;
102 
107  Q_REQUIRED_RESULT bool supportsGroupwareCommunication() const override;
108 
112  Q_REQUIRED_RESULT static QLatin1String journalMimeType();
113 
114 protected:
120  bool equals(const IncidenceBase &journal) const override;
121 
126  IncidenceBase &assign(const IncidenceBase &other) override;
127 
132  void virtual_hook(VirtualHook id, void *data) override;
133 
134 private:
139  bool accept(Visitor &v, const IncidenceBase::Ptr &incidence) override;
140 
147  Journal &operator=(const Journal &other) = delete;
148 
149  // For polymorfic serialization
150  void serialize(QDataStream &out) const override;
151  void deserialize(QDataStream &in) override;
152 
153  //@cond PRIVATE
154  class Private;
155  Private *const d;
156  //@endcond
157 };
158 
159 } // namespace KCalendarCore
160 
161 //@cond PRIVATE
162 Q_DECLARE_TYPEINFO(KCalendarCore::Journal::Ptr, Q_MOVABLE_TYPE);
163 Q_DECLARE_METATYPE(KCalendarCore::Journal::Ptr)
164 Q_DECLARE_METATYPE(KCalendarCore::Journal *)
165 //@endcond
166 
167 #endif
This class provides the interface for a visitor of calendar components.
Definition: visitor.h:31
QSharedPointer< Journal > Ptr
A shared pointer to a Journal object.
Definition: journal.h:36
Provides a Journal in the sense of RFC2445.
Definition: journal.h:30
DateTimeRole
The different types of incidence date/times roles.
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:96
IncidenceType
The different types of incidences, per RFC2445.
This file is part of the API for handling calendar data and defines the Incidence class...
QVector< Ptr > List
List of journals.
Definition: journal.h:41
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:57
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Nov 27 2020 22:52:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.