.TH "KRecentDocument" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KRecentDocument \- Manage the 'Recent Document Menu' entries displayed by applications such as Kicker and Konqueror.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <krecentdocument.h>\fP
.PP
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQStringList\fP \fBrecentDocuments\fP ()"
.br
.ti -1c
.RI "static void \fBadd\fP (const \fBKURL\fP &url)"
.br
.ti -1c
.RI "static void \fBadd\fP (const \fBKURL\fP &url, const \fBQString\fP &desktopEntryName)"
.br
.ti -1c
.RI "static void \fBadd\fP (const \fBQString\fP &documentStr, bool isURL=false)"
.br
.ti -1c
.RI "static void \fBclear\fP ()"
.br
.ti -1c
.RI "static int \fBmaximumItems\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBrecentDocumentDirectory\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Manage the 'Recent Document Menu' entries displayed by applications such as Kicker and Konqueror. 

These entries are automatically generated .desktop files pointing to the current application and document. You should call the static \fBadd()\fP method whenever the user opens or saves a new document if you want it to show up in the menu.
.PP
You don't have to worry about this if you are using any \fBKFileDialog\fP derived class to open and save documents, as it already calls this class. User defined limits on the maximum number of documents to save, etc... are all automatically handled.
.PP
\fBAuthor:\fP
.RS 4
Daniel M. Duley <mosfet@kde.org> 
.RE
.PP

.PP
Definition at line 50 of file krecentdocument.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBQStringList\fP KRecentDocument::recentDocuments ()\fC [static]\fP"
.PP
Return a list of absolute paths to recent document .desktop files, sorted by date. 
.PP
Definition at line 51 of file krecentdocument.cpp.
.PP
References QDir::absFilePath(), QDir::entryList(), QDir::exists(), QDir::mkdir(), KDesktopFile::readURL(), recentDocumentDirectory(), and QDir::remove().
.PP
Referenced by clear().
.SS "void KRecentDocument::add (const \fBKURL\fP & url)\fC [static]\fP"
.PP
Add a new item to the Recent Document menu. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP The url to add. 
.RE
.PP

.PP
Definition at line 75 of file krecentdocument.cpp.
.PP
Referenced by add(), KFileDialog::getSaveFileName(), KEncodingFileDialog::getSaveFileNameAndEncoding(), KFileDialog::getSaveFileNameWId(), KFileDialog::getSaveURL(), KEncodingFileDialog::getSaveURLAndEncoding(), KURLRequesterDlg::getURL(), and KRun::run().
.SS "void KRecentDocument::add (const \fBKURL\fP & url, const \fBQString\fP & desktopEntryName)\fC [static]\fP"
.PP
Add a new item to the Recent Document menu, specifying the application to open it with. 
.PP
The above \fBadd()\fP method uses argv[0] for the app name, which isn't always flexible enough. This method is used when an application launches another one to open a document.
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP The url to add. 
.br
\fIdesktopEntryName\fP The desktopEntryName of the service to use for opening this document. 
.RE
.PP

.PP
Definition at line 80 of file krecentdocument.cpp.
.PP
References QDir::absPath(), QString::arg(), KGlobal::config(), KGlobal::dirs(), endl(), QDir::entryList(), QFile::exists(), QString::fromLatin1(), KConfigBase::group(), kdDebug(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readNumEntry(), recentDocumentDirectory(), KStandardDirs::relativeLocation(), QFile::remove(), QString::replace(), KConfigBase::setDesktopGroup(), KConfigBase::setGroup(), QString::startsWith(), KConfigBase::writeEntry(), and KConfigBase::writePathEntry().
.SS "void KRecentDocument::add (const \fBQString\fP & documentStr, bool isURL = \fCfalse\fP)\fC [static]\fP"
.PP
Add a new item to the Recent Document menu. 
.PP
Calls add( url ).
.PP
\fBParameters:\fP
.RS 4
\fIdocumentStr\fP The full path to the document or URL to add. 
.br
\fIisURL\fP Set to \fCtrue\fP if \fCdocumentStr\fP is an URL and not a local file path. 
.RE
.PP

.PP
Definition at line 148 of file krecentdocument.cpp.
.PP
References add(), and KURL::setPath().
.SS "void KRecentDocument::clear ()\fC [static]\fP"
.PP
Clear the recent document menu of all entries. 
.PP
Definition at line 159 of file krecentdocument.cpp.
.PP
References recentDocuments(), and QDir::remove().
.SS "int KRecentDocument::maximumItems ()\fC [static]\fP"
.PP
Returns the maximum amount of recent document entries allowed. 
.PP
Definition at line 167 of file krecentdocument.cpp.
.PP
References KGlobal::config(), and KConfigBase::readNumEntry().
.SS "\fBQString\fP KRecentDocument::recentDocumentDirectory ()\fC [static]\fP"
.PP
Returns the path to the directory where recent document .desktop files are stored. 
.PP
Definition at line 45 of file krecentdocument.cpp.
.PP
References locateLocal().
.PP
Referenced by add(), and recentDocuments().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
