24 #include <kshortcut.h>
25 #include <kstdaccel.h>
26 #include "kdelibs_export.h"
93 class KDECORE_EXPORT
KAccel :
public TQAccel
104 KAccel( TQWidget* pParent,
const char* psName = 0 );
113 KAccel( TQWidget* watch, TQObject* parent,
const char* psName = 0 );
121 KAccelActions& actions();
128 const KAccelActions& actions()
const;
140 void setEnabled(
bool bEnabled );
152 bool setAutoUpdate(
bool bAuto );
175 KAccelAction* 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 KAccelAction* 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 KAccelAction* insert(
const char* psAction,
const KShortcut& 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 KShortcut& shortcut(
const TQString& sAction )
const;
248 bool setShortcut(
const TQString& sAction,
const KShortcut &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 );
301 bool writeSettings(
KConfigBase* pConfig = 0 )
const;
306 void emitKeycodeChanged();
312 void keycodeChanged();
314 #ifndef KDE_NO_COMPAT
320 bool insertItem(
const TQString& sLabel,
const TQString& sAction,
322 int nIDMenu = 0, TQPopupMenu* pMenu = 0,
bool bConfigurable =
true ) KDE_DEPRECATED;
326 bool insertItem(
const TQString& sLabel,
const TQString& sAction,
328 int nIDMenu = 0, TQPopupMenu* pMenu = 0,
bool bConfigurable =
true ) KDE_DEPRECATED;
332 bool insertStdItem(
KStdAccel::StdAccel id,
const TQString& descr = TQString::null ) KDE_DEPRECATED;
336 bool connectItem(
const TQString& sAction,
const TQObject* pObjSlot,
const char* psMethodSlot,
bool bActivate =
true ) KDE_DEPRECATED;
342 {
return insert( accel, pObjSlot, psMethodSlot ); }
346 bool removeItem(
const TQString& sAction ) KDE_DEPRECATED;
350 bool setItemEnabled(
const TQString& sAction,
bool bEnable ) KDE_DEPRECATED;
354 void changeMenuAccel( TQPopupMenu *menu,
int id,
const TQString& action ) KDE_DEPRECATED;
358 void changeMenuAccel( TQPopupMenu *menu,
int id,
KStdAccel::StdAccel accel ) KDE_DEPRECATED;
362 static int stringToKey(
const TQString& ) KDE_DEPRECATED;
371 int currentKey( const TQString& action ) const KDE_DEPRECATED;
379 TQString findKey(
int key ) const KDE_DEPRECATED;
380 #endif // !KDE_NO_COMPAT
384 virtual void virtual_hook(
int id,
void* data );
386 class KAccelPrivate* d;
387 friend class KAccelPrivate;
KDE_DEPRECATED bool connectItem(KStdAccel::StdAccel accel, const TQObject *pObjSlot, const char *psMethodSlot)
The KShortcut class is used to represent a keyboard shortcut to an action.
KDE Configuration Management abstract base class.
StdAccel
Defines the identifier of all standard accelerators.