1/* -*- c++ -*-
2 SPDX-FileCopyrightText: 2000 Waldo Bastian <bastian@kde.org>
3
4 SPDX-License-Identifier: BSD-2-Clause
5*/
6
7#ifndef __KRECENTDIRS_H
8#define __KRECENTDIRS_H
9
10#include <QStringList>
11
12#include "kiocore_export.h"
13
14/**
15 * The goal of this namespace is to make sure that, when the user needs to
16 * specify a file via the file selection dialog, this dialog will start
17 * in the directory most likely to contain the desired files.
18 *
19 * This works as follows: Each time the file selection dialog is
20 * shown, the programmer can specify a "file-class". The file-dialog will
21 * then start with the directory associated with this file-class. When
22 * the dialog closes, the directory currently shown in the file-dialog
23 * will be associated with the file-class.
24 *
25 * A file-class can either start with ':' or with '::'. If it starts with
26 * a single ':' the file-class is specific to the current application.
27 * If the file-class starts with '::' it is global to all applications.
28 */
29namespace KRecentDirs
30{
31/**
32 * Returns a list of directories associated with this file-class.
33 * The most recently used directory is at the front of the list.
34 */
35KIOCORE_EXPORT QStringList list(const QString &fileClass);
36
37/**
38 * Returns the most recently used directory associated with this file-class.
39 */
40KIOCORE_EXPORT QString dir(const QString &fileClass);
41
42/**
43 * Associates @p directory with @p fileClass
44 */
45KIOCORE_EXPORT void add(const QString &fileClass, const QString &directory);
46}
47
48#endif
49

source code of kio/src/core/krecentdirs.h