~ubuntu-branches/debian/sid/kde-baseapps/sid

« back to all changes in this revision

Viewing changes to dolphin/src/settings/dolphinsettings.cpp

  • Committer: Package Import Robot
  • Author(s): Modestas Vainius, Eshat Cakar, Pino Toscano
  • Date: 2012-06-09 22:18:08 UTC
  • mfrom: (4.2.1) (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20120609221808-h1l0ekd5qmb8nefr
Tags: 4:4.8.4-1
* New upstream release.

[ Eshat Cakar ]
* Add watch file.
* Bump kde-sc-dev-latest build dependency to version 4:4.8.4.
* Update installed files.

[ Pino Toscano ]
* Move files of the konqueror documentation from kde-baseapps-data to
  konqueror itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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_columnmodesettings.h"
29
 
#include "dolphin_detailsmodesettings.h"
30
 
#include "dolphin_generalsettings.h"
31
 
#include "dolphin_iconsmodesettings.h"
32
 
 
33
 
class DolphinSettingsSingleton
34
 
{
35
 
public:
36
 
    DolphinSettings instance;
37
 
};
38
 
K_GLOBAL_STATIC(DolphinSettingsSingleton, s_settings)
39
 
 
40
 
DolphinSettings& DolphinSettings::instance()
41
 
{
42
 
    return s_settings->instance;
43
 
}
44
 
 
45
 
void DolphinSettings::save()
46
 
{
47
 
    m_generalSettings->writeConfig();
48
 
    m_iconsModeSettings->writeConfig();
49
 
    m_detailsModeSettings->writeConfig();
50
 
    m_columnModeSettings->writeConfig();
51
 
}
52
 
 
53
 
DolphinSettings::DolphinSettings()
54
 
{
55
 
    m_generalSettings = new GeneralSettings();
56
 
    m_iconsModeSettings = new IconsModeSettings();
57
 
    m_detailsModeSettings = new DetailsModeSettings();
58
 
    m_columnModeSettings = new ColumnModeSettings();
59
 
    m_placesModel = new KFilePlacesModel();
60
 
}
61
 
 
62
 
DolphinSettings::~DolphinSettings()
63
 
{
64
 
    delete m_generalSettings;
65
 
    m_generalSettings = 0;
66
 
 
67
 
    delete m_iconsModeSettings;
68
 
    m_iconsModeSettings = 0;
69
 
 
70
 
    delete m_detailsModeSettings;
71
 
    m_detailsModeSettings = 0;
72
 
 
73
 
    delete m_columnModeSettings;
74
 
    m_columnModeSettings = 0;
75
 
 
76
 
    delete m_placesModel;
77
 
    m_placesModel = 0;
78
 
}