Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / src / konqsettings.h
blob9eb91e0ac90fdafb11ff10e5a142e34545c1fd21
1 /* This file is part of the KDE project
2 Copyright (C) 1999-2007 David Faure <faure@kde.org>
4 This library 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 library 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 library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef __konq_settings_h__
21 #define __konq_settings_h__
23 #include <ksharedconfig.h>
24 #include <QMap>
25 #include <QString>
26 #include <kconfig.h>
28 class KConfigGroup;
30 // TODO rename this file to konqfmsettings.h, or rename the class to KonqEmbedSettings in a konqembedsettings.h header
32 /**
33 * Konqueror settings coming from KControl modules.
35 * (konquerorrc, group "FMSettings")
37 class KonqFMSettings
39 public:
41 /**
42 * The static instance of KonqFMSettings
44 static KonqFMSettings * settings();
46 /**
47 * Reparse the configuration to update the already-created instances
49 * Warning : you need to call KGlobal::config()->reparseConfiguration()
50 * first (This is not done here so that the caller can avoid too much
51 * reparsing if having several classes from the same config file)
53 static void reparseConfiguration();
55 KSharedConfig::Ptr fileTypesConfig();
57 // Use settings (and mimetype definition files)
58 // to find whether to embed a certain service type or not
59 // Only makes sense in konqueror.
60 bool shouldEmbed( const QString & serviceType ) const;
62 private:
63 /** Destructor. Don't delete any instance by yourself. */
64 virtual ~KonqFMSettings();
66 private:
67 QMap<QString, QString> m_embedMap;
69 KSharedConfig::Ptr m_fileTypesConfig;
71 /** Called by constructor and reparseConfiguration */
72 void init(bool reparse);
74 // There is no default constructor. Use the provided ones.
75 KonqFMSettings();
76 // No copy constructor either. What for ?
77 KonqFMSettings( const KonqFMSettings &);
79 friend class KonqEmbedSettingsSingleton;
82 #endif