1 /* This file is part of the KDE libraries
2 Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
3 Copyright (c) 1999 Preston Brown <pbrown@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
20 // $Id: ksimpleconfig.h,v 1.24 2002/03/03 21:20:26 lunakl Exp $
22 #ifndef _KSIMPLECONFIG_H
23 #define _KSIMPLECONFIG_H
27 class KSimpleConfigPrivate
;
30 * KDE Configuration entries
32 * This is a trivial extension of @ref KConfig for applications that need
33 * only one configuration file and no default system.
34 * A difference with KConfig is that when the data in memory is written back
35 * it is not merged with what is on disk.
36 * Whatever is in memory simply replaces what is on disk entirely.
38 * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
39 * @version $Id: ksimpleconfig.h,v 1.24 2002/03/03 21:20:26 lunakl Exp $
40 * @see KConfigBase KConfig
41 * @short KDE Configuration Management class with deletion ability
43 class KSimpleConfig
: public KConfig
49 * Construct a KSimpleConfig object and make it either read-write
52 * @param pFileName The file used for saving the config data. Either
53 * a full path can be specified or just the filename.
54 * If only a filename is specified, the default
55 * directory for "config" files is used.
56 * @param bReadOnly Whether the object should be read-only.
58 KSimpleConfig( const QString
&fileName
, bool bReadOnly
= false);
63 * Writes back any dirty configuration entries.
65 virtual ~KSimpleConfig();
71 // copy-construction and assignment are not allowed
72 KSimpleConfig( const KSimpleConfig
& );
73 KSimpleConfig
& operator= ( const KSimpleConfig
& rConfig
);
76 virtual void virtual_hook( int id
, void* data
);
78 KSimpleConfigPrivate
*d
;