• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdeglobalaccel.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 _TDEGLOBALACCEL_H_
21#define _TDEGLOBALACCEL_H_
22
23#include <tqobject.h>
24#include <tdeshortcut.h>
25
26class TQPopupMenu;
27class TQWidget;
28class TDEAccelAction;
29class TDEAccelActions;
30class TDEConfigBase;
31
32class TDEGlobalAccelPrivate;
33
45class TDECORE_EXPORT TDEGlobalAccel : public TQObject
46{
47 TQ_OBJECT
48 public:
55 TDEGlobalAccel( TQObject* pParent, const char* psName = 0 );
56 virtual ~TDEGlobalAccel();
57
62 bool isEnabled();
63
69 void setEnabled( bool bEnabled );
70
93 TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
94 const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
95 const TQObject* pObjSlot, const char* psMethodSlot,
96 bool bConfigurable = true, bool bEnabled = true );
97
104 bool remove( const TQString& sAction );
105
113 TDEAccelAction* insert( const TQString& sName, const TQString& sLabel );
114
119 bool updateConnections();
120
126 const TDEShortcut& shortcut( const TQString& sAction ) const;
133 bool setShortcut( const TQString& sAction, const TDEShortcut &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( TDEConfigBase* pConfig = 0 );
180
190 bool writeSettings( TDEConfigBase* pConfig = 0 ) const;
191 // BCI: merge these two writeSettings methods in KDE 4.0
202 bool writeSettings( TDEConfigBase* 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 TDEGlobalAccelPrivate)
223 void suspend( bool s );
224
225private:
226
227 TDEAccelActions& actions();
228 const TDEAccelActions& actions() const;
229
230 friend class TDEGlobalAccelPrivate;
231 friend class TDEAccelShortcutList;
232protected:
234 virtual void virtual_hook( int id, void* data );
235private:
236 class TDEGlobalAccelPrivate* d;
237};
238
239#endif // _TDEGLOBALACCEL_H_
TDEAccelShortcutList
TDEShortcutList implementation to access TDEAccel and TDEGlobalAccel lists.
Definition: tdeshortcutlist.h:199
TDEAccelShortcutList::virtual_hook
virtual void virtual_hook(int id, void *data)
used to extend the interface with virtuals without breaking binary compatibility
Definition: tdeshortcutlist.cpp:215
TDEConfigBase
KDE Configuration Management abstract base class.
Definition: tdeconfigbase.h:71
TDEGlobalAccel
TDEGlobalAccel allows you to have global accelerators that are independent of the focused window.
Definition: tdeglobalaccel.h:46
TDEShortcut
The TDEShortcut class is used to represent a keyboard shortcut to an action.
Definition: tdeshortcut.h:544

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.