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

tdecore

kglobalaccel.cpp

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 #include "kglobalaccel.h"
00021 #ifdef Q_WS_X11
00022 #include "kglobalaccel_x11.h"
00023 #elif defined(Q_WS_WIN)
00024 #include "kglobalaccel_win.h"
00025 #elif defined(Q_WS_MACX)
00026 #include "kglobalaccel_mac.h"
00027 #else
00028 #include "kglobalaccel_emb.h"
00029 #endif
00030 
00031 #include <tqstring.h>
00032 #include "tdeaccelbase.h"
00033 #include <kdebug.h>
00034 #include <tdeshortcut.h>
00035 #include <tdelocale.h>
00036 
00037 //----------------------------------------------------
00038 
00039 TDEGlobalAccel::TDEGlobalAccel( TQObject* pParent, const char* psName )
00040 : TQObject( pParent, psName )
00041 {
00042     kdDebug(125) << "TDEGlobalAccel(): this = " << this << endl;
00043     d = new TDEGlobalAccelPrivate();
00044 }
00045 
00046 TDEGlobalAccel::~TDEGlobalAccel()
00047 {
00048     kdDebug(125) << "~TDEGlobalAccel(): this = " << this << endl;
00049     delete d;
00050 }
00051 
00052 /*
00053 void TDEGlobalAccel::clear()
00054     { d->clearActions(); }
00055 */
00056 TDEAccelActions& TDEGlobalAccel::actions()
00057     { return d->TDEAccelBase::actions(); }
00058 
00059 const TDEAccelActions& TDEGlobalAccel::actions() const
00060     { return d->TDEAccelBase::actions(); }
00061 
00062 bool TDEGlobalAccel::isEnabled()
00063     { return ((TDEAccelBase*)d)->isEnabled(); }
00064 
00065 void TDEGlobalAccel::setEnabled( bool bEnabled )
00066     { d->setEnabled( bEnabled ); }
00067 
00068 void TDEGlobalAccel::suspend( bool s )
00069     { d->suspend( s ); }
00070 
00071 void TDEGlobalAccel::blockShortcuts( bool block )
00072         { TDEGlobalAccelPrivate::blockShortcuts( block ); }
00073 
00074 void TDEGlobalAccel::disableBlocking( bool disable )
00075         { d->disableBlocking( disable ); }
00076 
00077 TDEAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
00078         const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
00079         const TQObject* pObjSlot, const char* psMethodSlot,
00080         bool bConfigurable, bool bEnabled )
00081 {
00082     return d->insert( sAction, sDesc, sHelp,
00083         cutDef3, cutDef4,
00084         pObjSlot, psMethodSlot,
00085         bConfigurable, bEnabled );
00086 }
00087 
00088 TDEAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc )
00089     { return d->insert( sName, sDesc ); }
00090 bool TDEGlobalAccel::updateConnections()
00091     { return d->updateConnections(); }
00092 
00093 bool TDEGlobalAccel::remove( const TQString& sAction )
00094         { return d->remove( sAction ); }
00095 
00096 const TDEShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const
00097 {
00098     const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction );
00099     return (pAction) ? pAction->shortcut() : TDEShortcut::null();
00100 }
00101 
00102 bool TDEGlobalAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut )
00103     { return d->setShortcut( sAction, cut ); }
00104 bool TDEGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
00105     { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
00106 TQString TDEGlobalAccel::label( const TQString& sAction ) const
00107 {
00108     const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction );
00109     return (pAction) ? pAction->label() : TQString();
00110 }
00111 bool TDEGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable )
00112 {
00113         return d->setActionEnabled( sAction, bEnable );
00114 }
00115 
00116 const TQString& TDEGlobalAccel::configGroup() const
00117     { return d->configGroup(); }
00118 // for tdemultimedia/kmix
00119 void TDEGlobalAccel::setConfigGroup( const TQString& s )
00120     { d->setConfigGroup( s ); }
00121 
00122 bool TDEGlobalAccel::readSettings( TDEConfigBase* pConfig )
00123     { d->readSettings( pConfig ); return true; }
00124 bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig ) const
00125     { d->writeSettings( pConfig ); return true; }
00126 bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const
00127 {
00128     d->setConfigGlobal( bGlobal );
00129     d->writeSettings( pConfig );
00130     return true;
00131 }
00132 
00133 bool TDEGlobalAccel::useFourModifierKeys()
00134     { return TDEAccelAction::useFourModifierKeys(); }
00135 
00136 void TDEGlobalAccel::virtual_hook( int, void* )
00137 { /*BASE::virtual_hook( id, data );*/ }
00138 
00139 #include "kglobalaccel.moc"

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.6.3
This website is maintained by Timothy Pearson.