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

tdecore

  • tdecore
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 <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 // _KGLOBALACCEL_H_
TDEConfigBase
KDE Configuration Management abstract base class.
Definition tdeconfigbase.h:71
TDEGlobalAccel::setConfigGroup
void setConfigGroup(const TQString &cg)
Sets the configuration group that is used to save the accelerators.
Definition kglobalaccel.cpp:119
TDEGlobalAccel::isEnabled
bool isEnabled()
Checks whether the accelerators are enabled.
Definition kglobalaccel.cpp:62
TDEGlobalAccel::writeSettings
bool writeSettings(TDEConfigBase *pConfig=0) const
Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration fi...
Definition kglobalaccel.cpp:124
TDEGlobalAccel::label
TQString label(const TQString &sAction) const
Return the label (i18n'ized short description) associated with the action named by sAction.
Definition kglobalaccel.cpp:106
TDEGlobalAccel::insert
TDEAccelAction * insert(const TQString &sAction, const TQString &sLabel, const TQString &sWhatsThis, const TDEShortcut &cutDef3, const TDEShortcut &cutDef4, const TQObject *pObjSlot, const char *psMethodSlot, bool bConfigurable=true, bool bEnabled=true)
Create an accelerator action.
Definition kglobalaccel.cpp:77
TDEGlobalAccel::updateConnections
bool updateConnections()
Updates the connections of the accelerations after changing them.
Definition kglobalaccel.cpp:90
TDEGlobalAccel::setEnabled
void setEnabled(bool bEnabled)
Enables or disables the TDEGlobalAccel.
Definition kglobalaccel.cpp:65
TDEGlobalAccel::readSettings
bool readSettings(TDEConfigBase *pConfig=0)
Read all shortcuts from pConfig, or (if pConfig is zero) from the application's configuration file TD...
Definition kglobalaccel.cpp:122
TDEGlobalAccel::setActionEnabled
bool setActionEnabled(const TQString &sAction, bool bEnable)
Enables or disables action sAction.
Definition kglobalaccel.cpp:111
TDEGlobalAccel::TDEGlobalAccel
TDEGlobalAccel(TQObject *pParent, const char *psName=0)
Creates a new TDEGlobalAccel object with the given pParent and psName.
Definition kglobalaccel.cpp:39
TDEGlobalAccel::setShortcut
bool setShortcut(const TQString &sAction, const TDEShortcut &shortcut)
Set the shortcut to be associated with the action named by sAction.
Definition kglobalaccel.cpp:102
TDEGlobalAccel::shortcut
const TDEShortcut & shortcut(const TQString &sAction) const
Return the shortcut associated with the action named by sAction.
Definition kglobalaccel.cpp:96
TDEGlobalAccel::remove
bool remove(const TQString &sAction)
Removes the accelerator action identified by the name.
Definition kglobalaccel.cpp:93
TDEGlobalAccel::configGroup
const TQString & configGroup() const
Returns the configuration group that is used to save the accelerators.
Definition kglobalaccel.cpp:116
TDEGlobalAccel::setSlot
bool setSlot(const TQString &sAction, const TQObject *pObjSlot, const char *psMethodSlot)
Set the slot to be called when the shortcut of the action named by sAction is pressed.
Definition kglobalaccel.cpp:104
TDEShortcut
The TDEShortcut class is used to represent a keyboard shortcut to an action.
Definition tdeshortcut.h:544

tdecore

Skip menu "tdecore"
  • Main Page
  • 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.15.0
This website is maintained by Timothy Pearson.