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) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/abconfig.cpp | 16 |
1 files changed, 16 insertions, 0 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 | |||
@@ -63,12 +63,17 @@ bool AbConfig::fixedBars() const | |||
63 | 63 | ||
64 | AbConfig::LPSearchMode AbConfig::letterPickerSearch() const | 64 | AbConfig::LPSearchMode AbConfig::letterPickerSearch() const |
65 | { | 65 | { |
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 ; |
72 | m_changed = true; | 77 | m_changed = true; |
73 | } | 78 | } |
74 | void AbConfig::setUseWildCards( bool v ) | 79 | void AbConfig::setUseWildCards( bool v ) |
@@ -118,17 +123,25 @@ void AbConfig::setFixedBars( const bool fixed ) | |||
118 | void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode ) | 123 | void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode ) |
119 | { | 124 | { |
120 | m_lpSearchMode = mode; | 125 | m_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 | ||
132 | cfg.setGroup("Search"); | 145 | cfg.setGroup("Search"); |
133 | m_useRegExp = cfg.readBoolEntry( "useRegExp", false ); | 146 | m_useRegExp = cfg.readBoolEntry( "useRegExp", false ); |
134 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false ); | 147 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false ); |
@@ -163,12 +176,15 @@ void AbConfig::load() | |||
163 | } | 176 | } |
164 | 177 | ||
165 | void AbConfig::save() | 178 | 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 | ||
172 | cfg.setGroup("Search"); | 188 | cfg.setGroup("Search"); |
173 | cfg.writeEntry("useRegExp", m_useRegExp); | 189 | cfg.writeEntry("useRegExp", m_useRegExp); |
174 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); | 190 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); |