[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] IncSearch in KAddressBook
From:       Anders Lund <anders.lund () lund ! tdcadsl ! dk>
Date:       2002-12-19 10:07:04
[Download RAW message or body]

On Thursday 19 December 2002 10:55, Tobias Koenig wrote:
> On Wed, Dec 18, 2002 at 10:41:23PM +0100, Anders Lund wrote:
> > On Wednesday 18 December 2002 21:51, Tobias Koenig wrote:
> > > Hi,

 Hi Tobias,

> > I think you should call setCurrentItem() rather than setSelected(), and
> > leave it to the view to decide if that should be set selected.
>
> Why? The goal of the incremental search _is_ to select the (partly) typed
> in contact. The views do the same ATM:
>   - getting a text and a field
>   - iterating over all their items and looking for a match
>   - set the first match selected and deselect all others
>
> With the new implementation the ViewManager get the text and field, and
> search a match. Then it deselect all items of the view with
>   mActiveView->setSelected( QString::null, false );
> and set the matched selected
>   mActiveView->setSelected( matched.uid(), true );
>
> Since the code of the incrementalSearch() and setSelected() methods of
> the views differs only in the search/match routine, I see no problem
> with moving this routine to the viewmanager.

Right. Ok.

-anders
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic