diff options
| author | Peter Penz <[email protected]> | 2012-05-13 21:44:58 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-13 21:45:59 +0200 |
| commit | 1426b8d3c785e47fab6312e9d01a21dc265aadb8 (patch) | |
| tree | 0841edf580583a7589a7874978a00d579ea793bb /src/panels/places/placespanel.h | |
| parent | 6039c246eacf69ac3a219d00ba1dd56e44fc6685 (diff) | |
Places Panel: Prepare code to save state of bookmarks
The saving is still disabled currently until 100 % backward
compatibility with KFilePlacesView has been reached.
Diffstat (limited to 'src/panels/places/placespanel.h')
| -rw-r--r-- | src/panels/places/placespanel.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h index 7baefd9e8..780d3f09f 100644 --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -31,6 +31,16 @@ class KItemListController; class PlacesItemEditDialog; class PlacesItemModel; +#ifdef HAVE_NEPOMUK + namespace Nepomuk + { + namespace Query + { + class Term; + } + } +#endif + /** * @brief Combines bookmarks and mounted devices as list. */ @@ -76,6 +86,42 @@ private: */ KStandardItem* createStandardItemFromDialog(PlacesItemEditDialog* dialog) const; + /** + * @return Converts the URL, which contains "virtual" URLs for system-items like + * "search:/documents" into a Nepomuk-Query-URL that will be handled by + * the corresponding IO-slave. Virtual URLs for bookmarks are used to + * be independent from internal format changes. + */ + static KUrl convertedUrl(const KUrl& url); + + /** + * @return URL using the timeline-protocol for searching (see convertedUrl()). + */ + static KUrl createTimelineUrl(const KUrl& url); + + /** + * Helper method for createTimelineUrl(). + * @return String that represents a date-path in the format that + * the timeline-protocol expects. + */ + static QString timelineDateString(int year, int month, int day = 0); + + /** + * @return URL that can be listed by KIO and results in searching + * for a given term. The URL \a url represents a places-internal + * URL like e.g. "search:/documents" (see convertedUrl()). + */ + static KUrl createSearchUrl(const KUrl& url); + +#ifdef HAVE_NEPOMUK + /** + * Helper method for createSearchUrl(). + * @return URL that can be listed by KIO and results in searching + * for the given term. + */ + static KUrl searchUrlForTerm(const Nepomuk::Query::Term& term); +#endif + private: KItemListController* m_controller; PlacesItemModel* m_model; |
