KCalCore Library
customproperties.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00029 #ifndef KCALCORE_CUSTOMPROPERTIES_H
00030 #define KCALCORE_CUSTOMPROPERTIES_H
00031
00032 #include "kcalcore_export.h"
00033
00034 #include <QtCore/QMap>
00035 #include <QtCore/QString>
00036
00037 namespace KCalCore {
00038
00051 class KCALCORE_EXPORT CustomProperties
00052 {
00053 friend KCALCORE_EXPORT QDataStream &operator<<( QDataStream &s,
00054 const KCalCore::CustomProperties &properties );
00055 friend KCALCORE_EXPORT QDataStream &operator>>( QDataStream &s,
00056 KCalCore::CustomProperties &properties );
00057 public:
00061 CustomProperties();
00062
00067 CustomProperties( const CustomProperties &other );
00068
00072 virtual ~CustomProperties();
00073
00079 bool operator==( const CustomProperties &properties ) const;
00080
00090 void setCustomProperty( const QByteArray &app, const QByteArray &key,
00091 const QString &value );
00092
00100 void removeCustomProperty( const QByteArray &app, const QByteArray &key );
00101
00110 QString customProperty( const QByteArray &app, const QByteArray &key ) const;
00111
00120 static QByteArray customPropertyName( const QByteArray &app, const QByteArray &key );
00121
00134 void setNonKDECustomProperty( const QByteArray &name, const QString &value,
00135 const QString ¶meters = QString() );
00136
00143 void removeNonKDECustomProperty( const QByteArray &name );
00144
00152 QString nonKDECustomProperty( const QByteArray &name ) const;
00153
00162 QString nonKDECustomPropertyParameters( const QByteArray &name ) const;
00163
00170 void setCustomProperties( const QMap<QByteArray, QString> &properties );
00171
00176 QMap<QByteArray, QString> customProperties() const;
00177
00183 CustomProperties &operator=( const CustomProperties &other );
00184
00185 protected:
00191 virtual void customPropertyUpdate();
00192
00198 virtual void customPropertyUpdated();
00199
00204 virtual void virtual_hook( int id, void *data );
00205
00206 private:
00207
00208 class Private;
00209 Private *const d;
00210
00211 };
00212
00216 KCALCORE_EXPORT QDataStream &operator<<( QDataStream &stream,
00217 const KCalCore::CustomProperties &properties );
00218
00222 KCALCORE_EXPORT QDataStream &operator>>( QDataStream &stream,
00223 KCalCore::CustomProperties &properties );
00224
00225 }
00226
00227 #endif