Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/viewmanager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 59bddd9..9c3a641 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -605,32 +605,41 @@ void ViewManager::configureFilters() | |||
605 | if (QApplication::desktop()->width() == 480 ) | 605 | if (QApplication::desktop()->width() == 480 ) |
606 | cw = 0; | 606 | cw = 0; |
607 | mActionSelectFilter->setComboWidth( cw ); | 607 | mActionSelectFilter->setComboWidth( cw ); |
608 | saveSettings(); | 608 | saveSettings(); |
609 | } | 609 | } |
610 | 610 | ||
611 | QStringList ViewManager::filterNames() const | 611 | QStringList ViewManager::filterNames() const |
612 | { | 612 | { |
613 | QStringList names( i18n( "No Filter" ) ); | 613 | QStringList names( i18n( "No Filter" ) ); |
614 | 614 | ||
615 | Filter::List::ConstIterator it; | 615 | Filter::List::ConstIterator it; |
616 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) | 616 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) |
617 | names.append( (*it).name() ); | 617 | names.append( (*it).name() ); |
618 | 618 | ||
619 | return names; | 619 | return names; |
620 | } | 620 | } |
621 | Filter ViewManager::getFilterByName( const QString &name ) const | ||
622 | { | ||
623 | Filter::List::ConstIterator it; | ||
624 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) | ||
625 | if ( name == (*it).name() ) | ||
626 | return (*it); | ||
627 | |||
628 | return Filter(); | ||
629 | } | ||
621 | 630 | ||
622 | int ViewManager::filterPosition( const QString &name ) const | 631 | int ViewManager::filterPosition( const QString &name ) const |
623 | { | 632 | { |
624 | int pos = 0; | 633 | int pos = 0; |
625 | 634 | ||
626 | Filter::List::ConstIterator it; | 635 | Filter::List::ConstIterator it; |
627 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it, ++pos ) | 636 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it, ++pos ) |
628 | if ( name == (*it).name() ) | 637 | if ( name == (*it).name() ) |
629 | return pos + 1; | 638 | return pos + 1; |
630 | 639 | ||
631 | return 0; | 640 | return 0; |
632 | } | 641 | } |
633 | 642 | ||
634 | void ViewManager::initActions() | 643 | void ViewManager::initActions() |
635 | { | 644 | { |
636 | //US <ActionList name="view_loadedviews"/> | 645 | //US <ActionList name="view_loadedviews"/> |