1
1
/***************************************************************************
2
filessettings.cpp - description
4
begin : Sun Apr 18 2004
5
copyright : (C) 2004 Otto Bruggeman
6
email : otto.bruggeman@home.nl
4
begin : Sun Apr 18 2004
5
Copyright 2004 Otto Bruggeman <otto.bruggeman@home.nl>
6
Copyright 2007 Kevin Kofler <kevin.kofler@chello.at>
8
7
****************************************************************************/
10
9
/***************************************************************************
17
16
****************************************************************************/
18
#include "filessettings.h"
19
20
#include <kapplication.h>
20
21
#include <kconfig.h>
22
#include "filessettings.h"
22
#include <kconfiggroup.h>
24
24
FilesSettings::FilesSettings( QWidget* parent )
25
25
: SettingsBase( parent )
33
33
void FilesSettings::loadSettings( KConfig* config )
35
config->setGroup( m_configGroupName );
35
KConfigGroup group( config, m_configGroupName );
37
m_recentSources = config->readListEntry( "Recent Sources" );
38
m_lastChosenSourceURL = config->readEntry ( "LastChosenSourceListEntry", "" );
39
m_recentDestinations = config->readListEntry( "Recent Destinations" );
40
m_lastChosenDestinationURL = config->readEntry ( "LastChosenDestinationListEntry", "" );
41
m_encoding = config->readEntry ( "Encoding", "default" );
37
m_recentSources = group.readEntry( "Recent Sources", QStringList() );
38
m_lastChosenSourceURL = group.readEntry ( "LastChosenSourceListEntry", "" );
39
m_recentDestinations = group.readEntry( "Recent Destinations", QStringList() );
40
m_lastChosenDestinationURL = group.readEntry ( "LastChosenDestinationListEntry", "" );
41
m_encoding = group.readEntry ( "Encoding", "default" );
44
44
void FilesSettings::saveSettings( KConfig* config )
46
config->setGroup( m_configGroupName );
47
config->writeEntry( "Recent Sources", m_recentSources );
48
config->writeEntry( "Recent Destinations", m_recentDestinations );
49
config->writeEntry( "LastChosenSourceListEntry", m_lastChosenSourceURL );
50
config->writeEntry( "LastChosenDestinationListEntry", m_lastChosenDestinationURL );
51
config->writeEntry( "Encoding", m_encoding );
46
KConfigGroup group( config, m_configGroupName );
47
group.writeEntry( "Recent Sources", m_recentSources );
48
group.writeEntry( "Recent Destinations", m_recentDestinations );
49
group.writeEntry( "LastChosenSourceListEntry", m_lastChosenSourceURL );
50
group.writeEntry( "LastChosenDestinationListEntry", m_lastChosenDestinationURL );
51
group.writeEntry( "Encoding", m_encoding );