Summary: | wish: search history list | ||
---|---|---|---|
Product: | [Applications] kphotoalbum | Reporter: | Risto H. Kurppa <risto> |
Component: | general | Assignee: | KPhotoAlbum Bugs <kpabugs> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | bko, blackie, johannes |
Priority: | NOR | Keywords: | junior-jobs |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Risto H. Kurppa
2007-10-26 10:41:46 UTC
Here is a pretty cool junior job for someone who is ready for a slightly more complex junior job (it might take a few days). Here is my suggestion to it: From the users perspective the home page should have a "History item" which shows the last say 15 items. The items should be shown using the breadcrumbs (That is like at the bottom of the browser window). Here are some hints for the code: Step 1: Add a history item to the browser ----------------------------------------- Add the item for Browser/OverviewPage.cpp. You would need to adjust rowCount(), data(), and activateChild(). You may wish to make activateChild() do nothing for the first step. Step 2: Implementing a new page ------------------------------- For this you would need to implement a new page, which you instantiate in the OverviewPage::activateChild(). You do so by subclassing QAbstractListModel and BrowserPage much similar to the OverviewPage class itself. I'd suggest that you just use canned data for this step. Step 3: Making the new page work -------------------------------- For the new page to work, you would need to actually store the history somewhere in the data structures, and to update those data structures while browsing. The first question to consider will likely be, should the data be saved between sessions or not. I'd suggest not doing so initially, as that might be more work (however, for the "adding a favorites page" bug, we would need the code nevertheless). If you want to save the history in the database, then you would need to add methods to the DB interface (DB/ImageDB.h), which is implemented in XMLDB and SQLDB. I suggest that you keep the DB in mind, but goes for a local storage initially. In the data structure you would need to save the current search. If you go for storing the search in the DB, then you likely need to serialize it somehow). All the info about the current search is available in instances in DB/ImageSearchInfo.h When you have the data structure in place for this, your final task is to populate it during browsing. I think the easiest would be to hook into Browser::BrowserWidget::addAction (Browser/BrowserWidget.cpp). You would need a way to identify when the browser have made it to a "leaf", ie. you do not want a history looking like Jesper & Anne Helene & Noone Else & Mallorca Jesper & Anne Helene & Noone Else Jesper & Anne Helene Jesper But only want the topmost of those. *** Bug 220993 has been marked as a duplicate of this bug. *** |