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,2010 David Jarvie <djarvie@kde.org> 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 00077 // KDE5: make protected to prevent accidental usage 00078 bool operator==( const CustomProperties &properties ) const; 00079 00089 void setCustomProperty( const QByteArray &app, const QByteArray &key, 00090 const QString &value ); 00091 00099 void removeCustomProperty( const QByteArray &app, const QByteArray &key ); 00100 00109 QString customProperty( const QByteArray &app, const QByteArray &key ) const; 00110 00121 static QByteArray customPropertyName( const QByteArray &app, const QByteArray &key ); 00122 00131 void setNonKDECustomProperty( const QByteArray &name, const QString &value ); 00132 00139 void removeNonKDECustomProperty( const QByteArray &name ); 00140 00148 QString nonKDECustomProperty( const QByteArray &name ) const; 00149 00156 void setCustomProperties( const QMap<QByteArray, QString> &properties ); 00157 00162 QMap<QByteArray, QString> customProperties() const; 00163 00169 // KDE5: make protected to prevent accidental usage 00170 CustomProperties &operator=( const CustomProperties &other ); 00171 00172 protected: 00178 virtual void customPropertyUpdated() {} 00179 00180 private: 00181 //@cond PRIVATE 00182 class Private; 00183 Private *const d; 00184 //@endcond 00185 }; 00186 00187 } 00188 00189 #endif