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 | * \namespace KRecentDirs |
16 | * \inmodule KIOCore |
17 | * |
18 | * The goal of this namespace is to make sure that, when the user needs to |
19 | * specify a file via the file selection dialog, this dialog will start |
20 | * in the directory most likely to contain the desired files. |
21 | * |
22 | * This works as follows: Each time the file selection dialog is |
23 | * shown, the programmer can specify a "file-class". The file-dialog will |
24 | * then start with the directory associated with this file-class. When |
25 | * the dialog closes, the directory currently shown in the file-dialog |
26 | * will be associated with the file-class. |
27 | * |
28 | * A file-class can either start with ':' or with '::'. If it starts with |
29 | * a single ':' the file-class is specific to the current application. |
30 | * If the file-class starts with '::' it is global to all applications. |
31 | */ |
32 | namespace KRecentDirs |
33 | { |
34 | /*! |
35 | * Returns a list of directories associated with this file-class. |
36 | * The most recently used directory is at the front of the list. |
37 | */ |
38 | KIOCORE_EXPORT QStringList list(const QString &fileClass); |
39 | |
40 | /*! |
41 | * Returns the most recently used directory associated with this file-class. |
42 | */ |
43 | KIOCORE_EXPORT QString dir(const QString &fileClass); |
44 | |
45 | /*! |
46 | * Associates \a directory with \a fileClass |
47 | */ |
48 | KIOCORE_EXPORT void add(const QString &fileClass, const QString &directory); |
49 | } |
50 | |
51 | #endif |
52 | |