kglobalaccel.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _KGLOBALACCEL_H_
00021 #define _KGLOBALACCEL_H_
00022
00023 #include <qobject.h>
00024 #include <kshortcut.h>
00025
00026 class QPopupMenu;
00027 class QWidget;
00028 class KAccelAction;
00029 class KAccelActions;
00030 class KConfigBase;
00031
00032 class KGlobalAccelPrivate;
00033
00045 class KGlobalAccel : public QObject
00046 {
00047 Q_OBJECT
00048 public:
00055 KGlobalAccel( QObject* pParent, const char* psName = 0 );
00056 virtual ~KGlobalAccel();
00057
00062 bool isEnabled();
00063
00068 void setEnabled( bool bEnabled );
00069
00092 KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
00093 const KShortcut& cutDef3, const KShortcut& cutDef4,
00094 const QObject* pObjSlot, const char* psMethodSlot,
00095 bool bConfigurable = true, bool bEnabled = true );
00096
00103 bool remove( const QString& sAction );
00104
00112 KAccelAction* insert( const QString& sName, const QString& sLabel );
00113
00118 bool updateConnections();
00119
00125 const KShortcut& shortcut( const QString& sAction ) const;
00132 bool setShortcut( const QString& sAction, const KShortcut &shortcut );
00141 bool setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
00148 bool setEnabled( const QString& sAction, bool bEnabled );
00149
00155 const QString& configGroup() const;
00156
00162 void setConfigGroup( const QString &cg );
00163
00172 bool readSettings( KConfigBase* pConfig = 0 );
00173
00183 bool writeSettings( KConfigBase* pConfig = 0 ) const;
00184
00195 bool writeSettings( KConfigBase* pConfig, bool bGlobal ) const;
00196
00201 static bool useFourModifierKeys();
00202
00203 private:
00204
00205 KAccelActions& actions();
00206 const KAccelActions& actions() const;
00207
00208 friend class KGlobalAccelPrivate;
00209 friend class KAccelShortcutList;
00210 protected:
00212 virtual void virtual_hook( int id, void* data );
00213 private:
00214 class KGlobalAccelPrivate* d;
00215 };
00216
00217 #endif // _KGLOBALACCEL_H_
This file is part of the documentation for kdelibs Version 3.1.4.