removed clock pref widget. clock prefs are definitively part of the lua theme.
[kboard.git] / src / mastersettings.h
blob1ceb69beb38302846a10012910e02e501c099ea6
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef MASTERSETTINGS_H
12 #define MASTERSETTINGS_H
14 #include <memory>
15 #include <iostream>
16 #include <set>
17 #include <map>
18 #include <QDir>
19 #include "settings.h"
20 #include "foreach.hpp"
21 #undef foreach
22 #define foreach BOOST_FOREACH
24 class MasterSettings : public QObject
25 , public Settings {
26 Q_OBJECT
28 private:
29 typedef std::set<std::pair<QObject*, const char*> > SlotSet;
30 typedef std::map<int, SlotSet> SlotMap;
32 SlotMap m_slots;
33 QString m_filename;
34 mutable QDomDocument m_doc;
36 private slots:
37 void obj_destroyed(QObject* o);
39 protected:
40 virtual QDomElement node() const;
42 public:
43 MasterSettings(const QString& file);
44 ~MasterSettings();
46 void onChange(QObject* receiver, const char* slot, int priority = 0);
47 void changed();
48 void sync();
51 extern MasterSettings settings; // yes, I know global objects are evil
53 #endif // MASTERSETTINGS_H