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
00069
void setEnabled(
bool bEnabled );
00070
00093 KAccelAction*
insert(
const QString& sAction,
const QString& sLabel,
const QString& sWhatsThis,
00094
const KShortcut& cutDef3,
const KShortcut& cutDef4,
00095
const QObject* pObjSlot,
const char* psMethodSlot,
00096
bool bConfigurable =
true,
bool bEnabled =
true );
00097
00104
bool remove(
const QString& sAction );
00105
00113 KAccelAction*
insert(
const QString& sName,
const QString& sLabel );
00114
00119
bool updateConnections();
00120
00126
const KShortcut&
shortcut(
const QString& sAction )
const;
00133
bool setShortcut(
const QString& sAction,
const KShortcut &
shortcut );
00142
bool setSlot(
const QString& sAction,
const QObject* pObjSlot,
const char* psMethodSlot );
00143
00150
QString label(
const QString& sAction )
const;
00151
00157
const QString&
configGroup()
const;
00158
00164
void setConfigGroup(
const QString &cg );
00165
00174
bool readSettings(
KConfigBase* pConfig = 0 );
00175
00185
bool writeSettings(
KConfigBase* pConfig = 0 )
const;
00186
00197
bool writeSettings(
KConfigBase* pConfig,
bool bGlobal )
const;
00198
00203
static bool useFourModifierKeys();
00204
00205
private:
00206
00207 KAccelActions& actions();
00208
const KAccelActions& actions()
const;
00209
00210
friend class KGlobalAccelPrivate;
00211
friend class KAccelShortcutList;
00212
protected:
00214
virtual void virtual_hook(
int id,
void* data );
00215
private:
00216
class KGlobalAccelPrivate* d;
00217 };
00218
00219
#endif // _KGLOBALACCEL_H_
This file is part of the documentation for kdecore Library Version 3.3.0.