You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
565 lines
16 KiB
565 lines
16 KiB
13 years ago
|
/* This file is part of the KDE libraries
|
||
|
Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation; either
|
||
|
version 2 of the License, or (at your option) any later version.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef _KACCELACTION_H
|
||
|
#define _KACCELACTION_H
|
||
|
|
||
13 years ago
|
#include <tqmap.h>
|
||
|
#include <tqptrvector.h>
|
||
|
#include <tqstring.h>
|
||
|
#include <tqvaluevector.h>
|
||
13 years ago
|
|
||
|
#include <kshortcut.h>
|
||
|
|
||
12 years ago
|
class TDEAccelBase;
|
||
13 years ago
|
|
||
13 years ago
|
class TQObject;
|
||
12 years ago
|
class TDEConfig;
|
||
|
class TDEConfigBase;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* @internal
|
||
12 years ago
|
* A TDEAccelAction prepresents an action that can be executed using
|
||
|
* an accelerator key. Each TDEAccelAction has a name, a label, a
|
||
|
* "What's this" string and a @ref TDEShortcut. The user can configure and
|
||
13 years ago
|
* enable/disable them using @ref KKeyDialog.
|
||
|
*
|
||
|
* <pre>
|
||
12 years ago
|
* 1) TDEAccelAction = "Run Command"
|
||
13 years ago
|
* Default3 = "Alt+F2"
|
||
|
* Default4 = "Meta+Enter;Alt+F2"
|
||
12 years ago
|
* 1) TDEShortcut = "Meta+Enter"
|
||
13 years ago
|
* 1) KKeySequence = "Meta+Enter"
|
||
|
* 1) KKey = "Meta+Enter"
|
||
|
* 1) Meta+Enter
|
||
|
* 2) Meta+Keypad_Enter
|
||
12 years ago
|
* 2) TDEShortcut = "Alt+F2"
|
||
13 years ago
|
* 1) KKeySequence = "Alt+F2"
|
||
|
* 1) Alt+F2
|
||
12 years ago
|
* 2) TDEAccelAction = "Something"
|
||
13 years ago
|
* Default3 = ""
|
||
|
* Default4 = ""
|
||
12 years ago
|
* 1) TDEShortcut = "Meta+X,Asterisk"
|
||
13 years ago
|
* 1) KKeySequence = "Meta+X,Asterisk"
|
||
|
* 1) KKey = "Meta+X"
|
||
|
* 1) Meta+X
|
||
|
* 2) KKey = "Asterisk"
|
||
|
* 1) Shift+8 (English layout)
|
||
|
* 2) Keypad_Asterisk
|
||
|
* </pre>
|
||
|
* @short An accelerator action
|
||
12 years ago
|
* @see TDEAccel
|
||
12 years ago
|
* @see TDEGlobalAccel
|
||
13 years ago
|
* @see KKeyChooser
|
||
|
* @see KKeyDialog
|
||
|
*/
|
||
12 years ago
|
class TDEAccelAction
|
||
13 years ago
|
{
|
||
|
public:
|
||
|
/**
|
||
12 years ago
|
* Creates an empty TDEAccelAction.
|
||
13 years ago
|
* @see clear()
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction();
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Copy constructor.
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction( const TDEAccelAction& );
|
||
13 years ago
|
|
||
|
/**
|
||
12 years ago
|
* Creates a new TDEAccelAction.
|
||
13 years ago
|
* @param sName the name of the accelerator
|
||
|
* @param sLabel the label of the accelerator (i18n!)
|
||
|
* @param sWhatsThis the What's This text (18n!)
|
||
|
* @param cutDef3 the default shortcut for 3 modifier systems
|
||
|
* @param cutDef4 the default shortcut for 4 modifier systems
|
||
|
* @param pObjSlot the receiver of a signal when the key has been
|
||
|
* pressed
|
||
|
* @param psMethodSlot the slot to connect for key presses. Receives
|
||
|
* an int, as set by @ref setID(), as only argument
|
||
|
* @param bConfigurable if true the user can configure the shortcut
|
||
|
* @param bEnabled true if the accelerator should be enabled
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
|
||
|
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
|
||
13 years ago
|
const TQObject* pObjSlot, const char* psMethodSlot,
|
||
13 years ago
|
bool bConfigurable, bool bEnabled );
|
||
12 years ago
|
~TDEAccelAction();
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Clears the accelerator.
|
||
|
*/
|
||
|
void clear();
|
||
|
|
||
|
/**
|
||
12 years ago
|
* Re-initialized the TDEAccelAction.
|
||
13 years ago
|
* @param sName the name of the accelerator
|
||
|
* @param sLabel the label of the accelerator (i18n!)
|
||
|
* @param sWhatsThis the What's This text (18n!)
|
||
|
* @param cutDef3 the default shortcut for 3 modifier systems
|
||
|
* @param cutDef4 the default shortcut for 4 modifier systems
|
||
|
* @param pObjSlot the receiver of a signal when the key has been
|
||
|
* pressed
|
||
|
* @param psMethodSlot the slot to connect for key presses. Receives
|
||
|
* an int, as set by @ref setID(), as only argument
|
||
|
* @param bConfigurable if true the user can configure the shortcut
|
||
|
* @param bEnabled true if the accelerator should be enabled
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
13 years ago
|
bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
|
||
12 years ago
|
const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
|
||
13 years ago
|
const TQObject* pObjSlot, const char* psMethodSlot,
|
||
13 years ago
|
bool bConfigurable, bool bEnabled );
|
||
|
|
||
|
/**
|
||
12 years ago
|
* Copies this TDEAccelAction.
|
||
13 years ago
|
*/
|
||
12 years ago
|
TDEAccelAction& operator=( const TDEAccelAction& );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the name of the accelerator action.
|
||
|
* @return the name of the accelerator action, can be null if not
|
||
|
* set
|
||
|
*/
|
||
13 years ago
|
const TQString& name() const { return m_sName; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the label of the accelerator action.
|
||
|
* @return the label of the accelerator action, can be null if
|
||
|
* not set
|
||
|
*/
|
||
13 years ago
|
const TQString& label() const { return m_sLabel; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the What's This text of the accelerator action.
|
||
|
* @return the What's This text of the accelerator action, can be
|
||
|
* null if not set
|
||
|
*/
|
||
13 years ago
|
const TQString& whatsThis() const { return m_sWhatsThis; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* The shortcut that is actually used (may be used configured).
|
||
12 years ago
|
* @return the shortcut of the TDEAccelAction, can be null if not set
|
||
13 years ago
|
* @see shortcutDefault()
|
||
|
*/
|
||
12 years ago
|
const TDEShortcut& shortcut() const { return m_cut; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* The default shortcut for this system.
|
||
|
* @return the default shortcut on this system, can be null if not set
|
||
|
* @see shortcut()
|
||
|
* @see shortcutDefault3()
|
||
|
* @see shortcutDefault4()
|
||
|
*/
|
||
12 years ago
|
const TDEShortcut& shortcutDefault() const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* The default shortcut for 3 modifier systems.
|
||
|
* @return the default shortcut for 3 modifier systems, can be null
|
||
|
* if not set
|
||
|
* @see shortcutDefault()
|
||
|
* @see shortcutDefault4()
|
||
|
* @see useFourModifierKeys()
|
||
|
*/
|
||
12 years ago
|
const TDEShortcut& shortcutDefault3() const { return m_cutDefault3; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* The default shortcut for 4 modifier systems.
|
||
|
* @return the default shortcut for 4 modifier systems, can be null
|
||
|
* if not set
|
||
|
* @see shortcutDefault()
|
||
|
* @see shortcutDefault3()
|
||
|
* @see useFourModifierKeys()
|
||
|
*/
|
||
12 years ago
|
const TDEShortcut& shortcutDefault4() const { return m_cutDefault4; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the receiver of signals.
|
||
|
* @return the receiver of signals (can be 0 if not set)
|
||
|
*/
|
||
13 years ago
|
const TQObject* objSlotPtr() const { return m_pObjSlot; }
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the slot for the signal.
|
||
|
* @return the slot for the signal
|
||
|
*/
|
||
|
const char* methodSlotPtr() const { return m_psMethodSlot; }
|
||
|
|
||
|
/**
|
||
|
* Checks whether the user can configure the action.
|
||
|
* @return true if configurable, false otherwise
|
||
|
*/
|
||
|
bool isConfigurable() const { return m_bConfigurable; }
|
||
|
|
||
|
/**
|
||
|
* Checks whether the action is enabled.
|
||
|
* @return true if enabled, false otherwise
|
||
|
*/
|
||
|
bool isEnabled() const { return m_bEnabled; }
|
||
|
|
||
|
/**
|
||
|
* Sets the name of the accelerator action.
|
||
|
* @param name the new name
|
||
|
*/
|
||
13 years ago
|
void setName( const TQString& name );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Sets the user-readable label of the accelerator action.
|
||
|
* @param label the new label (i18n!)
|
||
|
*/
|
||
13 years ago
|
void setLabel( const TQString& label );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Sets the What's This text for the accelerator action.
|
||
|
* @param whatsThis the new What's This text (i18n!)
|
||
|
*/
|
||
13 years ago
|
void setWhatsThis( const TQString& whatsThis );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Sets the new shortcut of the accelerator action.
|
||
|
* @param rgCuts the shortcut to set
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
12 years ago
|
bool setShortcut( const TDEShortcut& rgCuts );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Sets the slot of the accelerator action.
|
||
|
* @param pObjSlot the receiver object of the signal
|
||
|
* @param psMethodSlot the slot for the signal
|
||
|
*/
|
||
13 years ago
|
void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Enables or disabled configuring the action.
|
||
|
* @param configurable true to enable configurability, false to disable
|
||
|
*/
|
||
|
void setConfigurable( bool configurable );
|
||
|
|
||
|
/**
|
||
|
* Enables or disabled the action.
|
||
|
* @param configurable true to enable the action, false to disable
|
||
|
*/
|
||
|
void setEnabled( bool enable );
|
||
|
|
||
|
/**
|
||
|
* Retrieves the id set using @ref setID.
|
||
|
* @return the id of the accelerator action
|
||
|
*/
|
||
|
int getID() const { return m_nIDAccel; }
|
||
|
|
||
|
/**
|
||
|
* Allows you to set an id that will be used as the action
|
||
|
* signal's argument.
|
||
|
*
|
||
|
* @param n the new id
|
||
|
* @see @ref getID()
|
||
|
*/
|
||
|
void setID( int n ) { m_nIDAccel = n; }
|
||
|
|
||
|
/**
|
||
|
* Checkes whether the action is connected (emits signals).
|
||
|
* @return true if connected, false otherwise
|
||
|
*/
|
||
|
bool isConnected() const;
|
||
|
|
||
|
/**
|
||
|
* Sets a key sequence of the action's shortcut.
|
||
|
* @param i the position of the sequence
|
||
|
* @param keySeq the new new sequence
|
||
|
* @return true if successful, false otherwise
|
||
12 years ago
|
* @see TDEShortcut::setSeq()
|
||
13 years ago
|
*/
|
||
|
bool setKeySequence( uint i, const KKeySequence &keySeq );
|
||
|
|
||
|
/**
|
||
|
* Clears the action's shortcut. It will not contain any sequences after
|
||
|
* calling this method.
|
||
12 years ago
|
* @see TDEShortcut::clear()
|
||
13 years ago
|
*/
|
||
|
void clearShortcut();
|
||
|
|
||
|
/**
|
||
|
* Checks whether the action's shortcut contains the given key sequence.
|
||
|
* @param keySeq the key sequence to check
|
||
|
* @return true if the shortcut contains the given sequence
|
||
12 years ago
|
* @see TDEShortcut::contains()
|
||
13 years ago
|
*/
|
||
|
bool contains( const KKeySequence &keySeq );
|
||
|
|
||
|
/**
|
||
|
* Returns the string representation of the action's shortcut.
|
||
|
* @return the string representation of the action's shortcut.
|
||
12 years ago
|
* @see TDEShortcut::toString()
|
||
13 years ago
|
*/
|
||
13 years ago
|
TQString toString() const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* @internal
|
||
|
*/
|
||
13 years ago
|
TQString toStringInternal() const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns true if four modifier keys will be used.
|
||
|
* @return true if four modifier keys will be used.
|
||
|
*/
|
||
|
static bool useFourModifierKeys();
|
||
|
|
||
|
/**
|
||
|
* Selects 3 or 4 modifier default shortcuts.
|
||
|
* @param use true to use 4 modifier shortcuts, false to use
|
||
|
* 3 modifier shortcuts
|
||
|
*/
|
||
|
static void useFourModifierKeys( bool use );
|
||
|
|
||
|
protected:
|
||
13 years ago
|
TQString m_sName,
|
||
13 years ago
|
m_sLabel,
|
||
|
m_sWhatsThis;
|
||
12 years ago
|
TDEShortcut m_cut;
|
||
|
TDEShortcut m_cutDefault3, m_cutDefault4;
|
||
13 years ago
|
const TQObject* m_pObjSlot;
|
||
13 years ago
|
const char* m_psMethodSlot;
|
||
|
bool m_bConfigurable,
|
||
|
m_bEnabled;
|
||
|
int m_nIDAccel;
|
||
|
uint m_nConnections;
|
||
|
|
||
|
void incConnections();
|
||
|
void decConnections();
|
||
|
|
||
|
private:
|
||
|
static int g_bUseFourModifierKeys;
|
||
12 years ago
|
class TDEAccelActionPrivate* d;
|
||
13 years ago
|
|
||
12 years ago
|
friend class TDEAccelActions;
|
||
|
friend class TDEAccelBase;
|
||
13 years ago
|
};
|
||
|
|
||
|
//---------------------------------------------------------------------
|
||
12 years ago
|
// TDEAccelActions
|
||
13 years ago
|
//---------------------------------------------------------------------
|
||
|
|
||
|
/**
|
||
|
* @internal
|
||
12 years ago
|
* This class represents a collection of @ref TDEAccelAction objects.
|
||
13 years ago
|
*
|
||
|
* @short A collection of accelerator actions
|
||
12 years ago
|
* @see TDEAccelAction
|
||
13 years ago
|
*/
|
||
12 years ago
|
class TDEAccelActions
|
||
13 years ago
|
{
|
||
|
public:
|
||
|
/**
|
||
12 years ago
|
* Creates a new, empty TDEAccelActions object.
|
||
13 years ago
|
*/
|
||
12 years ago
|
TDEAccelActions();
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Copy constructor (deep copy).
|
||
|
*/
|
||
12 years ago
|
TDEAccelActions( const TDEAccelActions& );
|
||
|
virtual ~TDEAccelActions();
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Removes all items from this collection.
|
||
|
*/
|
||
|
void clear();
|
||
|
|
||
|
/**
|
||
|
* Initializes this object with the given actions.
|
||
|
* It will make a deep copy of all actions.
|
||
|
* @param actions the actions to copy
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
12 years ago
|
bool init( const TDEAccelActions &actions );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Loads the actions from the given configuration file.
|
||
|
*
|
||
|
* @param config the configuration file to load from
|
||
|
* @param sGroup the group in the configuration file
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
12 years ago
|
bool init( TDEConfigBase& config, const TQString& sGroup );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Updates the shortcuts of all actions in this object
|
||
|
* with the shortcuts from the given object.
|
||
|
* @param shortcuts the collection that contains the new
|
||
|
* shortcuts
|
||
|
*/
|
||
12 years ago
|
void updateShortcuts( TDEAccelActions &shortcuts );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Retrieves the index of the action with the given name.
|
||
|
* @param sAction the action to search
|
||
|
* @return the index of the action, or -1 if not found
|
||
|
*/
|
||
13 years ago
|
int actionIndex( const TQString& sAction ) const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given @p index.
|
||
|
* @param index the index of an action. You must not
|
||
|
* use an index that is too high.
|
||
12 years ago
|
* @return the TDEAccelAction with the given index
|
||
13 years ago
|
* @see count()
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction* actionPtr( uint index );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given @p index.
|
||
|
* @param index the index of an action. You must not
|
||
|
* use an index that is too high.
|
||
12 years ago
|
* @return the TDEAccelAction with the given index
|
||
13 years ago
|
* @see count()
|
||
|
*/
|
||
12 years ago
|
const TDEAccelAction* actionPtr( uint index ) const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given name.
|
||
|
* @param aAction the name of the action to search
|
||
12 years ago
|
* @return the TDEAccelAction with the given name, or 0
|
||
13 years ago
|
* if not found
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction* actionPtr( const TQString& sAction );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given name.
|
||
|
* @param aAction the name of the action to search
|
||
12 years ago
|
* @return the TDEAccelAction with the given name, or 0
|
||
13 years ago
|
* if not found
|
||
|
*/
|
||
12 years ago
|
const TDEAccelAction* actionPtr( const TQString& sAction ) const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given key sequence.
|
||
|
* @param cut the sequence to search for
|
||
12 years ago
|
* @return the TDEAccelAction with the given sequence, or 0
|
||
13 years ago
|
* if not found
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction* actionPtr( KKeySequence cut );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given @p index.
|
||
|
* @param index the index of an action. You must not
|
||
|
* use an index that is too high.
|
||
12 years ago
|
* @return the TDEAccelAction with the given index
|
||
13 years ago
|
* @see actionPtr()
|
||
|
* @see count()
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction& operator []( uint index );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Returns the action with the given @p index.
|
||
|
* @param index the index of an action. You must not
|
||
|
* use an index that is too high.
|
||
12 years ago
|
* @return the TDEAccelAction with the given index
|
||
13 years ago
|
* @see actionPtr()
|
||
|
* @see count()
|
||
|
*/
|
||
12 years ago
|
const TDEAccelAction& operator []( uint index ) const;
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Inserts an action into the collection.
|
||
|
* @param sName the name of the accelerator
|
||
|
* @param sLabel the label of the accelerator (i18n!)
|
||
|
* @param sWhatsThis the What's This text (18n!)
|
||
|
* @param cutDef3 the default shortcut for 3 modifier systems
|
||
|
* @param cutDef4 the default shortcut for 4 modifier systems
|
||
|
* @param pObjSlot the receiver of a signal when the key has been
|
||
|
* pressed
|
||
|
* @param psMethodSlot the slot to connect for key presses. Receives
|
||
|
* an int, as set by @ref setID(), as only argument
|
||
|
* @param bConfigurable if true the user can configure the shortcut
|
||
|
* @param bEnabled true if the accelerator should be enabled
|
||
|
* @return the new action
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
|
||
|
const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
|
||
13 years ago
|
const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
|
||
13 years ago
|
bool bConfigurable = true, bool bEnabled = true );
|
||
|
|
||
|
/**
|
||
|
* Inserts an action into the collection.
|
||
|
* @param sName the name of the accelerator
|
||
|
* @param sLabel the label of the accelerator (i18n!)
|
||
|
* @return the new action
|
||
|
*/
|
||
12 years ago
|
TDEAccelAction* insert( const TQString& sName, const TQString& sLabel );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Removes the given action.
|
||
|
* @param sAction the name of the action.
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
13 years ago
|
bool remove( const TQString& sAction );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Loads the actions from the given configuration file.
|
||
|
*
|
||
|
* @param sConfigGroup the group in the configuration file
|
||
|
* @param pConfig the configuration file to load from
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
12 years ago
|
bool readActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0 );
|
||
13 years ago
|
|
||
|
/**
|
||
|
* Writes the actions to the given configuration file.
|
||
|
*
|
||
|
* @param sConfigGroup the group in the configuration file
|
||
|
* @param pConfig the configuration file to save to
|
||
|
* @param bWriteAll true to write all actions
|
||
|
* @param bGlobal true to write to the global configuration file
|
||
|
* @return true if successful, false otherwise
|
||
|
*/
|
||
12 years ago
|
bool writeActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0,
|
||
13 years ago
|
bool bWriteAll = false, bool bGlobal = false ) const;
|
||
|
|
||
|
/**
|
||
|
* Emit a keycodeChanged signal.
|
||
|
*/
|
||
|
void emitKeycodeChanged();
|
||
|
|
||
|
/**
|
||
|
* Returns the number of actions in the collection.
|
||
|
* @return the number of actions
|
||
|
*/
|
||
|
uint count() const;
|
||
|
|
||
|
protected:
|
||
12 years ago
|
TDEAccelBase* m_pTDEAccelBase;
|
||
|
TDEAccelAction** m_prgActions;
|
||
13 years ago
|
uint m_nSizeAllocated, m_nSize;
|
||
|
|
||
|
void resize( uint );
|
||
12 years ago
|
void insertPtr( TDEAccelAction* );
|
||
13 years ago
|
|
||
|
private:
|
||
12 years ago
|
class TDEAccelActionsPrivate* d;
|
||
13 years ago
|
|
||
12 years ago
|
TDEAccelActions( TDEAccelBase* );
|
||
|
void initPrivate( TDEAccelBase* );
|
||
|
TDEAccelActions& operator =( TDEAccelActions& );
|
||
13 years ago
|
|
||
12 years ago
|
friend class TDEAccelBase;
|
||
13 years ago
|
};
|
||
|
|
||
|
#endif // _KACCELACTION_H
|