|
| ||||||||||||
This class represents a collection of KAccelAction objects.
See also: KAccelAction
| KAccelActions ()
| KAccelActions |
Creates a new, empty KAccelActions object.
| KAccelActions ( const KAccelActions& )
| KAccelActions |
Copy constructor (deep copy).
| ~KAccelActions ()
| ~KAccelActions |
[virtual]
| void clear ()
| clear |
Removes all items from this collection.
| bool init ( const KAccelActions &actions )
| init |
Initializes this object with the given actions. It will make a deep copy of all actions.
Parameters:
| actions | the actions to copy |
Returns: true if successful, false otherwise
| bool init ( KConfigBase& config, const QString& sGroup )
| init |
Loads the actions from the given configuration file.
Parameters:
| config | the configuration file to load from |
| sGroup | the group in the configuration file |
Returns: true if successful, false otherwise
| void updateShortcuts ( KAccelActions &shortcuts )
| updateShortcuts |
Updates the shortcuts of all actions in this object with the shortcuts from the given object.
Parameters:
| shortcuts | the collection that contains the new shortcuts |
| int actionIndex ( const QString& sAction )
| actionIndex |
[const]
Retrieves the index of the action with the given name.
Parameters:
| sAction | the action to search |
Returns: the index of the action, or -1 if not found
| KAccelAction* actionPtr ( uint index )
| actionPtr |
Returns the action with the given index.
Parameters:
| index | the index of an action. You must not use an index that is too high. |
Returns: the KAccelAction with the given index
See also: count()
| const KAccelAction* actionPtr ( uint index )
| actionPtr |
[const]
Returns the action with the given index.
Parameters:
| index | the index of an action. You must not use an index that is too high. |
Returns: the KAccelAction with the given index
See also: count()
| KAccelAction* actionPtr ( const QString& sAction )
| actionPtr |
Returns the action with the given name.
Parameters:
| aAction | the name of the action to search |
Returns: the KAccelAction with the given name, or 0 if not found
| const KAccelAction* actionPtr ( const QString& sAction )
| actionPtr |
[const]
Returns the action with the given name.
Parameters:
| aAction | the name of the action to search |
Returns: the KAccelAction with the given name, or 0 if not found
| KAccelAction* actionPtr ( KKeySequence cut )
| actionPtr |
Returns the action with the given key sequence.
Parameters:
| cut | the sequence to search for |
Returns: the KAccelAction with the given sequence, or 0 if not found
| KAccelAction& operator [] ( uint index )
| operator [] |
Returns the action with the given index.
Parameters:
| index | the index of an action. You must not use an index that is too high. |
Returns: the KAccelAction with the given index
See also: actionPtr(), count()
| const KAccelAction& operator [] ( uint index )
| operator [] |
[const]
Returns the action with the given index.
Parameters:
| index | the index of an action. You must not use an index that is too high. |
Returns: the KAccelAction with the given index
See also: actionPtr(), count()
| KAccelAction* insert ( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
const QObject* pObjSlot = 0, const char* psMethodSlot = 0,
bool bConfigurable = true, bool bEnabled = true )
| insert |
Inserts an action into the collection.
Parameters:
| sName | the name of the accelerator |
| sLabel | the label of the accelerator (i18n!) |
| sWhatsThis | the What's This text (18n!) |
| cutDef3 | the default shortcut for 3 modifier systems |
| cutDef4 | the default shortcut for 4 modifier systems |
| pObjSlot | the receiver of a signal when the key has been pressed |
| psMethodSlot | the slot to connect for key presses. Receives an int, as set by setID(), as only argument |
| bConfigurable | if true the user can configure the shortcut |
| bEnabled | true if the accelerator should be enabled |
Returns: the new action
| KAccelAction* insert ( const QString& sName, const QString& sLabel )
| insert |
Inserts an action into the collection.
Parameters:
| sName | the name of the accelerator |
| sLabel | the label of the accelerator (i18n!) |
Returns: the new action
| bool remove ( const QString& sAction )
| remove |
Removes the given action.
Parameters:
| sAction | the name of the action. |
Returns: true if successful, false otherwise
| bool readActions ( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 )
| readActions |
Loads the actions 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
| bool writeActions ( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false )
| writeActions |
[const]
Writes the actions 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
| void emitKeycodeChanged ()
| emitKeycodeChanged |
Emit a keycodeChanged signal.
| uint count ()
| count |
[const]
Returns the number of actions in the collection.
Returns: the number of actions
| KAccelBase* m_pKAccelBase | m_pKAccelBase |
[protected]
| KAccelAction** m_prgActions | m_prgActions |
[protected]
| uint m_nSizeAllocated | m_nSizeAllocated |
[protected]
| uint m_nSize | m_nSize |
[protected]
| void resize ( uint )
| resize |
[protected]
| void insertPtr ( KAccelAction* )
| insertPtr |
[protected]
| Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:15 2003, using kdoc 2.0a54. |