KDE Search Widget

Benjamin Meyer ben at meyerhome.net
Wed Jan 19 02:51:49 GMT 2005

On Tuesday 18 January 2005 6:07 pm, Benjamin Meyer wrote:
> On Tuesday 18 January 2005 10:52 pm, Shaheed wrote:
> > On Tuesday 18 January 2005 22:05, Benjamin Meyer wrote:
> > > I noticed that a number of KDE applications have begun to sprout simple
> > > search capability within the main window/toolbar.  For example Konq,
> > > KMail, KAddressBook and others.  It might be handy to make a common KDE
> > > search widget so that this simple search will look consistant across
> > > the desktop. Before embarking on making one or enhancing one I figured
> > > it would be wise to solicit suggestions for code already in cvs that
> > > would be perfect for this.
> > >
> > > From looking in kdelibs I see KListViewSearchLine and
> > > KIconViewSearchLine which look like helper functions for ListView and
> > > IconView and really should probably inherit from a common basic search
> > > widget (with the pretty search graphic, list saving/restoring, and
> > > clear).
> >
> > Is KFindDialog what you want (like "find" in konqui)? Or did you mean
> > more along the lines of the "search" in kmail?
> Along the lines of the find in Konq.  It should be a single drop down
> widget with an icon* showing that it is search on the left and possibly a
> clear button on the right when there is text.  Simply, clear and can be
> included in any application.  Now of course KMail would then take that
> basic text widget and then use it for its line edit widget.
> Another thing that the usability team should probably handle is if the
> search should go in the toolbars (like konq) or in the window (kmail).  The
> biggest reason I see for having it in the toolbar is: easy ability to
> hide/show and the search widget typically isn't that wide (see for example
> konq) and having it be across the whole top/bottom just takes up screen
> space.  Again this isn't something that developers could really decide
> sense it is a UI thing and the usability team should probably handle it.
> *The icon is so that it would be instantly recognized and take up almost no
> space unlike having a text widget that says Search:.
> -Benjamin Meyer

Here is an idea for a search widget.  The KSearch widget contains two widgets, 
the clear button and the combo box.  The combo box supports the ability to 
list different searches or sub searches which the user can choose by clicking 
on the icon.

The search on the left doesn't have a menu when you click on the image while 
the right does.

Source and demo application

So for example KMail rather then having a whole Quick Search line would just 
have this one widget in the toolbar.  Rather then having a Status drop down 
box it there would be a dropdown when you click on the search image allowing 
you to specify a specific quick search.  Clean, takes up not much space and 
is easy to recognize.

I really wanted to have the clear button inside of the comboBox on the far 
right so I wouldn't have to make a wrapper widget, but I don't see any easy 
way to put the button inside the combo box and have the text stop before 
reaching it.

Quick todo that I didn't get around to tonight: Give the icon a little down 
arrow when there is a menu and have it save the searches on exit, restore 
from the config on load. 

-Benjamin Meyer

aka icefox
Public Key: http://www.icefox.net/public_key.asc

More information about the kde-core-devel mailing list