Merge branch 'pool_rebirth'
[tagua/yd.git] / src / global.h
blobb273e2540760947f3199a14cfebbdd8a18c38d4c
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 GLOBAL_H
12 #define GLOBAL_H
14 #include <memory>
15 #include <iostream>
16 #include <QDir>
17 #include "settings.h"
18 #include "foreach.hpp"
19 #undef foreach
20 #define foreach BOOST_FOREACH
22 class MasterSettings : public QObject
23 , public Settings {
24 Q_OBJECT
25 QString m_filename;
26 mutable QDomDocument m_doc;
27 protected:
28 virtual QDomElement node() const;
29 public:
30 MasterSettings(const QString& file);
31 ~MasterSettings();
33 void onChange(QObject* receiver, const char* slot);
34 void changed();
35 void sync();
36 signals:
37 void settingsChanged();
40 extern MasterSettings settings; // yes, I know global objects are evil
42 #endif // GLOBAL_H