.TH "KRecentFilesAction" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KRecentFilesAction \- This class is an action to handle a recent files submenu. Recent files action.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kaction.h>\fP
.PP
Inherits \fBKListAction\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBsetMaxItems\fP (uint maxItems)"
.br
.RI "\fISets the maximum of items in the recent files list. \fP"
.ti -1c
.RI "void \fBloadEntries\fP (\fBKConfig\fP *config, \fBQString\fP groupname=QString::null)"
.br
.RI "\fILoads the recent files entries from a given \fBKConfig\fP object. \fP"
.ti -1c
.RI "void \fBsaveEntries\fP (\fBKConfig\fP *config, \fBQString\fP groupname=QString::null)"
.br
.RI "\fISaves the current recent files entries to a given \fBKConfig\fP object. \fP"
.ti -1c
.RI "void \fBaddURL\fP (const  \fBKURL\fP &url)"
.br
.RI "\fIAdd URL to recent files list. \fP"
.ti -1c
.RI "void \fBremoveURL\fP (const  \fBKURL\fP &url)"
.br
.RI "\fIRemove an URL from the recent files list. \fP"
.ti -1c
.RI "void \fBclearURLList\fP ()"
.br
.RI "\fIRemoves all entries from the recent files list. \fP"
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBurlSelected\fP (const  \fBKURL\fP &url)"
.br
.RI "\fIThis signal gets emited when the user selects an URL. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKRecentFilesAction\fP (const  \fBQString\fP &text, const  KShortcut &cut, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "\fBKRecentFilesAction\fP (const  \fBQString\fP &text, const  KShortcut &cut, const  \fBQObject\fP *receiver, const  char *slot, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "\fBKRecentFilesAction\fP (const  \fBQString\fP &text, const  \fBQIconSet\fP &pix, const  KShortcut &cut, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "\fBKRecentFilesAction\fP (const  \fBQString\fP &text, const  \fBQString\fP &pix, const  KShortcut &cut, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "\fBKRecentFilesAction\fP (const  \fBQString\fP &text, const  \fBQIconSet\fP &pix, const  KShortcut &cut, const  \fBQObject\fP *receiver, const  char *slot, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "\fBKRecentFilesAction\fP (const  \fBQString\fP &text, const  \fBQString\fP &pix, const  KShortcut &cut, const  \fBQObject\fP *receiver, const  char *slot, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "\fBKRecentFilesAction\fP (\fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0, uint maxItems=10)"
.br
.ti -1c
.RI "virtual \fB~KRecentFilesAction\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "uint \fBmaxItems\fP () const "
.br
.RI "\fIReturns the maximum of items in the recent files list. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBitemSelected\fP (const  \fBQString\fP &string)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is an action to handle a recent files submenu. Recent files action. 

The best way to create the action is to use \fBKStdAction::openRecent\fP. Then you simply need to call \fBloadEntries\fP on startup, \fBsaveEntries\fP on shutdown, \fBaddURL\fP when your application loads/saves a file.
.PP
\fBAuthor:\fP
.RS 4
Michael Koch 
.RE
.PP

.PP
Definition at line 1188 of file kaction.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KRecentFilesAction::KRecentFilesAction (const \fBQString\fP & text, const KShortcut & cut, \fBQObject\fP * parent, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2013 of file kaction.cpp.
.PP
References KStdAccel::cut(), maxItems(), and KStdAccel::name().
.SS "KRecentFilesAction::KRecentFilesAction (const \fBQString\fP & text, const KShortcut & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's parent. 
.br
\fIslot\fP The SLOT to invoke when a URL is selected. Its signature is of the form slotURLSelected( const KURL & ). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2025 of file kaction.cpp.
.PP
References QObject::connect(), KStdAccel::cut(), maxItems(), KStdAccel::name(), and urlSelected().
.SS "KRecentFilesAction::KRecentFilesAction (const \fBQString\fP & text, const \fBQIconSet\fP & pix, const KShortcut & cut, \fBQObject\fP * parent, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The icons that go with this action. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2043 of file kaction.cpp.
.PP
References KStdAccel::cut(), maxItems(), and KStdAccel::name().
.SS "KRecentFilesAction::KRecentFilesAction (const \fBQString\fP & text, const \fBQString\fP & pix, const KShortcut & cut, \fBQObject\fP * parent, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The dynamically loaded icon that goes with this action. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2056 of file kaction.cpp.
.PP
References KStdAccel::cut(), maxItems(), and KStdAccel::name().
.SS "KRecentFilesAction::KRecentFilesAction (const \fBQString\fP & text, const \fBQIconSet\fP & pix, const KShortcut & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The icons that go with this action. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's parent. 
.br
\fIslot\fP The SLOT to invoke when a URL is selected. Its signature is of the form slotURLSelected( const KURL & ). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2069 of file kaction.cpp.
.PP
References QObject::connect(), KStdAccel::cut(), maxItems(), KStdAccel::name(), and urlSelected().
.SS "KRecentFilesAction::KRecentFilesAction (const \fBQString\fP & text, const \fBQString\fP & pix, const KShortcut & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The dynamically loaded icon that goes with this action. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's parent. 
.br
\fIslot\fP The SLOT to invoke when a URL is selected. Its signature is of the form slotURLSelected( const KURL & ). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2088 of file kaction.cpp.
.PP
References QObject::connect(), KStdAccel::cut(), maxItems(), KStdAccel::name(), and urlSelected().
.SS "KRecentFilesAction::KRecentFilesAction (\fBQObject\fP * parent = 0, const char * name = 0, uint maxItems = 10)"
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.br
\fImaxItems\fP The maximum number of files to display 
.RE
.PP
Definition at line 2107 of file kaction.cpp.
.PP
References maxItems(), and KStdAccel::name().
.SS "KRecentFilesAction::~\fBKRecentFilesAction\fP ()\fC [virtual]\fP"
.PP
Destructor. Definition at line 2125 of file kaction.cpp.
.SH "Member Function Documentation"
.PP 
.SS "uint KRecentFilesAction::maxItems () const"
.PP
Returns the maximum of items in the recent files list. Definition at line 2130 of file kaction.cpp.
.PP
Referenced by KRecentFilesAction().
.SS "void KRecentFilesAction::setMaxItems (uint maxItems)\fC [slot]\fP"
.PP
Sets the maximum of items in the recent files list. The default for this value is 10 set in the constructor.
.PP
If this value is lesser than the number of items currently in the recent files list the last items are deleted until the number of items are equal to the new maximum. Definition at line 2135 of file kaction.cpp.
.PP
References KSelectAction::items(), and KSelectAction::setItems().
.SS "void KRecentFilesAction::loadEntries (\fBKConfig\fP * config, \fBQString\fP groupname = QString::null)\fC [slot]\fP"
.PP
Loads the recent files entries from a given \fBKConfig\fP object. You can provide the name of the group used to load the entries. If the groupname is empty, entries are load from a group called 'RecentFiles'
.PP
This method does not effect the active group of \fBKConfig\fP. Definition at line 2193 of file kaction.cpp.
.PP
References KConfigBase::group(), QString::isEmpty(), QString::isNull(), KStdAccel::key(), KConfigBase::readEntry(), KConfigBase::setGroup(), and KSelectAction::setItems().
.SS "void KRecentFilesAction::saveEntries (\fBKConfig\fP * config, \fBQString\fP groupname = QString::null)\fC [slot]\fP"
.PP
Saves the current recent files entries to a given \fBKConfig\fP object. You can provide the name of the group used to load the entries. If the groupname is empty, entries are saved to a group called 'RecentFiles'
.PP
This method does not effect the active group of \fBKConfig\fP. Definition at line 2222 of file kaction.cpp.
.PP
References KConfigBase::deleteGroup(), KConfigBase::group(), QString::isEmpty(), KSelectAction::items(), KStdAccel::key(), KConfigBase::setGroup(), and KConfigBase::writeEntry().
.SS "void KRecentFilesAction::addURL (const \fBKURL\fP & url)\fC [slot]\fP"
.PP
Add URL to recent files list. \fBParameters:\fP
.RS 4
\fIurl\fP The URL of the file 
.RE
.PP
Definition at line 2155 of file kaction.cpp.
.PP
References KSelectAction::items(), KURL::prettyURL(), and KSelectAction::setItems().
.SS "void KRecentFilesAction::removeURL (const \fBKURL\fP & url)\fC [slot]\fP"
.PP
Remove an URL from the recent files list. \fBParameters:\fP
.RS 4
\fIurl\fP The URL of the file 
.RE
.PP
Definition at line 2175 of file kaction.cpp.
.PP
References KSelectAction::items(), KURL::prettyURL(), and KSelectAction::setItems().
.SS "void KRecentFilesAction::clearURLList ()\fC [slot]\fP"
.PP
Removes all entries from the recent files list. Definition at line 2188 of file kaction.cpp.
.PP
References KSelectAction::clear().
.SS "void KRecentFilesAction::urlSelected (const \fBKURL\fP & url)\fC [signal]\fP"
.PP
This signal gets emited when the user selects an URL. \fBParameters:\fP
.RS 4
\fIurl\fP The URL thats the user selected. 
.RE
.PP
Referenced by KRecentFilesAction().

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