24 #include <tdeshortcut.h>
25 #include <tdestdaccel.h>
26 #include "tdelibs_export.h"
31 class TDEAccelActions;
34 class TDEAccelPrivate;
104 TDEAccel( TQWidget* pParent,
const char* psName = 0 );
113 TDEAccel( TQWidget* watch, TQObject* parent,
const char* psName = 0 );
121 TDEAccelActions& actions();
128 const TDEAccelActions& actions()
const;
140 void setEnabled(
bool bEnabled );
152 bool setAutoUpdate(
bool bAuto );
175 TDEAccelAction* insert(
const TQString& sAction,
const TQString& sLabel,
const TQString& sWhatsThis,
177 const TQObject* pObjSlot,
const char* psMethodSlot,
178 bool bConfigurable =
true,
bool bEnabled =
true );
183 TDEAccelAction* insert(
const TQString& sAction,
const TQString& sLabel,
const TQString& sWhatsThis,
185 const TQObject* pObjSlot,
const char* psMethodSlot,
186 bool bConfigurable =
true,
bool bEnabled =
true );
204 TDEAccelAction* insert(
const char* psAction,
const TDEShortcut& cutDef,
205 const TQObject* pObjSlot,
const char* psMethodSlot,
206 bool bConfigurable =
true,
bool bEnabled =
true );
214 const TQObject* pObjSlot,
const char* psMethodSlot,
215 bool bConfigurable =
true,
bool bEnabled =
true );
223 bool remove(
const TQString& sAction );
233 bool updateConnections();
240 const TDEShortcut& shortcut(
const TQString& sAction )
const;
248 bool setShortcut(
const TQString& sAction,
const TDEShortcut &shortcut );
258 bool setSlot(
const TQString& sAction,
const TQObject* pObjSlot,
const char* psMethodSlot );
265 bool setEnabled(
const TQString& sAction,
bool bEnabled );
272 const TQString& configGroup()
const;
279 void setConfigGroup(
const TQString &name );
306 void emitKeycodeChanged();
314 #ifndef KDE_NO_COMPAT
320 bool insertItem(
const TQString& sLabel,
const TQString& sAction,
322 int nIDMenu = 0, TQPopupMenu* pMenu = 0,
bool bConfigurable =
true ) TDE_DEPRECATED;
326 bool insertItem( const TQString& sLabel, const TQString& sAction,
328 int nIDMenu = 0, TQPopupMenu* pMenu = 0,
bool bConfigurable = true ) TDE_DEPRECATED;
332 bool insertStdItem(
TDEStdAccel::StdAccel
id, const TQString& descr = TQString::null ) TDE_DEPRECATED;
336 bool connectItem( const TQString& sAction, const TQObject* pObjSlot, const
char* psMethodSlot,
bool bActivate = true ) TDE_DEPRECATED;
341 TDE_DEPRECATED
bool connectItem(
TDEStdAccel::StdAccel accel, const TQObject* pObjSlot, const
char* psMethodSlot )
342 {
return insert( accel, pObjSlot, psMethodSlot ); }
346 bool removeItem(
const TQString& sAction ) TDE_DEPRECATED;
350 bool setItemEnabled(
const TQString& sAction,
bool bEnable ) TDE_DEPRECATED;
354 void changeMenuAccel( TQPopupMenu *menu,
int id,
const TQString& action ) TDE_DEPRECATED;
362 static int stringToKey(
const TQString& ) TDE_DEPRECATED;
371 int currentKey(
const TQString& action )
const TDE_DEPRECATED;
379 TQString findKey(
int key )
const TDE_DEPRECATED;
384 virtual void virtual_hook(
int id,
void* data );
386 class TDEAccelPrivate* d;
387 friend class TDEAccelPrivate;
void keycodeChanged()
Emitted when one of the key codes has changed.
KDE Configuration Management abstract base class.
The TDEShortcut class is used to represent a keyboard shortcut to an action.
Convenient methods for access to the common accelerator keys in the key configuration.
StdAccel
Defines the identifier of all standard accelerators.