libkcal

customproperties.h
1/*
2 This file is part of libkcal.
3
4 Copyright (c) 2002,2006 David Jarvie <software@astrojar.org.uk>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KCAL_CUSTOMPROPERTIES_H
23#define KCAL_CUSTOMPROPERTIES_H
24
25#include <tqstring.h>
26#include <tqmap.h>
27#include <tdemacros.h>
28
29#include "libkcal_export.h"
30
31namespace KCal {
32
42class LIBKCAL_EXPORT CustomProperties
43{
44 public:
51
52 bool operator==( const CustomProperties & ) const;
53
62 void setCustomProperty( const TQCString &app, const TQCString &key,
63 const TQString &value );
70 void removeCustomProperty( const TQCString &app, const TQCString &key );
79 TQString customProperty( const TQCString &app, const TQCString &key ) const;
80
88 void setNonKDECustomProperty( const TQCString &name, const TQString &value );
94 void removeNonKDECustomProperty( const TQCString &name );
102 TQString nonKDECustomProperty( const TQCString& name ) const;
103
108 void setCustomProperties( const TQMap<TQCString, TQString> &properties );
112 TQMap<TQCString, TQString> customProperties() const;
113
114 protected:
120 virtual void customPropertyUpdated() {}
121
122 private:
123 static bool checkName(const TQCString& name);
124
125 TQMap<TQCString, TQString> mProperties; // custom calendar properties
126
127 class Private;
128 Private *d;
129};
130
131}
132
133#endif
This class represents custom calendar properties.
virtual void customPropertyUpdated()
Called when a custom property has been changed.
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38