00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KCAL_CUSTOMPROPERTIES_H
00023 #define KCAL_CUSTOMPROPERTIES_H
00024
00025 #include <tqstring.h>
00026 #include <tqmap.h>
00027 #include <tdepimmacros.h>
00028
00029 #include "libkcal_export.h"
00030
00031 namespace KCal {
00032
00042 class LIBKCAL_EXPORT CustomProperties
00043 {
00044 public:
00048 CustomProperties();
00049 CustomProperties( const CustomProperties & );
00050 ~CustomProperties();
00051
00052 bool operator==( const CustomProperties & ) const;
00053
00062 void setCustomProperty( const TQCString &app, const TQCString &key,
00063 const TQString &value );
00070 void removeCustomProperty( const TQCString &app, const TQCString &key );
00079 TQString customProperty( const TQCString &app, const TQCString &key ) const;
00080
00088 void setNonKDECustomProperty( const TQCString &name, const TQString &value );
00094 void removeNonKDECustomProperty( const TQCString &name );
00102 TQString nonKDECustomProperty( const TQCString& name ) const;
00103
00108 void setCustomProperties( const TQMap<TQCString, TQString> &properties );
00112 TQMap<TQCString, TQString> customProperties() const;
00113
00114 protected:
00120 virtual void customPropertyUpdated() {}
00121
00122 private:
00123 static bool checkName(const TQCString& name);
00124
00125 TQMap<TQCString, TQString> mProperties;
00126
00127 class Private;
00128 Private *d;
00129 };
00130
00131 }
00132
00133 #endif