KCalendarCore

customproperties.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2002, 2006, 2010 David Jarvie <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
16 #ifndef KCALCORE_CUSTOMPROPERTIES_H
17 #define KCALCORE_CUSTOMPROPERTIES_H
18 
19 #include "kcalendarcore_export.h"
20 
21 #include <QMap>
22 #include <QString>
23 
24 namespace KCalendarCore
25 {
26 
39 class KCALENDARCORE_EXPORT CustomProperties
40 {
41  friend KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &s,
42  const KCalendarCore::CustomProperties &properties);
43  friend KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &s,
45 public:
50 
55  CustomProperties(const CustomProperties &other);
56 
60  virtual ~CustomProperties();
61 
67  bool operator==(const CustomProperties &properties) const;
68 
78  void setCustomProperty(const QByteArray &app, const QByteArray &key,
79  const QString &value);
80 
88  void removeCustomProperty(const QByteArray &app, const QByteArray &key);
89 
98  Q_REQUIRED_RESULT QString customProperty(const QByteArray &app, const QByteArray &key) const;
99 
108  Q_REQUIRED_RESULT static QByteArray customPropertyName(const QByteArray &app, const QByteArray &key);
109 
122  void setNonKDECustomProperty(const QByteArray &name, const QString &value,
123  const QString &parameters = QString());
124 
131  void removeNonKDECustomProperty(const QByteArray &name);
132 
140  Q_REQUIRED_RESULT QString nonKDECustomProperty(const QByteArray &name) const;
141 
150  Q_REQUIRED_RESULT QString nonKDECustomPropertyParameters(const QByteArray &name) const;
151 
158  void setCustomProperties(const QMap<QByteArray, QString> &properties);
159 
164  Q_REQUIRED_RESULT QMap<QByteArray, QString> customProperties() const;
165 
171  CustomProperties &operator=(const CustomProperties &other);
172 
173 protected:
179  virtual void customPropertyUpdate();
180 
186  virtual void customPropertyUpdated();
187 private:
188  //@cond PRIVATE
189  class Private;
190  Private *const d;
191  //@endcond
192 };
193 
197 KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &stream,
198  const KCalendarCore::CustomProperties &properties);
199 
203 KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &stream,
204  KCalendarCore::CustomProperties &properties);
205 
206 }
207 
208 #endif
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Alarm serializer.
Definition: alarm.cpp:825
A class to manage custom calendar properties.
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
Alarm deserializer.
Definition: alarm.cpp:849
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 Sat Aug 8 2020 22:49:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.