summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abconfig.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/abconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abconfig.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp
index a3fd222..2583327 100644
--- a/core/pim/addressbook/abconfig.cpp
+++ b/core/pim/addressbook/abconfig.cpp
@@ -19,7 +19,7 @@ AbConfig::AbConfig( ):
19 19
20AbConfig::~AbConfig() 20AbConfig::~AbConfig()
21{ 21{
22} 22}
23 23
24bool AbConfig::useRegExp() const 24bool AbConfig::useRegExp() const
25{ 25{
@@ -66,6 +66,11 @@ AbConfig::LPSearchMode AbConfig::letterPickerSearch() const
66 return ( AbConfig::LPSearchMode ) m_lpSearchMode; 66 return ( AbConfig::LPSearchMode ) m_lpSearchMode;
67} 67}
68 68
69const QString &AbConfig::category() const
70{
71 return m_category;
72}
73
69void AbConfig::setUseRegExp( bool v ) 74void AbConfig::setUseRegExp( bool v )
70{ 75{
71 m_useRegExp = v ; 76 m_useRegExp = v ;
@@ -121,11 +126,19 @@ void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode )
121 m_changed = true; 126 m_changed = true;
122} 127}
123 128
129void AbConfig::setCategory( const QString &cat )
130{
131 m_category = cat;
132}
133
124void AbConfig::load() 134void AbConfig::load()
125{ 135{
126 // Read Config settings 136 // Read Config settings
127 Config cfg("AddressBook"); 137 Config cfg("AddressBook");
128 138
139 cfg.setGroup( "View" );
140 m_category = cfg.readEntry( "Category", "All" );
141
129 cfg.setGroup("Font"); 142 cfg.setGroup("Font");
130 m_fontSize = cfg.readNumEntry( "fontSize", 1 ); 143 m_fontSize = cfg.readNumEntry( "fontSize", 1 );
131 144
@@ -166,6 +179,9 @@ void AbConfig::save()
166{ 179{
167 if ( m_changed ){ 180 if ( m_changed ){
168 Config cfg("AddressBook"); 181 Config cfg("AddressBook");
182 cfg.setGroup( "View" );
183 cfg.writeEntry( "Category", m_category );
184
169 cfg.setGroup("Font"); 185 cfg.setGroup("Font");
170 cfg.writeEntry("fontSize", m_fontSize); 186 cfg.writeEntry("fontSize", m_fontSize);
171 187
@@ -193,9 +209,9 @@ void AbConfig::save()
193 cfg.writeEntry( "Mainversion", MAINVERSION ); 209 cfg.writeEntry( "Mainversion", MAINVERSION );
194 cfg.writeEntry( "SubVersion", SUBVERSION ); 210 cfg.writeEntry( "SubVersion", SUBVERSION );
195 cfg.writeEntry( "PatchVersion", PATCHVERSION ); 211 cfg.writeEntry( "PatchVersion", PATCHVERSION );
196 212
197 } 213 }
198 214
199} 215}
200 216
201void AbConfig::operator= ( const AbConfig& cnf ) 217void AbConfig::operator= ( const AbConfig& cnf )