1
/***************************************************************************
4
begin : Sun Apr 18 2004
5
Copyright 2004 Otto Bruggeman <otto.bruggeman@home.nl>
6
Copyright 2007 Kevin Kofler <kevin.kofler@chello.at>
7
****************************************************************************/
9
/***************************************************************************
11
** This program is free software; you can redistribute it and/or modify
12
** it under the terms of the GNU General Public License as published by
13
** the Free Software Foundation; either version 2 of the License, or
14
** (at your option) any later version.
16
****************************************************************************/
18
#include "filessettings.h"
21
#include <KConfigGroup>
23
FilesSettings::FilesSettings(QWidget* parent)
24
: SettingsBase(parent)
28
FilesSettings::~FilesSettings()
32
void FilesSettings::loadSettings(KConfig* config)
34
KConfigGroup group(config, m_configGroupName);
36
m_recentSources = group.readEntry("Recent Sources", QStringList());
37
m_lastChosenSourceURL = group.readEntry("LastChosenSourceListEntry", QString());
38
m_recentDestinations = group.readEntry("Recent Destinations", QStringList());
39
m_lastChosenDestinationURL = group.readEntry("LastChosenDestinationListEntry", QString());
40
m_encoding = group.readEntry("Encoding", "default");
43
void FilesSettings::saveSettings(KConfig* config)
45
KConfigGroup group(config, m_configGroupName);
46
group.writeEntry("Recent Sources", m_recentSources);
47
group.writeEntry("Recent Destinations", m_recentDestinations);
48
group.writeEntry("LastChosenSourceListEntry", m_lastChosenSourceURL);
49
group.writeEntry("LastChosenDestinationListEntry", m_lastChosenDestinationURL);
50
group.writeEntry("Encoding", m_encoding);
54
void FilesSettings::setGroup(const QString& groupName)
56
m_configGroupName = groupName;