Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
kdecore
kdecore
kdecore
kglobalaccel.h
1
/* This file is part of the KDE libraries
2
Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
8
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
13
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
Boston, MA 02110-1301, USA.
18
*/
19
20
#ifndef _KGLOBALACCEL_H_
21
#define _KGLOBALACCEL_H_
22
23
#include <tqobject.h>
24
#include <kshortcut.h>
25
26
class
TQPopupMenu;
27
class
TQWidget;
28
class
KAccelAction;
29
class
KAccelActions;
30
class
KConfigBase
;
31
32
class
KGlobalAccelPrivate;
33
45
class
KDECORE_EXPORT
KGlobalAccel
:
public
TQObject
46
{
47
Q_OBJECT
48
public
:
55
KGlobalAccel
( TQObject* pParent,
const
char
* psName = 0 );
56
virtual
~
KGlobalAccel
();
57
62
bool
isEnabled();
63
69
void
setEnabled(
bool
bEnabled );
70
93
KAccelAction* insert(
const
TQString& sAction,
const
TQString& sLabel,
const
TQString& sWhatsThis,
94
const
KShortcut
& cutDef3,
const
KShortcut
& cutDef4,
95
const
TQObject* pObjSlot,
const
char
* psMethodSlot,
96
bool
bConfigurable =
true
,
bool
bEnabled =
true
);
97
104
bool
remove
(
const
TQString& sAction );
105
113
KAccelAction* insert(
const
TQString& sName,
const
TQString& sLabel );
114
119
bool
updateConnections();
120
126
const
KShortcut
& shortcut(
const
TQString& sAction )
const
;
133
bool
setShortcut(
const
TQString& sAction,
const
KShortcut
&shortcut );
142
bool
setSlot(
const
TQString& sAction,
const
TQObject* pObjSlot,
const
char
* psMethodSlot );
143
148
bool
setActionEnabled(
const
TQString& sAction,
bool
bEnable );
155
TQString label(
const
TQString& sAction )
const
;
156
162
const
TQString& configGroup()
const
;
163
169
void
setConfigGroup(
const
TQString &cg );
170
179
bool
readSettings(
KConfigBase
* pConfig = 0 );
180
190
bool
writeSettings(
KConfigBase
* pConfig = 0 )
const
;
191
// BCI: merge these two writeSettings methods in KDE 4.0
202
bool
writeSettings(
KConfigBase
* pConfig,
bool
bGlobal )
const
;
203
208
static
bool
useFourModifierKeys();
209
213
static
void
blockShortcuts(
bool
block );
217
void
disableBlocking(
bool
disable );
218
222
// like setEnabled(), but doesn't ungrab (see in KGlobalAccelPrivate)
223
void
suspend(
bool
s );
224
225
private
:
226
227
KAccelActions& actions();
228
const
KAccelActions& actions()
const
;
229
230
friend
class
KGlobalAccelPrivate;
231
friend
class
KAccelShortcutList
;
232
protected
:
234
virtual
void
virtual_hook
(
int
id
,
void
* data );
235
private
:
236
class
KGlobalAccelPrivate* d;
237
};
238
239
#endif // _KGLOBALACCEL_H_
kdecore
Skip menu "kdecore"
Main Page
Modules
Namespace List
Class Hierarchy
Alphabetical List
Class List
File List
Namespace Members
Class Members
Related Pages
kdecore
Skip menu "kdecore"
arts
dcop
dnssd
interfaces
interface
library
kspeech
ktexteditor
kabc
kate
kcmshell
kdecore
kded
kdefx
kdeprint
kdesu
kdeui
kdoctools
khtml
kimgio
kinit
kio
bookmarks
httpfilter
kfile
kio
kioexec
kpasswdserver
kssl
kioslave
http
kjs
kmdi
kmdi
knewstuff
kparts
krandr
kresources
kspell2
kunittest
kutils
kwallet
libkmid
libkscreensaver