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

kdecore

kglobalaccel.h
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef _KGLOBALACCEL_H_
00021 #define _KGLOBALACCEL_H_
00022 
00023 #include <tqobject.h>
00024 #include <kshortcut.h>
00025 
00026 class TQPopupMenu;
00027 class TQWidget;
00028 class KAccelAction;
00029 class KAccelActions;
00030 class KConfigBase;
00031 
00032 class KGlobalAccelPrivate;
00033 
00045 class KDECORE_EXPORT KGlobalAccel : public TQObject
00046 {
00047     Q_OBJECT
00048  public:
00055     KGlobalAccel( TQObject* pParent, const char* psName = 0 );
00056     virtual ~KGlobalAccel();
00057 
00062     bool isEnabled();
00063     
00069     void setEnabled( bool bEnabled );
00070 
00093     KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
00094                      const KShortcut& cutDef3, const KShortcut& cutDef4,
00095                      const TQObject* pObjSlot, const char* psMethodSlot,
00096                      bool bConfigurable = true, bool bEnabled = true );
00097 
00104     bool remove( const TQString& sAction );
00105 
00113     KAccelAction* insert( const TQString& sName, const TQString& sLabel );
00114 
00119     bool updateConnections();
00120 
00126     const KShortcut& shortcut( const TQString& sAction ) const;
00133     bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
00142     bool setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
00143 
00148     bool setActionEnabled( const TQString& sAction, bool bEnable );
00155     TQString label( const TQString& sAction ) const;
00156 
00162     const TQString& configGroup() const;
00163 
00169     void setConfigGroup( const TQString &cg );
00170 
00179     bool readSettings( KConfigBase* pConfig = 0 );
00180 
00190     bool writeSettings( KConfigBase* pConfig = 0 ) const;
00191     // BCI: merge these two writeSettings methods in KDE 4.0
00202     bool writeSettings( KConfigBase* pConfig, bool bGlobal ) const;
00203 
00208     static bool useFourModifierKeys();
00209         
00213         static void blockShortcuts( bool block );
00217         void disableBlocking( bool disable );
00218         
00222         // like setEnabled(), but doesn't ungrab (see in KGlobalAccelPrivate)
00223         void suspend( bool s );
00224 
00225 private:
00226 
00227     KAccelActions& actions();
00228     const KAccelActions& actions() const;
00229 
00230     friend class KGlobalAccelPrivate;
00231     friend class KAccelShortcutList;
00232 protected:
00234     virtual void virtual_hook( int id, void* data );
00235 private:
00236     class KGlobalAccelPrivate* d;
00237 };
00238 
00239 #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
Generated for kdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |