From 5652634e4ff03370564925ce0856b260c001dc0f Mon Sep 17 00:00:00 2001 From: drw Date: Sun, 06 Feb 2005 23:12:25 +0000 Subject: Convert to OPimMainWindow and UI tweaks. There is still a couple items yet to do... --- (limited to 'core/pim/addressbook/abconfig.cpp') 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( ): AbConfig::~AbConfig() { -} +} bool AbConfig::useRegExp() const { @@ -66,6 +66,11 @@ 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 ; @@ -121,11 +126,19 @@ void AbConfig::setLetterPickerSearch( const AbConfig::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 ); @@ -166,6 +179,9 @@ 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); @@ -193,9 +209,9 @@ void AbConfig::save() cfg.writeEntry( "Mainversion", MAINVERSION ); cfg.writeEntry( "SubVersion", SUBVERSION ); cfg.writeEntry( "PatchVersion", PATCHVERSION ); - + } - + } void AbConfig::operator= ( const AbConfig& cnf ) -- cgit v0.9.0.2