org.kde.koala

Class KRecentFilesAction

public class KRecentFilesAction extends KListAction

This class is an action to handle a recent files submenu. The best way to create the action is to use KStdAction.openRecent. Then you simply need to call loadEntries on startup, saveEntries on shutdown, addURL when your application loads/saves a file. See KRecentFilesActionSignals for signals emitted by KRecentFilesAction

Author: Michael Koch

UNKNOWN: Recent files action.

Constructor Summary
protected KRecentFilesAction(Class dummy)
KRecentFilesAction(String text, KShortcut cut, QObject parent, String name, int maxItems)
KRecentFilesAction(String text, KShortcut cut, QObject parent, String name)
KRecentFilesAction(String text, KShortcut cut, QObject parent)
KRecentFilesAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name, int maxItems)
KRecentFilesAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name)
KRecentFilesAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent)
KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject parent, String name, int maxItems)
KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject parent, String name)
KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject parent)
KRecentFilesAction(String text, String pix, KShortcut cut, QObject parent, String name, int maxItems)
KRecentFilesAction(String text, String pix, KShortcut cut, QObject parent, String name)
KRecentFilesAction(String text, String pix, KShortcut cut, QObject parent)
KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name, int maxItems)
KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)
KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent)
KRecentFilesAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name, int maxItems)
KRecentFilesAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)
KRecentFilesAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent)
KRecentFilesAction(QObject parent, String name, int maxItems)
KRecentFilesAction(QObject parent, String name)
KRecentFilesAction(QObject parent)
KRecentFilesAction()
Method Summary
voidaddURL(KURL url)
Add URL to recent files list.
voidaddURL(KURL url, String name)
Add URL to recent files list.
StringclassName()
voidclearURLList()
Removes all entries from the recent files list.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected voiditemSelected(String string)
voidloadEntries(KConfig config, String groupname)
Loads the recent files entries from a given KConfig object.
voidloadEntries(KConfig config)
intmaxItems()
Returns the maximum of items in the recent files list.
protected voidmenuAboutToShow()
protected voidmenuItemActivated(int id)
QMetaObjectmetaObject()
intplug(QWidget widget, int index)
intplug(QWidget widget)
voidremoveURL(KURL url)
Remove an URL from the recent files list.
voidsaveEntries(KConfig config, String groupname)
Saves the current recent files entries to a given KConfig object.
voidsaveEntries(KConfig config)
voidsetMaxItems(int maxItems)
Sets the maximum of items in the recent files list.
protected voidslotActivated(int arg1)
protected voidslotActivated(String arg1)
protected voidslotActivated()
protected voidslotClicked()

Constructor Detail

KRecentFilesAction

protected KRecentFilesAction(Class dummy)

KRecentFilesAction

public KRecentFilesAction(String text, KShortcut cut, QObject parent, String name, int maxItems)

Parameters: text The text that will be displayed. cut The corresponding keyboard accelerator (shortcut). parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(String text, KShortcut cut, QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(String text, KShortcut cut, QObject parent)

KRecentFilesAction

public KRecentFilesAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name, int maxItems)

Parameters: text The text that will be displayed. cut The corresponding keyboard accelerator (shortcut). receiver The SLOT's parent. slot The SLOT to invoke when a URL is selected. Its signature is of the form slotURLSelected( KURL ). parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent)

KRecentFilesAction

public KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject parent, String name, int maxItems)

Parameters: text The text that will be displayed. pix The icons that go with this action. cut The corresponding keyboard accelerator (shortcut). parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject parent)

KRecentFilesAction

public KRecentFilesAction(String text, String pix, KShortcut cut, QObject parent, String name, int maxItems)

Parameters: text The text that will be displayed. pix The dynamically loaded icon that goes with this action. cut The corresponding keyboard accelerator (shortcut). parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(String text, String pix, KShortcut cut, QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(String text, String pix, KShortcut cut, QObject parent)

KRecentFilesAction

public KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name, int maxItems)

Parameters: text The text that will be displayed. pix The icons that go with this action. cut The corresponding keyboard accelerator (shortcut). receiver The SLOT's parent. slot The SLOT to invoke when a URL is selected. Its signature is of the form slotURLSelected( KURL ). parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent)

KRecentFilesAction

public KRecentFilesAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name, int maxItems)

Parameters: text The text that will be displayed. pix The dynamically loaded icon that goes with this action. cut The corresponding keyboard accelerator (shortcut). receiver The SLOT's parent. slot The SLOT to invoke when a URL is selected. Its signature is of the form slotURLSelected( KURL ). parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent)

KRecentFilesAction

public KRecentFilesAction(QObject parent, String name, int maxItems)

Parameters: parent This action's parent. name An internal name for this action. maxItems The maximum number of files to display

UNKNOWN:

KRecentFilesAction

public KRecentFilesAction(QObject parent, String name)

KRecentFilesAction

public KRecentFilesAction(QObject parent)

KRecentFilesAction

public KRecentFilesAction()

Method Detail

addURL

public void addURL(KURL url)
Add URL to recent files list.

Parameters: url The URL of the file

UNKNOWN: Add URL to recent files list.

addURL

public void addURL(KURL url, String name)
Add URL to recent files list.

Parameters: url The URL of the file name The user visible pretty name that appears before the URL

UNKNOWN: Add URL to recent files list.

className

public String className()

clearURLList

public void clearURLList()
Removes all entries from the recent files list.

UNKNOWN: Removes all entries from the recent files list.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

itemSelected

protected void itemSelected(String string)

loadEntries

public void loadEntries(KConfig config, String groupname)
Loads the recent files entries from a given KConfig 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' This method does not effect the active group of KConfig.

UNKNOWN: Loads the recent files entries from a given KConfig object.

loadEntries

public void loadEntries(KConfig config)

maxItems

public int maxItems()
Returns the maximum of items in the recent files list.

UNKNOWN: Returns the maximum of items in the recent files list.

menuAboutToShow

protected void menuAboutToShow()

menuItemActivated

protected void menuItemActivated(int id)

metaObject

public QMetaObject metaObject()

plug

public int plug(QWidget widget, int index)

plug

public int plug(QWidget widget)

removeURL

public void removeURL(KURL url)
Remove an URL from the recent files list.

Parameters: url The URL of the file

UNKNOWN: Remove an URL from the recent files list.

saveEntries

public void saveEntries(KConfig config, String groupname)
Saves the current recent files entries to a given KConfig 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' This method does not effect the active group of KConfig.

UNKNOWN: Saves the current recent files entries to a given KConfig object.

saveEntries

public void saveEntries(KConfig config)

setMaxItems

public void setMaxItems(int maxItems)
Sets the maximum of items in the recent files list. The default for this value is 10 set in the constructor. 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.

UNKNOWN: Sets the maximum of items in the recent files list.

slotActivated

protected void slotActivated(int arg1)

slotActivated

protected void slotActivated(String arg1)

slotActivated

protected void slotActivated()

slotClicked

protected void slotClicked()