org.kde.koala
Class KShortcutList

java.lang.Object
  extended by org.kde.koala.KShortcutList
All Implemented Interfaces:
org.kde.qt.QtSupport
Direct Known Subclasses:
KAccelShortcutList, KActionShortcutList

public class KShortcutList
extends java.lang.Object
implements org.kde.qt.QtSupport

KShortcutList is an abstract base class for KAccelShortcutList and KStdAccel.ShortcutList. It gives you an unified interface for accessing the accelerator lists of KAccel (using KAccelShortcutList), KGlobalAccel (using KAccelShortcutList), and KStdAccel (using KStdAccel.ShortcutList).


Constructor Summary
protected KShortcutList(java.lang.Class dummy)
           
 
Method Summary
 int count()
          Returns the number of entries.
 org.kde.qt.QVariant getOther(int arg1, int index)
          \internal @short \internal
 int index(KKeySequence keySeq)
          Returns the index of the shortcut with he given key sequence.
 int index(java.lang.String sName)
          Returns the index of the shortcut with he given name.
 KInstanceInterface instance()
          The KInstance.
 boolean isConfigurable(int index)
          Checks whether the shortcut with the given index is configurable.
 boolean isGlobal(int index)
          Checks whether the shortcut with the given index is saved in the global configuration.
 java.lang.String label(int index)
          Returns the (i18n'd) label of the shortcut with the given index.
 java.lang.String name(int index)
          Returns the name of the shortcut with the given index.
 boolean readSettings()
           
 boolean readSettings(java.lang.String sConfigGroup)
           
 boolean readSettings(java.lang.String sConfigGroup, KConfigBase pConfig)
          Loads the shortcuts from the given configuration file.
 boolean save()
          Save the shortcut list.
 boolean setOther(int arg1, int index, org.kde.qt.QVariant arg3)
          \internal @short \internal
 boolean setShortcut(int index, KShortcut shortcut)
          Sets the shortcut of the given entry
 KShortcut shortcut(int index)
          Returns the shortcut with the given index.
 KShortcut shortcutDefault(int index)
          Returns default shortcut with the given index.
 java.lang.String whatsThis(int index)
          Returns the (i18n'd) What's This text of the shortcut with the given index.
 boolean writeSettings()
           
 boolean writeSettings(java.lang.String sConfigGroup)
           
 boolean writeSettings(java.lang.String sConfigGroup, KConfigBase pConfig)
           
 boolean writeSettings(java.lang.String sConfigGroup, KConfigBase pConfig, boolean bWriteAll)
           
 boolean writeSettings(java.lang.String sConfigGroup, KConfigBase pConfig, boolean bWriteAll, boolean bGlobal)
          Writes the shortcuts to the given configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KShortcutList

protected KShortcutList(java.lang.Class dummy)
Method Detail

count

public int count()
Returns the number of entries.

Returns:
the number of entries

name

public java.lang.String name(int index)
Returns the name of the shortcut with the given index.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
the name of the shortcut

label

public java.lang.String label(int index)
Returns the (i18n'd) label of the shortcut with the given index.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
the label (i18n'd) of the shortcut

whatsThis

public java.lang.String whatsThis(int index)
Returns the (i18n'd) What's This text of the shortcut with the given index.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
the What's This text (i18n'd) of the shortcut

shortcut

public KShortcut shortcut(int index)
Returns the shortcut with the given index.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
the shortcut
See Also:
shortcutDefault(int)

shortcutDefault

public KShortcut shortcutDefault(int index)
Returns default shortcut with the given index.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
the default shortcut
See Also:
shortcut(int)

isConfigurable

public boolean isConfigurable(int index)
Checks whether the shortcut with the given index is configurable.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
true if configurable, false otherwise

setShortcut

public boolean setShortcut(int index,
                           KShortcut shortcut)
Sets the shortcut of the given entry

Parameters:
index - the index of the shortcut (must be < count())
shortcut - the shortcut

isGlobal

public boolean isGlobal(int index)
Checks whether the shortcut with the given index is saved in the global configuration.

Parameters:
index - the index of the shortcut (must be < count())
Returns:
true if global, false otherwise

index

public int index(java.lang.String sName)
Returns the index of the shortcut with he given name.

Parameters:
sName - the name of the shortcut to search
Returns:
the index of the shortcut, of -1 if not found

index

public int index(KKeySequence keySeq)
Returns the index of the shortcut with he given key sequence.

Parameters:
keySeq - the key sequence to search for
Returns:
the index of the shortcut, of -1 if not found

instance

public KInstanceInterface instance()
The KInstance.

Returns:
the KInstance of the list, can be 0 if not available

getOther

public org.kde.qt.QVariant getOther(int arg1,
                                    int index)
\internal @short \internal


setOther

public boolean setOther(int arg1,
                        int index,
                        org.kde.qt.QVariant arg3)
\internal @short \internal


save

public boolean save()
Save the shortcut list.

Returns:
true if successful, false otherwise

readSettings

public boolean readSettings(java.lang.String sConfigGroup,
                            KConfigBase pConfig)
Loads the shortcuts from the given configuration file.

Parameters:
sConfigGroup - the group in the configuration file
pConfig - the configuration file to load from
Returns:
true if successful, false otherwise

readSettings

public boolean readSettings(java.lang.String sConfigGroup)

readSettings

public boolean readSettings()

writeSettings

public boolean writeSettings(java.lang.String sConfigGroup,
                             KConfigBase pConfig,
                             boolean bWriteAll,
                             boolean bGlobal)
Writes the shortcuts to the given configuration file.

Parameters:
sConfigGroup - the group in the configuration file
pConfig - the configuration file to save to
bWriteAll - true to write all actions
bGlobal - true to write to the global configuration file
Returns:
true if successful, false otherwise

writeSettings

public boolean writeSettings(java.lang.String sConfigGroup,
                             KConfigBase pConfig,
                             boolean bWriteAll)

writeSettings

public boolean writeSettings(java.lang.String sConfigGroup,
                             KConfigBase pConfig)

writeSettings

public boolean writeSettings(java.lang.String sConfigGroup)

writeSettings

public boolean writeSettings()