Build, if that was not necessary blame cartman who told me "sure" :-D
[kdepim.git] / libkdepim / configmanager.h
blob9f6555653bbc96aa11c7936a38028849f5050a69
1 /* -*- c++ -*-
2 configmanager.h
4 KMail, the KDE mail client.
5 Copyright (c) 2002 the KMail authors.
6 See file AUTHORS for details
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License,
10 version 2.0, as published by the Free Software Foundation.
11 You should have received a copy of the GNU General Public License
12 along with this program; if not, write to the Free Software Foundation,
13 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
17 #ifndef _KMAIL_CONFIGMANAGER_H_
18 #define _KMAIL_CONFIGMANAGER_H_
20 #include <qobject.h>
22 class KMKernel;
24 namespace KPIM {
26 /**
27 * @short Class for managing a set of config options.
28 * @author Marc Mutz <mutz@kde.org>
29 **/
30 class ConfigManager : public QObject {
31 Q_OBJECT
32 public:
33 /** Commit changes to disk and emit changed() if necessary. */
34 virtual void commit() = 0;
35 /** Re-read the config from disk and forget changes. */
36 virtual void rollback() = 0;
38 /** Check whether there are any unsaved changes. */
39 virtual bool hasPendingChanges() const = 0;
41 signals:
42 /** Emitted whenever a commit changes any configure option */
43 void changed();
45 protected:
46 ConfigManager( QObject * parent=0, const char * name=0 );
47 virtual ~ConfigManager();
52 #endif // _KMAIL_CONFIGMANAGER_H_