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>
30 // TODO rename this file to konqfmsettings.h, or rename the class to KonqEmbedSettings in a konqembedsettings.h header
33 * Konqueror settings coming from KControl modules.
35 * (konquerorrc, group "FMSettings")
42 * The static instance of KonqFMSettings
44 static KonqFMSettings
* settings();
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;
63 /** Destructor. Don't delete any instance by yourself. */
64 virtual ~KonqFMSettings();
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.
76 // No copy constructor either. What for ?
77 KonqFMSettings( const KonqFMSettings
&);
79 friend class KonqEmbedSettingsSingleton
;