1
/* This file is part of the KDE project
2
Copyright (C) 2007 Jarosław Staniek <staniek@kde.org>
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this program; see the file COPYING. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
20
#ifndef KEXI_UTILS_PROPERTYMAP_H
21
#define KEXI_UTILS_PROPERTYMAP_H
23
#include "kexiutils_export.h"
30
//! @short A simple property map
32
Some classes may need internal property system, not defined as Qt proprety
33
system and not publicly available (e.g. KexiPart class).
34
Property names are not case-sensitive.
35
This class is for use by other classes by inheriting.
37
class KEXIUTILS_EXPORT InternalPropertyMap
40
InternalPropertyMap();
41
~InternalPropertyMap();
43
/*! \returns property value for name \a name.
44
If \a defaultValue is provided and there is no property with
45
specified name, \a defaultValue is returned. */
46
QVariant internalPropertyValue(const QByteArray& name,
47
const QVariant& defaultValue = QVariant()) const;
49
/*! Sets property value \a value for property \a name.
50
If \a value is null, the property is deleted. */
51
void setInternalPropertyValue(const QByteArray& name, const QVariant& value);