author | drw <drw> | 2005-02-06 23:12:25 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-06 23:12:25 (UTC) |
commit | 5652634e4ff03370564925ce0856b260c001dc0f (patch) (unidiff) | |
tree | 614cbdec8ff9f4f674a9cb4e5caf44cce1def4f8 /core/pim/addressbook/abconfig.cpp | |
parent | 266d71ee80151b3c97671acc95275aa65b682388 (diff) | |
download | opie-5652634e4ff03370564925ce0856b260c001dc0f.zip opie-5652634e4ff03370564925ce0856b260c001dc0f.tar.gz opie-5652634e4ff03370564925ce0856b260c001dc0f.tar.bz2 |
Convert to OPimMainWindow and UI tweaks. There is still a couple items yet to do...
Diffstat (limited to 'core/pim/addressbook/abconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abconfig.cpp | 22 |
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 | ||
20 | AbConfig::~AbConfig() | 20 | AbConfig::~AbConfig() |
21 | { | 21 | { |
22 | } | 22 | } |
23 | 23 | ||
24 | bool AbConfig::useRegExp() const | 24 | bool 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 | ||
69 | const QString &AbConfig::category() const | ||
70 | { | ||
71 | return m_category; | ||
72 | } | ||
73 | |||
69 | void AbConfig::setUseRegExp( bool v ) | 74 | void 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 | ||
129 | void AbConfig::setCategory( const QString &cat ) | ||
130 | { | ||
131 | m_category = cat; | ||
132 | } | ||
133 | |||
124 | void AbConfig::load() | 134 | void 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 | ||
201 | void AbConfig::operator= ( const AbConfig& cnf ) | 217 | void AbConfig::operator= ( const AbConfig& cnf ) |