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

kdecore

  • kdecore
kglobalaccel.cpp
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 #include "kglobalaccel.h"
21 #ifdef Q_WS_X11
22 #include "kglobalaccel_x11.h"
23 #elif defined(Q_WS_WIN)
24 #include "kglobalaccel_win.h"
25 #elif defined(Q_WS_MACX)
26 #include "kglobalaccel_mac.h"
27 #else
28 #include "kglobalaccel_emb.h"
29 #endif
30 
31 #include <tqstring.h>
32 #include "kaccelbase.h"
33 #include <kdebug.h>
34 #include <kshortcut.h>
35 #include <klocale.h>
36 
37 //----------------------------------------------------
38 
39 KGlobalAccel::KGlobalAccel( TQObject* pParent, const char* psName )
40 : TQObject( pParent, psName )
41 {
42  kdDebug(125) << "KGlobalAccel(): this = " << this << endl;
43  d = new KGlobalAccelPrivate();
44 }
45 
46 KGlobalAccel::~KGlobalAccel()
47 {
48  kdDebug(125) << "~KGlobalAccel(): this = " << this << endl;
49  delete d;
50 }
51 
52 /*
53 void KGlobalAccel::clear()
54  { d->clearActions(); }
55 */
56 KAccelActions& KGlobalAccel::actions()
57  { return d->KAccelBase::actions(); }
58 
59 const KAccelActions& KGlobalAccel::actions() const
60  { return d->KAccelBase::actions(); }
61 
62 bool KGlobalAccel::isEnabled()
63  { return ((KAccelBase*)d)->isEnabled(); }
64 
65 void KGlobalAccel::setEnabled( bool bEnabled )
66  { d->setEnabled( bEnabled ); }
67 
68 void KGlobalAccel::suspend( bool s )
69  { d->suspend( s ); }
70 
71 void KGlobalAccel::blockShortcuts( bool block )
72  { KGlobalAccelPrivate::blockShortcuts( block ); }
73 
74 void KGlobalAccel::disableBlocking( bool disable )
75  { d->disableBlocking( disable ); }
76 
77 KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
78  const KShortcut& cutDef3, const KShortcut& cutDef4,
79  const TQObject* pObjSlot, const char* psMethodSlot,
80  bool bConfigurable, bool bEnabled )
81 {
82  return d->insert( sAction, sDesc, sHelp,
83  cutDef3, cutDef4,
84  pObjSlot, psMethodSlot,
85  bConfigurable, bEnabled );
86 }
87 
88 KAccelAction* KGlobalAccel::insert( const TQString& sName, const TQString& sDesc )
89  { return d->insert( sName, sDesc ); }
90 bool KGlobalAccel::updateConnections()
91  { return d->updateConnections(); }
92 
93 bool KGlobalAccel::remove( const TQString& sAction )
94  { return d->remove( sAction ); }
95 
96 const KShortcut& KGlobalAccel::shortcut( const TQString& sAction ) const
97 {
98  const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction );
99  return (pAction) ? pAction->shortcut() : KShortcut::null();
100 }
101 
102 bool KGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
103  { return d->setShortcut( sAction, cut ); }
104 bool KGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
105  { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
106 TQString KGlobalAccel::label( const TQString& sAction ) const
107 {
108  const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction );
109  return (pAction) ? pAction->label() : TQString();
110 }
111 bool KGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable )
112 {
113  return d->setActionEnabled( sAction, bEnable );
114 }
115 
116 const TQString& KGlobalAccel::configGroup() const
117  { return d->configGroup(); }
118 // for kdemultimedia/kmix
119 void KGlobalAccel::setConfigGroup( const TQString& s )
120  { d->setConfigGroup( s ); }
121 
122 bool KGlobalAccel::readSettings( KConfigBase* pConfig )
123  { d->readSettings( pConfig ); return true; }
124 bool KGlobalAccel::writeSettings( KConfigBase* pConfig ) const
125  { d->writeSettings( pConfig ); return true; }
126 bool KGlobalAccel::writeSettings( KConfigBase* pConfig, bool bGlobal ) const
127 {
128  d->setConfigGlobal( bGlobal );
129  d->writeSettings( pConfig );
130  return true;
131 }
132 
133 bool KGlobalAccel::useFourModifierKeys()
134  { return KAccelAction::useFourModifierKeys(); }
135 
136 void KGlobalAccel::virtual_hook( int, void* )
137 { /*BASE::virtual_hook( id, data );*/ }
138 
139 #include "kglobalaccel.moc"

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.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |