]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/dolphinsettings.cpp
Make group-headers less ugly
[dolphin.git] / src / settings / dolphinsettings.cpp
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz (peter.penz@gmx.at), *
3 * Cvetoslav Ludmiloff and Patrice Tremblay *
4 * *
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 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #include "dolphinsettings.h"
22
23 #include <KFilePlacesModel>
24 #include <KComponentData>
25 #include <KLocale>
26 #include <KStandardDirs>
27
28 #include "dolphin_detailsmodesettings.h"
29 #include "dolphin_generalsettings.h"
30 #include "dolphin_iconsmodesettings.h"
31
32 class DolphinSettingsSingleton
33 {
34 public:
35 DolphinSettings instance;
36 };
37 K_GLOBAL_STATIC(DolphinSettingsSingleton, s_settings)
38
39 DolphinSettings& DolphinSettings::instance()
40 {
41 return s_settings->instance;
42 }
43
44 void DolphinSettings::save()
45 {
46 m_generalSettings->writeConfig();
47 }
48
49 DolphinSettings::DolphinSettings()
50 {
51 m_generalSettings = GeneralSettings::self();
52 m_placesModel = new KFilePlacesModel();
53 }
54
55 DolphinSettings::~DolphinSettings()
56 {
57 delete m_placesModel;
58 m_placesModel = 0;
59 }