author | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
commit | ea40295e233db219dc2431960e18fb4398ddb75c (patch) (side-by-side diff) | |
tree | 1d654ae51d7f65f4375787105951a8f4f9fc359e /kaddressbook/viewmanager.cpp | |
parent | 640874bb21ea348edb33a54690ad225e0efdd1e4 (diff) | |
download | kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.zip kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.gz kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.bz2 |
added better searching in kapi
Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/viewmanager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index c6baeac..f4fb08b 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -40,97 +40,106 @@ $Id$ #include <kmultipledrag.h> #include <ktrader.h> #include <kurldrag.h> #include "addresseeutil.h" #else //KAB_EMBEDDED #include "views/kaddressbookiconview.h" #include "views/kaddressbooktableview.h" #include "views/kaddressbookcardview.h" #include "kaddressbookview.h" #include <qaction.h> #include <qmessagebox.h> #include <qpopupmenu.h> #include <kconfigbase.h> #endif //KAB_EMBEDDED #include <kdebug.h> #include <kactionclasses.h> #include <qlayout.h> #include <qwidgetstack.h> #include <kabc/addressbook.h> #include "filtereditdialog.h" #include "addviewdialog.h" #include "kabcore.h" #include "kabprefs.h" #include "viewmanager.h" ViewManager::ViewManager( KABCore *core, QWidget *parent, const char *name ) : QWidget( parent, name ), mCore( core ), mActiveView( 0 ) { initGUI(); initActions(); mViewDict.setAutoDelete( true ); createViewFactories(); } ViewManager::~ViewManager() { unloadViews(); mViewFactoryDict.clear(); } - +void ViewManager::scrollUP() +{ + if ( mActiveView ) + mActiveView->scrollUP(); +} +void ViewManager::scrollDOWN() +{ + if ( mActiveView ) + mActiveView->scrollDOWN(); +} void ViewManager::restoreSettings() { mViewNameList = KABPrefs::instance()->mViewNames; QString activeViewName = KABPrefs::instance()->mCurrentView; mActionSelectView->setItems( mViewNameList ); // Filter mFilterList = Filter::restore( mCore->config(), "Filter" ); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); // Tell the views to reread their config, since they may have // been modified by global settings QString _oldgroup = mCore->config()->group(); QDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); it.current()->readConfig( mCore->config() ); } setActiveView( activeViewName ); mActionDeleteView->setEnabled( mViewNameList.count() > 1 ); } void ViewManager::saveSettings() { QString _oldgroup = mCore->config()->group(); QDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); #ifdef DESKTOP_VERSION (*it)->writeConfig( mCore->config() ); #else (*it).writeConfig( mCore->config() ); #endif } Filter::save( mCore->config(), "Filter", mFilterList ); KABPrefs::instance()->mCurrentFilter = mActionSelectFilter->currentItem(); // write the view name list KABPrefs::instance()->mViewNames = mViewNameList; KABPrefs::instance()->mCurrentView = mActiveView->caption(); } |