KCal Library
customproperties.h
Go to the documentation of this file.00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 2002,2006 David Jarvie <software@astrojar.org.uk> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00029 #ifndef KCAL_CUSTOMPROPERTIES_H 00030 #define KCAL_CUSTOMPROPERTIES_H 00031 00032 #include "kcal_export.h" 00033 00034 #include <QtCore/QString> 00035 #include <QtCore/QMap> 00036 #include <QtCore/QByteArray> 00037 00038 namespace KCal { 00039 00052 class KCAL_EXPORT CustomProperties 00053 { 00054 public: 00058 CustomProperties(); 00059 00064 CustomProperties( const CustomProperties &other ); 00065 00069 virtual ~CustomProperties(); 00070 00075 bool operator==( const CustomProperties &properties ) const; 00076 00086 void setCustomProperty( const QByteArray &app, const QByteArray &key, 00087 const QString &value ); 00088 00096 void removeCustomProperty( const QByteArray &app, const QByteArray &key ); 00097 00106 QString customProperty( const QByteArray &app, const QByteArray &key ) const; 00107 00116 void setNonKDECustomProperty( const QByteArray &name, const QString &value ); 00117 00124 void removeNonKDECustomProperty( const QByteArray &name ); 00125 00133 QString nonKDECustomProperty( const QByteArray &name ) const; 00134 00141 void setCustomProperties( const QMap<QByteArray, QString> &properties ); 00142 00147 QMap<QByteArray, QString> customProperties() const; 00148 00152 CustomProperties &operator=( const CustomProperties &other ); 00153 00154 protected: 00160 virtual void customPropertyUpdated() {} 00161 00162 private: 00163 //@cond PRIVATE 00164 class Private; 00165 Private *const d; 00166 //@endcond 00167 }; 00168 00169 } 00170 00171 #endif