KRecentDirs

KRecentDirs Namespace Reference

Functions

KIOFILEWIDGETS_EXPORT void add (const QString &fileClass, const QString &directory)
 
KIOFILEWIDGETS_EXPORT QString dir (const QString &fileClass)
 
KIOFILEWIDGETS_EXPORT QStringList list (const QString &fileClass)
 

Detailed Description

The goal of this namespace is to make sure that, when the user needs to specify a file via the file selection dialog, this dialog will start in the directory most likely to contain the desired files.

This works as follows: Each time the file selection dialog is shown, the programmer can specify a "file-class". The file-dialog will then start with the directory associated with this file-class. When the dialog closes, the directory currently shown in the file-dialog will be associated with the file-class.

A file-class can either start with ':' or with '::'. If it starts with a single ':' the file-class is specific to the current application. If the file-class starts with '::' it is global to all applications.

Note
Since 5.96 the file-class '::' syntax is deprecated, for lack of usage.
Since
4.6

Function Documentation

◆ add()

void KRecentDirs::add ( const QString fileClass,
const QString directory 
)

Associates directory with fileClass.

Since
4.6

Definition at line 53 of file krecentdirs.cpp.

◆ dir()

QString KRecentDirs::dir ( const QString fileClass)

Returns the most recently used directory associated with this file-class.

Since
4.6

Definition at line 47 of file krecentdirs.cpp.

◆ list()

QStringList KRecentDirs::list ( const QString fileClass)

Returns a list of directories associated with this file-class.

The most recently used directory is at the front of the list.

Since
4.6

Definition at line 39 of file krecentdirs.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 03:55:01 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.