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 AbConfig::LPSearchMode AbConfig::letterPickerSearch() const { return ( AbConfig::LPSearchMode ) m_lpSearchMode; } +const QString &AbConfig::category() const +{ + return m_category; +} + void AbConfig::setUseRegExp( bool v ) { m_useRegExp = v ; m_changed = true; } void AbConfig::setUseWildCards( bool v ) @@ -118,17 +123,25 @@ void AbConfig::setFixedBars( const bool fixed ) void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode ) { m_lpSearchMode = mode; m_changed = true; } +void AbConfig::setCategory( const QString &cat ) +{ + m_category = cat; +} + void AbConfig::load() { // Read Config settings Config cfg("AddressBook"); + cfg.setGroup( "View" ); + m_category = cfg.readEntry( "Category", "All" ); + cfg.setGroup("Font"); m_fontSize = cfg.readNumEntry( "fontSize", 1 ); cfg.setGroup("Search"); m_useRegExp = cfg.readBoolEntry( "useRegExp", false ); m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false ); @@ -163,12 +176,15 @@ void AbConfig::load() } void AbConfig::save() { if ( m_changed ){ Config cfg("AddressBook"); + cfg.setGroup( "View" ); + cfg.writeEntry( "Category", m_category ); + cfg.setGroup("Font"); cfg.writeEntry("fontSize", m_fontSize); cfg.setGroup("Search"); cfg.writeEntry("useRegExp", m_useRegExp); cfg.writeEntry("caseSensitive", m_beCaseSensitive); |