Baloo

timelinetools.h
1/*
2 This file is part of the Nepomuk KDE project.
3 SPDX-FileCopyrightText: 2010 Sebastian Trueg <trueg@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef BALOO_TIMELINE_TOOLS_H_
9#define BALOO_TIMELINE_TOOLS_H_
10
11class QString;
12
13#include <QDate>
14#include <QUrl>
15
16namespace Baloo
17{
18/**
19 * The hierarchy in timeline:/ looks as follows:
20 *
21 * /
22 * |- /today
23 * |
24 * |- /calendar
25 * | |- /calendar/2010
26 * | |- /calendar/2010/january
27 * | |- /calendar/2010/january/2010-01-01
28 * | |- /calendar/2009
29 * |
30 * |- /months
31 * | |- /month/2010
32 * | |- /months/2010/january
33 * |
34 * |- /weeks
35 */
37 NoFolder = 0, /// nothing
38 RootFolder, /// the root folder
39 CalendarFolder, /// the calendar folder listing all months
40 MonthFolder, /// a folder listing a month's days (m_date contains the month)
41 DayFolder, /// a folder listing a day (m_date); optionally m_filename is set
42};
43
44/**
45 * Parse a timeline URL like timeline:/today and return the type of folder it
46 * represents. If DayFolder is returned \p date is set to the date that should be listed.
47 * Otherwise it is an invalid date. \p filename is optionally set to the name of the file
48 * in the folder.
49 */
50TimelineFolderType parseTimelineUrl(const QUrl& url, QDate* date, QString* filename = nullptr);
51
52/**
53 * Remove any double slashes, remove any trailing slashes, and
54 * add an initial slash after the scheme.
55 */
57
58}
59
60#endif
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
TimelineFolderType
The hierarchy in timeline:/ looks as follows:
@ CalendarFolder
the root folder
@ RootFolder
nothing
@ MonthFolder
the calendar folder listing all months
@ DayFolder
a folder listing a month's days (m_date contains the month)
TimelineFolderType parseTimelineUrl(const QUrl &url, QDate *date, QString *filename=nullptr)
Parse a timeline URL like timeline:/today and return the type of folder it represents.
QUrl canonicalizeTimelineUrl(const QUrl &url)
Remove any double slashes, remove any trailing slashes, and add an initial slash after the scheme.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:52:28 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.